Skip to content

Latest commit

 

History

History
64 lines (39 loc) · 913 Bytes

README.md

File metadata and controls

64 lines (39 loc) · 913 Bytes

User CRUD

A simple FastAPI project for managing users in MongoDB with basic CRUD operations.

APIs

APIs

Schemas

Schemas

Setup

  1. Clone and navite to directory

  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # For Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
    pip install -r requirements-dev.txt  # For testing and linting
  4. Set environment variables:

    export MONGO_URI="your uri"
    export DATABASE_NAME="usersdb"

Running the App

Start the server with:

uvicorn app.main:app --reload

Running the tests

Run the tests with:

pytest

Linting

Lint the code with:

pre-commit run --all-files