{"id":19528631,"url":"https://github.com/community-of-python/fast-version","last_synced_at":"2026-03-12T04:31:05.492Z","repository":{"id":205787700,"uuid":"688629094","full_name":"community-of-python/fast-version","owner":"community-of-python","description":"Versioning APIs in FastAPI by Accept-header","archived":false,"fork":false,"pushed_at":"2025-11-30T20:31:29.000Z","size":232,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-17T02:11:39.451Z","etag":null,"topics":["accept-header","fastapi","rest","versioning"],"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/community-of-python.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-07T18:52:26.000Z","updated_at":"2025-11-30T20:31:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"9fee1dcc-b0ed-4134-9280-b0162bdd92b1","html_url":"https://github.com/community-of-python/fast-version","commit_stats":null,"previous_names":["modern-python/fast-version","community-of-python/fast-version"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/community-of-python/fast-version","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/community-of-python%2Ffast-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/community-of-python%2Ffast-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/community-of-python%2Ffast-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/community-of-python%2Ffast-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/community-of-python","download_url":"https://codeload.github.com/community-of-python/fast-version/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/community-of-python%2Ffast-version/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30415449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T04:25:42.844Z","status":"ssl_error","status_checked_at":"2026-03-12T04:25:34.624Z","response_time":114,"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":["accept-header","fastapi","rest","versioning"],"created_at":"2024-11-11T01:19:28.578Z","updated_at":"2026-03-12T04:31:05.466Z","avatar_url":"https://github.com/community-of-python.png","language":"Python","readme":"FastAPI versioning library\n==\n[![Test Coverage](https://codecov.io/gh/community-of-python/fast-version/branch/main/graph/badge.svg)](https://codecov.io/gh/community-of-python/fast-version)\n[![MyPy Strict](https://img.shields.io/badge/mypy-strict-blue)](https://mypy.readthedocs.io/en/stable/getting_started.html#strict-mode-and-configuration)\n[![Supported versions](https://img.shields.io/pypi/pyversions/fast-version.svg)](https://pypi.python.org/pypi/fast-version)\n[![downloads](https://img.shields.io/pypi/dm/fast-version.svg)](https://pypistats.org/packages/fast-version)\n[![GitHub stars](https://img.shields.io/github/stars/community-of-python/fast-version)](https://github.com/community-of-python/fast-version/stargazers)\n\n\u003cimg src=\"./logo.svg\" width=\"250\" /\u003e\n\nThis package adds versioning by Accept-header into FastAPI\n\n## Quickstart:\n\n### Installation\n\n```shell\n$ pip install fast-version\n```\n\n### Defining app and routes\n```python\nimport fastapi\n\nfrom fast_version import VersionedAPIRouter, init_fastapi_versioning\n\n\nVERSION_HEADER: str = \"application/vnd.some.name+json\"\nROUTER_OBJ = VersionedAPIRouter()\n\n\n@ROUTER_OBJ.get(\"/test/\")\nasync def test_get() -\u003e dict:\n    return {\"version\": (1, 0)}\n\n\n@ROUTER_OBJ.get(\"/test/\")\n@ROUTER_OBJ.set_api_version((2, 0))\nasync def test_get_v2() -\u003e dict:\n    return {\"version\": (2, 0)}\n\n\napp = fastapi.FastAPI()\napp.include_router(ROUTER_OBJ)\ninit_fastapi_versioning(app=app, vendor_media_type=VERSION_HEADER)\n```\n\n### Query Examples\n```bash\n# call 1.0 version\ncurl -X 'GET' 'https://test.ru/test/' -H 'accept: application/vnd.some.name+json; version=1.0'\n\ncurl -X 'GET' 'https://test.ru/test/' -H 'accept: application/vnd.some.name+json'\n\ncurl -X 'GET' 'https://test.ru/test/'\n\n# call 2.0 version\ncurl -X 'GET' 'https://test.ru/test/' -H 'accept: application/vnd.some.name+json; version=2.0'\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommunity-of-python%2Ffast-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommunity-of-python%2Ffast-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommunity-of-python%2Ffast-version/lists"}