Code Monkey home page Code Monkey logo

mongoapi's Introduction

MongoAPI

A simple API to interact with Self-Hosted MongoDB Databases.

MongoAPI is built using FastAPI and Motor.

About

This was built to allow me to interact with my MongoDB databases using Cloudflare Workers because of the lack of self-hosted MongoDB support.

Usage

Installation

git clone https://github.com/Artucuno/MongoAPI.git
cd MongoAPI
# Make sure to edit docker-compose.yml to your liking
docker-compose up -d

API

The API is super simple and allows you to do most things that the MongoDB Driver allows you to do.

Endpoints

There is only one endpoint, /, which is used to interact with the database.

POST /

Example Headers:

{
    "Authorization": "secret"
}

Example body:

{
    "db": "selected_db",
    "collection": "my_collection",
    "operation": "insert_one", // Any operation from the pymongo collection object
    "query": {
        "content": "Hello, World!"
    }
}

mongoapi's People

Contributors

artucuno avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.