{"id":30950947,"url":"https://github.com/imgurbot12/fastapi-extras","last_synced_at":"2026-05-14T23:03:52.045Z","repository":{"id":143577647,"uuid":"605878969","full_name":"imgurbot12/fastapi-extras","owner":"imgurbot12","description":"Utilities to make using fastapi a little easier.","archived":false,"fork":false,"pushed_at":"2024-12-16T22:04:08.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T03:28:48.811Z","etag":null,"topics":["fastapi","fastapi-extension","python","python3","session-management","sync"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/fastapi-extras3/","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/imgurbot12.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}},"created_at":"2023-02-24T04:59:23.000Z","updated_at":"2025-06-17T21:39:46.000Z","dependencies_parsed_at":"2024-11-22T00:00:08.238Z","dependency_job_id":"238d00cf-dfb5-4120-82f0-daa185f3a619","html_url":"https://github.com/imgurbot12/fastapi-extras","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/imgurbot12/fastapi-extras","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgurbot12%2Ffastapi-extras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgurbot12%2Ffastapi-extras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgurbot12%2Ffastapi-extras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgurbot12%2Ffastapi-extras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imgurbot12","download_url":"https://codeload.github.com/imgurbot12/fastapi-extras/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgurbot12%2Ffastapi-extras/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274582554,"owners_count":25311641,"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-09-11T02:00:13.660Z","response_time":74,"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","fastapi-extension","python","python3","session-management","sync"],"created_at":"2025-09-11T05:27:19.697Z","updated_at":"2026-05-14T23:03:47.005Z","avatar_url":"https://github.com/imgurbot12.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"fastapi-extras\n---------------\n\nA series of extras and utilities that make using\n[fastapi](https://github.com/tiangolo/fastapi) a little bit easier\n\n### Features\n\n- Modular and Configurable Session Management\n- Synchronous Request Getter Utilities using Depends\n- Helpers for using [pyderive dataclasses](https://github.com/imgurbot12/pyderive)\n\n### Examples\n\nSession Middleware\n\n```python3\nfrom fastapi import FastAPI\nfrom fastapi_extras.session import SessionMiddleware\n\n# drop in replacement for starlette SessionMiddleware\napp = FastAPI()\napp.add_middleware(SessionMiddleware)\n\n# customizable and configurable storage interface\nfrom fastapi_extras.session.fs import FileStore\n\napp = FastAPI()\napp.add_middleware(SessionMiddleware, store=FileStore())\n```\n\nSynchronous Getters\n\n```python3\nfrom fastapi import FastAPI, Request\nfrom fastapi_extras.getters import form\n\napp = FastAPI()\n\n@app.post('/async')\nasync def async_form(request: Request):\n    \"\"\"collect form object using async function call\"\"\"\n    form = await request.form()\n    return form\n\n@app.post('/sync')\ndef sync_form(request: Request, form = form()):\n    \"\"\"collect async form resource without async using dependency\"\"\"\n    return form\n```\n\nPyderive Helpers\n\n```python3\nfrom fastapi import FastAPI, Request\nfrom fastapi_extras.session import SessionMiddleware\nfrom fastapi_extras.getters import as_session\nfrom pyderive.extensions.validate import BaseModel, IPv4\n\nclass Session(BaseModel):\n    ip: IPv4\n\napp = FastAPI()\napp.add_middleware(SessionMiddleware)\n\n@app.get('/start')\ndef start(request: Request) -\u003e str:\n    host = request.client.host if request.client else '127.0.0.1'\n    request.session['ip'] = host\n    return 'Session Started'\n\n@app.get('/check')\ndef check(session: Session = as_session(Session)):\n    return f'Your IPAddress is {session.ip!r}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgurbot12%2Ffastapi-extras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimgurbot12%2Ffastapi-extras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgurbot12%2Ffastapi-extras/lists"}