Skip to content

stribny/fastapi-asyncalchemy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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