Skip to content

GermanMT/fastapi_mongodb_template

Repository files navigation

FastAPI and MongoDB Template

GitHub release (latest by date) GitHub

Documentation

Related documentation and links about this template.

FastAPI: Modern web framework for building APIs with Python.

Pydantic: Data validation library for Python.

Motor: Asynchronous Python driver for MongoDB.

Deployment with docker

  1. Create a .env file from template.env

  2. Run command 'docker compose up --build'

  3. Enter here

Testing

  1. Create a virtual enviroment with command 'python3 -m venv tutorial-env' and python 3.10

  2. Execute the enviroment with command 'source tutorial-env/bin/activate'

  3. Install production requirements with command 'pip install -r requirements.txt'

  4. Install develop requirements with command 'pip install -r requirements_dev.txt'

  5. Run tests with command 'pytest test/'

Analyse code

You can analyse your code best practices after install develop requirements with command 'ruff check' in the root folder of the project.

About

A simple template using FastAPI and MongoDB.

Resources

License

Stars

Watchers

Forks

Packages

No packages published