This is the source code for the FastAPI Beyond CRUD course. The course focuses on FastAPI development concepts that go beyond the basic CRUD operations.
For more details, visit the project's website.
Follow the instructions below to set up and run your FastAPI project.
Ensure you have the following installed:
- Python >= 3.10
- PostgreSQL
- Redis
-
Clone the project repository:
git clone https://github.com/jod35/fastapi-beyond-CRUD.git
-
Navigate to the project directory:
cd fastapi-beyond-CRUD/
-
Create and activate a virtual environment:
python3 -m venv env source env/bin/activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up environment variables by copying the example configuration:
cp .env.example .env
-
Run database migrations to initialize the database schema:
alembic upgrade head
-
Open a new terminal and ensure your virtual environment is active. Start the Celery worker (Linux/Unix shell):
sh runworker.sh
Start the application:
fastapi dev src/
Alternatively, you can run the application using Docker:
docker compose up -d
Run the tests using this command
pytest
I welcome contributions to improve the documentation! You can contribute here.