A boilerplate of the minimal and extensible Python modern web framework fastapi and mongodb. It supports restapi and ssr at the same time and is configured based on odmantic, which is a lightweight odm of mongodb.
git clone https://github.com/amamov/fastapi-mongodb-boilerplate.git <your-project-name>
cd <your-project-name>
# create "secrets.json" for env
touch secrets.json
// ./secrets.json
{
"MONGO_DB_NAME": "your-db-name",
"MONGO_URL": "mongodb+srv://..."
}
# remove .git
rm -rf .git
pip install -r requirements.txt
python3 start.py