https://github.com/meyer1994/mongrest
A flexible REST interface for MongoDB
https://github.com/meyer1994/mongrest
Last synced: 19 days ago
JSON representation
A flexible REST interface for MongoDB
- Host: GitHub
- URL: https://github.com/meyer1994/mongrest
- Owner: meyer1994
- Created: 2021-10-05T02:20:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-08T00:47:29.000Z (almost 2 years ago)
- Last Synced: 2024-06-08T01:42:14.779Z (almost 2 years ago)
- Language: Python
- Size: 38.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MongREST
[](https://github.com/meyer1994/mongrest/actions/workflows/build.yml)
[](https://github.com/RichardLitt/standard-readme)
[MongoDB][3], but with HTTP
## Table of Contents
- [About](#about)
- [Install](#install)
- [Usage](#usage)
- [Thanks](#thanks)
## 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
```sh
$ pip install -r requirements.txt
```
## Usage
To run a local version of this project, just execute:
```sh
$ docker-compose up # mongodb cluster
$ uvicorn main:app --reload
```
## Thanks
This project would not have been possible without the code in the following
projects:
- [PostgREST][1]
- [RestHeart][2]
[1]: https://postgrest.org/en/stable/
[2]: https://restheart.org/
[3]: https://www.mongodb.com/