{"id":13458897,"url":"https://github.com/proofit404/dependencies","last_synced_at":"2025-04-12T21:27:46.272Z","repository":{"id":38328431,"uuid":"50125353","full_name":"proofit404/dependencies","owner":"proofit404","description":"Constructor injection designed with OOP in mind.","archived":false,"fork":false,"pushed_at":"2023-04-05T20:53:36.000Z","size":4348,"stargazers_count":359,"open_issues_count":17,"forks_count":18,"subscribers_count":9,"default_branch":"release","last_synced_at":"2024-08-09T21:10:50.699Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://proofit404.github.io/dependencies/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/proofit404.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":"2016-01-21T17:47:25.000Z","updated_at":"2024-08-07T10:48:28.000Z","dependencies_parsed_at":"2024-06-18T16:35:38.756Z","dependency_job_id":null,"html_url":"https://github.com/proofit404/dependencies","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofit404%2Fdependencies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofit404%2Fdependencies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofit404%2Fdependencies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofit404%2Fdependencies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proofit404","download_url":"https://codeload.github.com/proofit404/dependencies/tar.gz/refs/heads/release","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221919877,"owners_count":16901862,"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":[],"created_at":"2024-07-31T09:00:59.462Z","updated_at":"2024-10-28T19:36:03.709Z","avatar_url":"https://github.com/proofit404.png","language":"Python","funding_links":[],"categories":["Software","Python"],"sub_categories":["DI Frameworks / Containers"],"readme":"# Dependencies [![build](https://img.shields.io/github/workflow/status/proofit404/dependencies/release?style=flat-square)](https://github.com/proofit404/dependencies/actions/workflows/release.yml?query=branch%3Arelease) [![pypi](https://img.shields.io/pypi/v/dependencies?style=flat-square)](https://pypi.org/project/dependencies)\n\nConstructor injection designed with OOP in mind.\n\n**[Documentation](https://proofit404.github.io/dependencies) |\n[Source Code](https://github.com/proofit404/dependencies) |\n[Task Tracker](https://github.com/proofit404/dependencies/issues)**\n\nDependency Injection (or simply DI) is a great technique. By using it you can\norganize responsibilities in you codebase. Define high level policies and system\nbehavior in one part. Delegate control to low level mechanisms in another part.\nSimple and powerful.\n\nWith help of DI you can use different parts of your system independently and\ncombine their behavior really easy.\n\nIf you split logic and implementation into different classes, you will see how\npleasant it becomes to change your system.\n\nThis tiny library helps you to connect parts of your system, in particular - to\ninject low level implementation into high level behavior.\n\n## Pros\n\n- Provide composition instead of inheritance.\n- Solves top-down architecture problems.\n- Boilerplate-free object hierarchies.\n- API entrypoints, admin panels, CLI commands are oneliners.\n\n## Example\n\nDependency injection without `dependencies`\n\n```pycon\n\n\u003e\u003e\u003e from app.robot import Robot, Servo, Amplifier, Controller, Settings\n\n\u003e\u003e\u003e robot = Robot(\n...     servo=Servo(amplifier=Amplifier()),\n...     controller=Controller(),\n...     settings=Settings(environment=\"production\"),\n... )\n\n\u003e\u003e\u003e robot.work()\n\n```\n\nDependency injection with `dependencies`\n\n```pycon\n\n\u003e\u003e\u003e from dependencies import Injector\n\n\u003e\u003e\u003e class Container(Injector):\n...     robot = Robot\n...     servo = Servo\n...     amplifier = Amplifier\n...     controller = Controller\n...     settings = Settings\n...     environment = \"production\"\n\n\u003e\u003e\u003e Container.robot.work()\n\n```\n\n## Questions\n\nIf you have any questions, feel free to create an issue in our\n[Task Tracker](https://github.com/proofit404/dependencies/issues). We have the\n[question label](https://github.com/proofit404/dependencies/issues?q=is%3Aopen+is%3Aissue+label%3Aquestion)\nexactly for this purpose.\n\n## Enterprise support\n\nIf you have an issue with any version of the library, you can apply for a paid\nenterprise support contract. This will guarantee you that no breaking changes\nwill happen to you. No matter how old version you're using at the moment. All\nnecessary features and bug fixes will be backported in a way that serves your\nneeds.\n\nPlease contact [proofit404@gmail.com](mailto:proofit404@gmail.com) if you're\ninterested in it.\n\n## License\n\n`dependencies` library is offered under the two clause BSD license.\n\n\u003cp align=\"center\"\u003e\u0026mdash; ⭐ \u0026mdash;\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproofit404%2Fdependencies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproofit404%2Fdependencies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproofit404%2Fdependencies/lists"}