Skip to content

Weird-Sheep-Labs/fastapi-pytest-asyncio-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastapi-pytest-asyncio-demo

Prerequisites

  • Python 3.12+
  • poetry
  • Postgres

Setup

  • Install the project:
poetry install
  • Create a local Postgres database. If you have psql installed you can simply run:
createdb <db_name>
  • Create a .env file in the project root with the following:
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/<db_name>
  • Run the tests:
poetry run pytest

About

Demo project for FastAPI async testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages