{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/20"}],"enrichment":{"capability":"Punq is a dependency injection container for Python that registers and resolves object dependencies without global state, decorators, or special syntax.","skillfed_tags":["dependency-injection","ioc-container","type-safe"],"use_cases":["Wire up application services in a web framework or CLI tool without global state or service-locator antipatterns.","Manage database connections, configuration readers, and other shared resources as singleton or transient instances.","Test code by registering mock implementations of services without modifying production code.","Build modular applications where components declare their dependencies through constructor parameters.","Integrate with type checkers to catch missing or mismatched dependencies at development time."],"what_it_does":"Punq is a lightweight inversion-of-control container that manages object construction and dependency injection in Python applications. It lets you register service implementations against abstract types or keys, then resolve them on demand with automatic recursive dependency injection\u2014all without global state, decorators, or unusual syntax. The library is designed to work cleanly with type checkers like mypy and pyright in strict mode.\n\nYou create a container at your application's entry point, register your services and their implementations, and then resolve them when needed. Punq handles nested dependencies automatically: if a registered class depends on another registered service, Punq injects it. You can register instances, classes, or provide constructor arguments at registration or resolution time. The library is small, well-tested, and intentionally simple to understand.","worth_installing":"Yes. Punq is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a real problem\u2014dependency injection without magic or global state. The only caveat is the unclear license: verify the actual license terms before committing to a production dependency, but the library itself is sound and well-designed."},"id":"punq","links":{"html":"https://skillfed.io/packages/punq","md":"https://skillfed.io/packages/punq.md","pypi":"https://pypi.org/project/punq/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-03","license_spdx":null,"license_treatment":"unclear","name":"punq","python_support":"supports_current","summary":"An IOC Container for Python 3.10+"},"popularity":{"monthly_downloads":105453,"position":12699,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.8.0"}
