A simple starter for building RESTful APIs with FastAPI and MongoDB.
- Python FastAPI backend.
- MongoDB database.
- Authentication
- Deployment
To use the application, follow the outlined steps:
- Clone this repository and create a virtual environment in it:
$ python3 -m venv venv
- Install the modules listed in the
requirements.txt
file:
(venv)$ pip3 install -r requirements.txt
-
You also need to start your mongodb instance either locally or on Docker as well as create a
.env.dev
file. See the.env.sample
for configurations. -
Start the application:
python main.py
The starter listens on port 8000 on address 0.0.0.0.
This application can be deployed on any PaaS such as Heroku or Okteto and any other cloud service provider.
Fork the repo, make changes and send a PR. We'll review it together!
This project is licensed under the terms of MIT license.