{"id":23431068,"url":"https://github.com/lealre/fastapi-testcontainer-asyncpg","last_synced_at":"2026-04-25T11:35:08.704Z","repository":{"id":268548616,"uuid":"900751587","full_name":"lealre/fastapi-testcontainer-asyncpg","owner":"lealre","description":"Testing async FastAPI routes with PostgreSQL and asyncpg using testcontainers-python.","archived":false,"fork":false,"pushed_at":"2024-12-31T10:27:35.000Z","size":973,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T20:39:41.105Z","etag":null,"topics":["asyncpg","fastapi","pytest","pytest-asyncio","sqlalchemy","testcontainers"],"latest_commit_sha":null,"homepage":"https://lealre.github.io/fastapi-testcontainer-asyncpg/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lealre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-09T12:06:15.000Z","updated_at":"2024-12-31T10:27:19.000Z","dependencies_parsed_at":"2024-12-17T13:20:01.047Z","dependency_job_id":"cc85caf4-a824-43db-a598-bb606d0bb7d4","html_url":"https://github.com/lealre/fastapi-testcontainer-asyncpg","commit_stats":null,"previous_names":["lealre/fastapi-testcontainer-asyncpg"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lealre/fastapi-testcontainer-asyncpg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lealre%2Ffastapi-testcontainer-asyncpg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lealre%2Ffastapi-testcontainer-asyncpg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lealre%2Ffastapi-testcontainer-asyncpg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lealre%2Ffastapi-testcontainer-asyncpg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lealre","download_url":"https://codeload.github.com/lealre/fastapi-testcontainer-asyncpg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lealre%2Ffastapi-testcontainer-asyncpg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32261116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncpg","fastapi","pytest","pytest-asyncio","sqlalchemy","testcontainers"],"created_at":"2024-12-23T09:49:24.537Z","updated_at":"2026-04-25T11:35:03.696Z","avatar_url":"https://github.com/lealre.png","language":"Python","readme":"# Testcontainers with FastAPI and asyncpg\n\nThis repository is a simple example application of how to test asynchronous FastAPI routes using a Docker instance of PostgreSQL with `asyncpg` as the database driver. It is done by using [testcontainers-python](https://github.com/testcontainers/testcontainers-python).\n\nYou can check a more detailed text about the repository [here](https://lealre.github.io/fastapi-testcontainer-asyncpg/).\n\n## How to run this project\n\nThis repo was created using [uv](https://docs.astral.sh/uv/) and uses Python version 3.12.3.\n\n[How to install uv](https://docs.astral.sh/uv/getting-started/installation/).\n\n1. Clone the repo locally and access the project folder:\n\n    ```bash\n    git clone https://github.com/lealre/fastapi-testcontainer-asyncpg.git\n    cd fastapi-testcontainer-asyncpg\n    ```\n\n2. Run the command to serve the API on port 8000. It will automatically create and activate the virtual environment:\n\n    ```bash\n    uv run -m fastapi dev src/app.py\n    ```\n\n    To test the endpoint, access `http://localhost:8000/docs`.\n\n3. Run the tests:\n\n    ```bash\n    uv run pytest -vv\n    ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flealre%2Ffastapi-testcontainer-asyncpg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flealre%2Ffastapi-testcontainer-asyncpg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flealre%2Ffastapi-testcontainer-asyncpg/lists"}