Youngestdev/fastapi-mongo
About
Template for building FastAPI applications with MongoDB.
Web & App DevelopmentWhat you can do
- Python FastAPI backend.
- MongoDB database.
Measured star growth
- in 24h
- +1
- in 7 days
- -1
- in 15 days
- -2
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalFastAPI and MongoDB Boilerplate
A simple starter for building RESTful APIs with FastAPI and MongoDB.

Features
- Python FastAPI backend.
- MongoDB database.
- Authentication
- Deployment
Using the applicaiton
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.txtfile:
(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.devfile. See the.env.samplefor configurations.Example for running locally MongoDB at port 27017:
cp .env.sample .env.devStart the application:
python3 main.py
The starter listens on port 8000 on address 0.0.0.0.

Testing
To run the tests, run the following command:
(venv)$ pytest
You can also write your own tests in the tests directory.
The test follow by the official support FastAPI testing guide, pytest, anyio for async testing application.
Deployment
This application can be deployed on any PaaS such as Heroku or Okteto and any other cloud service provider.
Contributing ?
Fork the repo, make changes and send a PR. We'll review it together!
License
This project is licensed under the terms of MIT license.
Explore related projects
Loading…