{"id":24108659,"url":"https://github.com/nikaera/fastapi-sqlalchemy-alembic-pytest-sample","last_synced_at":"2026-03-11T05:31:52.642Z","repository":{"id":49156165,"uuid":"380107418","full_name":"nikaera/fastapi-sqlalchemy-alembic-pytest-sample","owner":"nikaera","description":"Sample project using alembic in FastAPI + SQLAlchemy project at pytest runtime.","archived":false,"fork":false,"pushed_at":"2021-06-25T22:53:06.000Z","size":19,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T20:17:42.189Z","etag":null,"topics":["alembic","docker","docker-compose","fastapi","python","sqlalchemy"],"latest_commit_sha":null,"homepage":"https://nikaera.com/archives/pytest-sqlalchemy-alembic/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikaera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-25T02:54:43.000Z","updated_at":"2025-04-29T13:19:58.000Z","dependencies_parsed_at":"2022-08-25T20:11:28.578Z","dependency_job_id":null,"html_url":"https://github.com/nikaera/fastapi-sqlalchemy-alembic-pytest-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nikaera/fastapi-sqlalchemy-alembic-pytest-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikaera%2Ffastapi-sqlalchemy-alembic-pytest-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikaera%2Ffastapi-sqlalchemy-alembic-pytest-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikaera%2Ffastapi-sqlalchemy-alembic-pytest-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikaera%2Ffastapi-sqlalchemy-alembic-pytest-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikaera","download_url":"https://codeload.github.com/nikaera/fastapi-sqlalchemy-alembic-pytest-sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikaera%2Ffastapi-sqlalchemy-alembic-pytest-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30372170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["alembic","docker","docker-compose","fastapi","python","sqlalchemy"],"created_at":"2025-01-10T23:39:25.558Z","updated_at":"2026-03-11T05:31:52.624Z","avatar_url":"https://github.com/nikaera.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastapi-sqlalchemy-alembic-pytest-sample\nSample project using [alembic](https://github.com/alembic/alembic) in [FastAPI](https://github.com/tiangolo/fastapi) + [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy) project at pytest runtime.\n\n## Getting Started 💨\n\nThe environment variables required at runtime are listed below, if you want to use [Docker Compose](https://docs.docker.jp/compose/toc.html), you don't need to use it because it already has its own [`.env` file](https://github.com/nikaera/fastapi-sqlalchemy-alembic-pytest-sample/blob/main/docker/.env).\n\n```bash\n# .envrc\nexport POSTGRES_USER=fastapi_pytest\nexport POSTGRES_PASSWORD=fastapi_pytest\nexport POSTGRES_DB=fastapi_pytest_development\n\nexport DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}\n```\n\nWhen running locally, execute the following command on the PostgreSQL server you want to connect to beforehand, but not when running Docker.\n```sql\n# psql -h localhost postgres\nCREATE USER fastapi_pytest WITH PASSWORD 'fastapi_pytest';\nALTER ROLE fastapi_pytest CREATEDB;\nCREATE DATABASE fastapi_pytest_development;\n```\n\nIf you want to quickly verify the operation with Docker Compose, please refer to the following.\n\n```bash\n# Checking the operation with docker-compose\ndocker compose up --abort-on-container-exit --exit-code-from app\n\n# clean up after docker-compose\ndocker compose down --rmi all --volumes --remove-orphans\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikaera%2Ffastapi-sqlalchemy-alembic-pytest-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikaera%2Ffastapi-sqlalchemy-alembic-pytest-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikaera%2Ffastapi-sqlalchemy-alembic-pytest-sample/lists"}