Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

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

74 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages