Skip to content

jamiedoornbos-evolutioniq/fastapi-asyncalchemy

 
 

Repository files navigation

Async SQLAlchemy usage with FastAPI

This project demonstrates async usage of SQLAlchemy 1.4 with FastAPI.

Read the article: Async SQLAlchemy with FastAPI.

Installation

To run the example, change the DATABASE_URL in fastapi_asyncalchemy/db/base.py.

To install the project:

poetry install

To run the examples, we need to enter the virtual environment:

poetry shell

Create the database tables:

python main.py

Run FastAPI with Uvicorn:

uvicorn main:app --reload

You can send HTTP requests from http://127.0.0.1:8000/docs.

Licence

Author: Petr Stříbný

License: The MIT License (MIT)

About

Example of async SQLAlchemy with FastAPI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%