/mongrest

A flexible REST interface for MongoDB

Primary LanguagePython

MongREST

build standard-readme compliant

MongoDB, but with HTTP

Table of Contents

About

A small server that creates an HTTP interface to interact with MongoDB.

Ednpoints

HTTP:

GET    /count/{coll}/?query=dict

GET    /rest/{coll}/?query=dict&skip=int&limit=int
POST   /rest/{coll}/
DELETE /rest/{coll}/?query=dict

GET    /index/{coll}/
POST   /index/{coll}/
DELETE /index/{coll}/{index}

GET    /schema/{coll}/
POST   /schema/{coll}/
DELETE /schema/{coll}/

WebSocket:

/realtime/?query=dict

Install

$ pip install -r requirements.txt

Usage

To run a local version of this project, just execute:

$ docker-compose up  # mongodb cluster
$ uvicorn main:app --reload

Thanks

This project would not have been possible without the code in the following projects: