Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mr-sunglasses/flask-mongo-api


https://github.com/mr-sunglasses/flask-mongo-api

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Users API written with Python and MONGODB

```
git clone

cd

pip3 install -r requirements.txt

python3 app.py
```

# ENV
```dotenv
SECRET_KEY = YOUR_SECRET_KEY
MONGO_URI = YOUR_MONGODB_URL
```

# USING docker
```docker
docker build -t image_name .

docker run -e SECRET_KEY="YOUR_SECRET_KEY" -e MONGO_URI = "YOUR_MONGODB_URL" image_name:latest

```

# API USUAGE
```docker
○ GET /users - Returns a list of all users.
○ GET /users/ - Returns the user with the specified ID.
○ POST /users - Creates a new user with the specified data.
○ PUT /users/ - Updates the user with the specified ID with the new data.
○ DELETE /users/ - Deletes the user with the specified ID.
```