Skip to content

jairoandrescastaneda/fastapi-mongodb-async-restapi

 
 

Repository files navigation

FastAPI MongoDB Async RestAPI

A Blueprint of a production-ready project.

alt text

This project is based on Michaldev's Github fastapi-async-mongodb.
Headers, tokens and other security features has been ignored for simplicity. How to setup a local Mongodb for testing purposes.

Features:

Usage:

Check ./Makefile content to understand how to run the app manually.

  • Makefile:
    • make run_pytest_venv # run tests from a virtual environment (.venv)
    • make run_docker_dev # create and run the api from ./docker/Dockerfile.dev

Project Structure:

├───api
│   ├───db          # db connection and mongodb api
│   ├───models      # pydantic models
│   ├───public      # public api namespaces
│   │   ├───health  # health check
│   │   └───user    # CRUD endpoints
│   └───utils       # app utilities
│   │   └───logger  # custom logger
│   └───config.py   # app config
│   └───main.py     # app main
├───docker          # dockerfiles
├───requirements    # dependencies
└───tavern_tests    # api tests
└───entry_point.py  # app entry point
└───Makefile        # commands helper

About

A Blueprint of a production-ready project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 85.5%
  • Makefile 8.0%
  • Dockerfile 6.5%