{"id":19615683,"url":"https://github.com/chandr-andr/falcon-deps","last_synced_at":"2026-01-27T14:02:00.423Z","repository":{"id":258811457,"uuid":"875438767","full_name":"chandr-andr/falcon-deps","owner":"chandr-andr","description":"Dependency Injector for Falcon Framework","archived":false,"fork":false,"pushed_at":"2024-10-24T17:53:35.000Z","size":149,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-28T02:36:51.665Z","etag":null,"topics":["async","dependency-injection","falcon","falcon-api","falcon-framework","python3"],"latest_commit_sha":null,"homepage":"","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/chandr-andr.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}},"created_at":"2024-10-20T01:24:01.000Z","updated_at":"2024-10-22T22:05:12.000Z","dependencies_parsed_at":"2024-11-15T12:47:30.269Z","dependency_job_id":null,"html_url":"https://github.com/chandr-andr/falcon-deps","commit_stats":null,"previous_names":["chandr-andr/falcon-deps"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/chandr-andr/falcon-deps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandr-andr%2Ffalcon-deps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandr-andr%2Ffalcon-deps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandr-andr%2Ffalcon-deps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandr-andr%2Ffalcon-deps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chandr-andr","download_url":"https://codeload.github.com/chandr-andr/falcon-deps/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandr-andr%2Ffalcon-deps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28814294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"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":["async","dependency-injection","falcon","falcon-api","falcon-framework","python3"],"created_at":"2024-11-11T10:57:58.145Z","updated_at":"2026-01-27T14:02:00.378Z","avatar_url":"https://github.com/chandr-andr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Falcon-deps\nDependency injector for [Falcon Framework](https://github.com/falconry/falcon) based on [taskiq-dependencies](https://github.com/taskiq-python/taskiq-dependencies).\n\n## Installation\n\nInstall with pip\n```bash\npip install falcon-deps\n```\n\nInstall with poetry\n```bash\npoetry add falcon-deps\n```\n\n## Usage\n\n### Start Usage\nIt's simple as possible.\n\n```python\nfrom falcon_deps import InjectableResource\nfrom falcon.asgi import App, Request, Response\nfrom taskiq_dependencies import Depends\n\n\n# Imagine we have a database pool.\nasync def db_pool(\n    # Retrieve request object from the actual request.\n    request: Request = Depends(),\n) -\u003e ConnectionPool:\n    return request.context._pool\n\n\nclass Resource(InjectableResource):\n    async def on_get(\n        self,\n        request: Request,\n        response: Response,\n        # Retrieve database pool as a dependency\n        db_pool: ConnctionPool = Depends(db_pool)\n    ) -\u003e None:\n        ...\n\n\napp = App()\napp.add_route(\n    \"/test\",\n    Resource(),\n)\n```\n\n### Advanced Usage\nFalcon gives option to specify suffix for resource.\nIf you want to use suffix with `InjectableResource` you need to pass suffix to `InjectableResource` too.\n\n```python\napp.add_route(\n    \"/test\",\n    Resource(suffix=\"bob\",),\n    suffix=\"bob\",\n)\n```\n\nIf some of methods in Resource don't need dependency injection, it's possible to remove them from injection with `exclude_responder_from_inject`.\n\n```python\napp.add_route(\n    \"/test\",\n    Resource(\n        exclude_responder_from_inject={\n            # Remove on_get and on_post methods from injection.\n            \"on_get\",\n            \"on_post\",\n        },\n    ),\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchandr-andr%2Ffalcon-deps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchandr-andr%2Ffalcon-deps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchandr-andr%2Ffalcon-deps/lists"}