{"id":26285517,"url":"https://github.com/100nm/python-injection","last_synced_at":"2025-12-25T18:23:03.535Z","repository":{"id":180991680,"uuid":"666041049","full_name":"100nm/python-injection","owner":"100nm","description":"Fast and easy dependency injection framework.","archived":false,"fork":false,"pushed_at":"2025-04-30T10:01:53.000Z","size":815,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"prod","last_synced_at":"2025-04-30T11:24:31.582Z","etag":null,"topics":["async","async-python","decorators","decorators-python","dependency-injection","fastapi","mypy","python","type-hints","typed"],"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/100nm.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}},"created_at":"2023-07-13T15:11:15.000Z","updated_at":"2025-04-30T10:01:56.000Z","dependencies_parsed_at":"2023-11-01T20:24:32.563Z","dependency_job_id":"32da0043-b059-4c94-b3a0-bc9a4d193e44","html_url":"https://github.com/100nm/python-injection","commit_stats":null,"previous_names":["soon-app/injection","soon-app/python-injection","simplysquare/python-injection","100nm/python-injection"],"tags_count":102,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100nm%2Fpython-injection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100nm%2Fpython-injection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100nm%2Fpython-injection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100nm%2Fpython-injection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/100nm","download_url":"https://codeload.github.com/100nm/python-injection/tar.gz/refs/heads/prod","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252895051,"owners_count":21821093,"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","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","async-python","decorators","decorators-python","dependency-injection","fastapi","mypy","python","type-hints","typed"],"created_at":"2025-03-14T19:33:07.993Z","updated_at":"2025-12-25T18:23:03.529Z","avatar_url":"https://github.com/100nm.png","language":"Python","readme":"# python-injection\n\n[![CI](https://github.com/100nm/python-injection/actions/workflows/ci.yml/badge.svg)](https://github.com/100nm/python-injection)\n[![PyPI - Version](https://img.shields.io/pypi/v/python-injection.svg?color=blue)](https://pypi.org/project/python-injection)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/python-injection.svg?color=blue)](https://pypistats.org/packages/python-injection)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\nDocumentation: https://python-injection.remimd.dev\n\n## Installation\n\n⚠️ _Requires Python 3.12 or higher_\n```bash\npip install python-injection\n```\n\n## Quick start\n\nSimply apply the decorators and the package takes care of the rest.\n```python\nfrom injection import injectable, inject, singleton\n\n@singleton\nclass Printer:\n    def __init__(self):\n        self.history = []\n\n    def print(self, message: str):\n        self.history.append(message)\n        print(message)\n\n@injectable\nclass Service:\n    def __init__(self, printer: Printer):\n        self.printer = printer\n\n    def hello(self):\n        self.printer.print(\"Hello world!\")\n\n@inject\ndef main(service: Service):\n    service.hello()\n\nif __name__ == \"__main__\":\n    main()\n```\n","funding_links":[],"categories":["Software"],"sub_categories":["DI Frameworks / Containers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F100nm%2Fpython-injection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F100nm%2Fpython-injection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F100nm%2Fpython-injection/lists"}