{"repo":"meadsteve/lagom","free":true,"listed":false,"github":"https://github.com/meadsteve/lagom","clone":"git clone https://github.com/meadsteve/lagom.git","description":"📦 Autowiring dependency injection container for python 3","language":"Python","stars":352,"topics":["python3","dependency-injection","mypy","types","fastapi","flask","starlette","django"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"What Lagom is a dependency injection container designed to give you \"just enough\" help with building your dependencies. The intention is that almost all of your code doesn't know about or rely on lagom. Lagom will only be involved at the top level to pull everything together. Features Type based auto wiring with zero configuration. Fully based on types. Strong integration with mypy. Minimal changes to existing code. Integration with a few common web frameworks. Support for async python. Thread-safe at runtime You can see a comparison to other frameworks here 🎉 Version 2.0.0 is now released! 🎉 For users of python 3.7 and above this should require no changes. Full details can be found in the release notes upgrade instructions. Installation Note: if you decide to clone from source then make sure you use the latest version tag. The master branch may contain features that will be removed. For the versioning policy read here: SemVer in Lagom Usage Everything in Lagom is based on types. To create an object you pass the type to the container: Auto-wiring (with zero configuration) Most of the time Lagom doesn't need to be told how to build your classes. If the init method has type hints then lagom will use these to inject the correct dependencies. The following will work without any special configuration: and later if you extend your class no changes are needed to lagom: Singletons You can tell the container that something should be a singleton: Explicit build instructions when requ","default_branch":null,"files":null,"tree":[],"storefront":"/r/meadsteve","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/meadsteve/lagom/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}