/fastapi-beyond-CRUD

This is source code for a series where we talk about the concepts of FastAPI API development beyond the CRUD stuff

Primary LanguagePython

FastAPI Beyond CRUD

This is source code for the FastAPI Beyond CRUD course. This course focuses on FastAPI Development concepts beyond the CRUD stuff.

For more details, you can visit the project website.

Table of Contents

  1. Getting Started
  2. Prerequisites
  3. Installation
  4. Running the Application

Getting Started

Provide instructions on how to set up and run your FastAPI project.

Prerequisites

This project requires that you have the following dependencies

  • Python >= 3.10
  • PostgreSQL
  • Redis

Project setup

Begin by cloning the project

git clone https://github.com/jod35/fastapi-beyond-CRUD.git

Enter your project

cd fastapi-beyond-CRUD/

Create your virtualenv and activate it with

python3 -m venv env 

activate the virtualenv with

source env/bin/activate

Install all project dependencies with

pip install -r requirements.txt

All environment variable are located in this file, so it is important you add them in a .env file before you run the server.

Next, run database migrations

alembic upgrade head

Open another terminal within your virtualenv and run a celery worker (in a Linux / Unix shell please)

sh runworker.sh

Finally run your the application.

fastapi dev src/

To run tests

pytest