{"library":"punq","title":"punq - IOC Container for Python","description":"A lightweight, dependency injection container for Python 3.8+. Version 0.7.0 is the latest stable release. The library supports registering and resolving services, auto-registration, scoped containers, and singleton lifetimes. Release cadence is irregular.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install punq"],"cli":null},"imports":["import punq","from punq import Scope"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import punq\n\ncontainer = punq.Container()\ncontainer.register(str, \"Hello, world!\")\nresolved = container.resolve(str)\nprint(resolved)","lang":"python","description":"Create a container, register a string instance, and resolve it.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}