{"id":26385220,"url":"https://github.com/can-acar/pyioc","last_synced_at":"2026-04-29T09:32:14.638Z","repository":{"id":173478402,"uuid":"650676745","full_name":"can-acar/PyIoC","owner":"can-acar","description":"IoC library for Python, similar to C# Autofac (pyfac)","archived":false,"fork":false,"pushed_at":"2023-10-11T09:43:51.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T09:45:02.610Z","etag":null,"topics":["depencyinjection","flask","ioc","python","python3"],"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/can-acar.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-06-07T15:10:11.000Z","updated_at":"2023-12-26T06:06:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"e8dcc1e3-57c8-44b4-8175-b75956cdbd87","html_url":"https://github.com/can-acar/PyIoC","commit_stats":null,"previous_names":["can-acar/pyioc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/can-acar/PyIoC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/can-acar%2FPyIoC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/can-acar%2FPyIoC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/can-acar%2FPyIoC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/can-acar%2FPyIoC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/can-acar","download_url":"https://codeload.github.com/can-acar/PyIoC/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/can-acar%2FPyIoC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32419883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["depencyinjection","flask","ioc","python","python3"],"created_at":"2025-03-17T07:40:40.352Z","updated_at":"2026-04-29T09:32:14.598Z","avatar_url":"https://github.com/can-acar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyIoC\n \nIoC library for Python, similar to C# Autofac\n\nC# Autofac benzeri, Python için IoC kütüphanesi\n\n## Yapılar\n\nProje aşağıdaki yapıları içermektedir:\n\n- `ContainerBuilder`: Bağımlılıkların kaydedilmesi ve çözünürlüğünün sağlanması için kullanılan sınıf.\n- `Container`: Bağımlılıkların çözünürlüğünü sağlayan ve kayıtları tutan sınıf.\n- `inject` ve `resolve` dekoratörleri: Bağımlılıkların otomatik enjeksiyonunu gerçekleştiren dekoratörler.\n- `ContainerEntry`: Bağımlılık kayıtlarını temsil eden sınıf.\n- `Scope`: Bağımlılıkların kapsamını belirten bir sıralı veri tipi.\n- `Module`: Bağımlılık enjeksiyonunu kolaylaştırmak için kullanılan soyut bir sınıf.\n\n\n\n\nEN\nThe project includes the following structures:\n\n- `ContainerBuilder`: A class used for registering and resolving dependencies.\n- `Container`: A class that provides dependency resolution and holds the registrations.\n- `inject` and `resolve` decorators: Decorators that enable automatic injection of dependencies.\n- `ContainerEntry`: A class that represents a dependency registration.\n- `Scope`: An enumeration that specifies the scope of dependency registrations.\n- `Module`: An abstract class used to facilitate dependency injection.\n-----------------------------------------------------------------\n\n- Interoperable with Flask Framework\n\n```python\nfrom typing import List\nfrom typing import TypeVar\n\nfrom container_entry import ContainerEntry\nfrom lib.container import Container\nfrom lib.scope import Scope\nfrom singleton import Singleton\n\n\n```python\nfrom typing import List\nfrom typing import TypeVar\n\nfrom container_entry import ContainerEntry\nfrom lib.container import Container\nfrom lib.scope import Scope\nfrom singleton import Singleton\n\nclass ExampleClass:\n    def hello(self):\n        return \"Hello, world!\"\n        \nbuilder = ContainerBuilder()\nbuilder.register(ExampleClass, scope=Scope.TRANSIENT)\ncontainer = builder.build()\n\nexample_instance = container.resolve(ExampleClass)\nprint(example_instance.hello())  # Output: Hello, world!\n````\n```python\n\nclass ExampleClass:\n    def hello(self):\n        return \"Hello, world!\"\n\n@resolve(ExampleClass)\ndef example_function(example_instance: ExampleClass):\n    return example_instance.hello()\n\nbuilder = ContainerBuilder()\nbuilder.register(ExampleClass, scope=Scope.SINGLETON)\ncontainer = builder.build()\n\nprint(example_function())  # Output: Hello, world!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcan-acar%2Fpyioc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcan-acar%2Fpyioc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcan-acar%2Fpyioc/lists"}