{"id":32458829,"url":"https://github.com/programmer-yar/fastapi","last_synced_at":"2025-10-26T11:00:47.554Z","repository":{"id":320340297,"uuid":"1081698383","full_name":"Programmer-yar/fastapi","owner":"Programmer-yar","description":"Fastapi with uv","archived":false,"fork":false,"pushed_at":"2025-10-23T06:51:34.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-23T09:21:04.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Programmer-yar.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-23T06:50:36.000Z","updated_at":"2025-10-23T06:51:39.000Z","dependencies_parsed_at":"2025-10-23T09:24:03.151Z","dependency_job_id":"295110d9-e8af-4397-8ac0-c40d611682a1","html_url":"https://github.com/Programmer-yar/fastapi","commit_stats":null,"previous_names":["programmer-yar/fastapi"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Programmer-yar/fastapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Programmer-yar%2Ffastapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Programmer-yar%2Ffastapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Programmer-yar%2Ffastapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Programmer-yar%2Ffastapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Programmer-yar","download_url":"https://codeload.github.com/Programmer-yar/fastapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Programmer-yar%2Ffastapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281092757,"owners_count":26442440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"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":[],"created_at":"2025-10-26T11:00:03.899Z","updated_at":"2025-10-26T11:00:47.537Z","avatar_url":"https://github.com/Programmer-yar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI with UV\n\n## Project Setup with UV\n- setup simple python project structure within existing directory: `uv init`\n- create project structure alongwith directory: `uv init my_app --app`\n- create python package designed and distributed (rarely used): `uv init my_app --lib`\n- automatically creates:\n    - git repository\n    - .gitignore (typical python files to ignore)\n    - .python-version\n    - main.py\n    - pyproject.toml (modern way to configure python projects)\n- install packages with `uv add`:\n    - automatically creates and activates virtual environment if not already created \u0026 activated and install dependencies\n    - `uv add fastapi requests`\n    - updates lock file automatically\n- `uv remove [package_name]` removes the package + dependency and also removes it from .lock file \n- `uv.lock` strictly records package versions\n    - also records dependencies with sub dependencies `uv tree`\n- Run `main.py` in uv with `uv run main.py`:\n    - it automatically activates VE and runs the code, no need to keep v env on all time\n- `uv sync` install dependencies on any machine\n- smart global caching system\n- compatible with pip commands:\n    - uv pip install flask\n    - uv pip list\n\n## Migrate old project to UV:\n- first do `uv init`\n- `uv add -r requirements.txt`\n- install packages used globally like `ruff` linter with `uv tool install ruff`\n    - it will be installed as a tool and available everywhere\n- even do ruff check without installing the ruff tool:\n    - `uv tool run ruff check` it will install ruff, run the check and then remove it\n    - `uvx ruff check` shortcut\n- get tools list:\n    - `uv tool list`\n- `uv tool upgrade --all`\n- can manage multiple python versions\n\n## Local setup\n- start the fastapi server using `uv run uvicorn main:app --reload`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammer-yar%2Ffastapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogrammer-yar%2Ffastapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammer-yar%2Ffastapi/lists"}