{"id":37360497,"url":"https://github.com/vshulcz/injex","last_synced_at":"2026-01-16T04:45:21.234Z","repository":{"id":258979886,"uuid":"872514195","full_name":"vshulcz/injex","owner":"vshulcz","description":"DI container for Python applications","archived":false,"fork":false,"pushed_at":"2024-11-20T05:15:04.000Z","size":55,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-05T14:14:04.578Z","etag":null,"topics":["container","ddd","dependency-injection","di","injector","singleton","transient"],"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/vshulcz.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":"2024-10-14T15:09:03.000Z","updated_at":"2024-11-20T05:15:05.000Z","dependencies_parsed_at":"2024-11-16T20:34:54.688Z","dependency_job_id":null,"html_url":"https://github.com/vshulcz/injex","commit_stats":null,"previous_names":["vshulcz/di"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/vshulcz/injex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshulcz%2Finjex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshulcz%2Finjex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshulcz%2Finjex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshulcz%2Finjex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vshulcz","download_url":"https://codeload.github.com/vshulcz/injex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshulcz%2Finjex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"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":["container","ddd","dependency-injection","di","injector","singleton","transient"],"created_at":"2026-01-16T04:45:20.305Z","updated_at":"2026-01-16T04:45:21.229Z","avatar_url":"https://github.com/vshulcz.png","language":"Python","funding_links":[],"categories":["Software"],"sub_categories":["DI Frameworks / Containers"],"readme":"# Injex - DI Container for Python\n\n![Build Status](https://github.com/vshulcz/di/actions/workflows/ci.yml/badge.svg)\n[![pypi](https://img.shields.io/pypi/v/injex.svg)](https://pypi.python.org/pypi/injex)\n[![Coverage](https://codecov.io/gh/vshulcz/injex/branch/main/graph/badge.svg)](https://codecov.io/gh/vshulcz/injex)\n[![Python Versions](https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12%20|%203.13-blue)](https://github.com/vshulcz/injex)\n[![License](https://img.shields.io/github/license/vshulcz/di.svg)](https://github.com/vshulcz/injex/LICENSE)\n\nInjex is a lightweight and easy-to-use Dependency Injection (DI) container for Python applications. It simplifies dependency management, making your code more modular, testable, and maintainable. Injex is inspired by popular DI frameworks in other programming languages and brings similar capabilities to Python.\n\n## Features\n\n* 🌟 Simple API: Easy to understand and use.\n* 🔄 Multiple Lifestyles: Support for singleton, transient, and scoped services.\n* 🧩 Flexible Registrations: Register services, factories, and instances.\n* 🏷️ Named Registrations: Register multiple implementations of the same interface using names.\n* 🔍 Property Injection: Inject dependencies into properties after object creation.\n* 🛠 Optional Dependencies: Handle optional dependencies gracefully.\n* 🚀 No External Dependencies: Pure Python implementation without third-party packages.\n\n## Installation\n\n```bash\npip install injex\n```\n\n## Why Use Dependency Injection?\n\n**Dependency Injection is a design pattern that helps in:**\n\n* Modularity: Breaking down your application into interchangeable components.\n* Testability: Facilitating unit testing by allowing dependencies to be mocked or stubbed.\n* Maintainability: Making it easier to update, replace, or refactor components without affecting other parts of the application.\n* Flexibility: Configuring different implementations of the same interface for various scenarios (e.g., testing, production).\n\n## Quick Start\n\nHere's a simple example of usage Injex:\n```python\nfrom abc import ABC, abstractmethod\nfrom injex import Container\n\nclass IService(ABC):\n    @abstractmethod\n    def perform_action(self):\n        pass\n\nclass ServiceImplementation(IService):\n    def perform_action(self):\n        print(\"Service is performing an action.\")\n\ncontainer = Container()\n\ncontainer.add_transient(IService, ServiceImplementation)\n\nservice = container.resolve(IService)\nservice.perform_action() # output: Service is performing an action.\n```\nAnother examples in [examples folder](./examples).\n\n## Documentation\n\nFor detailed documentation on all functionalities, usage examples, and best practices, please refer to the [Documentation](./docs/tutorial.md).\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvshulcz%2Finjex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvshulcz%2Finjex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvshulcz%2Finjex/lists"}