{"id":28157294,"url":"https://github.com/heinrich10/pyfastapi","last_synced_at":"2026-04-19T04:34:10.012Z","repository":{"id":185739056,"uuid":"673889563","full_name":"heinrich10/pyfastapi","owner":"heinrich10","description":"Simple backend example using Python and FastAPI","archived":false,"fork":false,"pushed_at":"2024-03-15T03:07:04.000Z","size":113,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T08:19:41.742Z","etag":null,"topics":["fastapi","python","sqlalchemy","sqlite"],"latest_commit_sha":null,"homepage":"","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/heinrich10.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-02T16:49:11.000Z","updated_at":"2024-03-10T17:23:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed2c3604-8a51-4697-90b3-c22e5a03890a","html_url":"https://github.com/heinrich10/pyfastapi","commit_stats":null,"previous_names":["heinrich10/pyfastapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/heinrich10/pyfastapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heinrich10%2Fpyfastapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heinrich10%2Fpyfastapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heinrich10%2Fpyfastapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heinrich10%2Fpyfastapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heinrich10","download_url":"https://codeload.github.com/heinrich10/pyfastapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heinrich10%2Fpyfastapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31995096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["fastapi","python","sqlalchemy","sqlite"],"created_at":"2025-05-15T08:19:37.659Z","updated_at":"2026-04-19T04:34:10.005Z","avatar_url":"https://github.com/heinrich10.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PYFASTAPI\n\nsample backend using pyfastapi, sqlalchemy, and alembic\n\n## Pre-requisites\n- python 3.12\n- poetry\n- sqlite\n\n## How to run\n1. install dependencies `poetry install`\n2. copy `.env.example` to `.env` and change the values if needed\n2. run the app `poetry run python run.py`\n3. call the api endpoint `curl http://localhost:5000/persons`\n4. open `http://localhost:5000/docs` to view then openapi docs\n\n## How to run in a container\n1. build the image `podman build -t pyfastapi .`\n2. run the image `podman run -p 5000:5000 pyfastapi`\n\nnote: you can use `docker` instead of `podman` as it is a drop in replacement\n\n## Seed Data\n1. run `alembic upgrade head`\n2. sql schema and the data should be on `./sql_app.db`\n3. refer to `alembic.ini` to change other configuration, it uses .env for the DB url\n\n## Tests\n1. make sure main dependencies are installed\n2. run `poetry install`\n2. run `pytest`, take note that it uses `.env.test` for configuration\n\n## Data Model\n\n```mermaid\n---\nconfig:\n  layout: dagre\n  look: handDrawn\ntitle: ERD\n---\nerDiagram\n\tperson {\n\t\tint id PK \"\"  \n\t\tString last_name  \"\"  \n\t\tString first_name  \"\"  \n\t\tString country_code FK \"\"  \n\t\ttimestamp updated_at  \"\"  \n\t\ttimestamp created_at  \"\"  \n\t}\n\tcountry {\n\t\tString code PK \"\"  \n\t\tString name  \"\"  \n\t\tint phone  \"\"  \n\t\tString symbol  \"\"  \n\t\tString capital  \"\"  \n\t\tString currency  \"\"  \n\t\tString continent_code FK \"\"  \n\t\tString alpha_3  \"\"  \n\t\ttimestamp updated_at  \"\"  \n\t\ttimestamp created_at  \"\"  \n\t}\n\tcontinent {\n\t\tString code PK \"\"  \n\t\tString name  \"\"  \n\t}\n\tperson}|--||country:\"residesIn\"\n\tcountry}|--||continent:\"belongsTo\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheinrich10%2Fpyfastapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheinrich10%2Fpyfastapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheinrich10%2Fpyfastapi/lists"}