Skip to content

MbxrAteeq/fastapi-task

Repository files navigation

FastAPI Task

🧩 Features

  • Python
  • FastApi
  • Async MongoDB
  • Poetry
  • Pydantic
  • Async Pytest
  • Sentry
  • Docker
  • PreCommit Hooks
  • JWT Authentication

🚚 Clone the repository

git clone git@github.com:MbxrAteeq/fastapi-task.git

πŸ“¦ Setup Docker Environment

cp .env.sample .env
docker compose build
docker compose up -d

πŸ—οΈ Local Setup without Docker

1. create virtual environment

cd fastapi-task
python -m venv venv
source venv/bin/activate

2. Install requirements

bash ./setup.sh

3. Create .env file in the root directory

cp .env.sample .env

Update the MONGODB_URL environment variables to this mongodb://localhost:27017/.

4. Start the application:

bash run.sh

The server will be accessible here and swagger docs here 😎.

πŸ§ͺ Run test cases

pytest -vv -s