--- id: pinject version: "0.14.1" license: Apache License 2.0 license_treatment: permissive maintenance: abandoned --- # pinject — A pythonic dependency injection library License: permissive · Maintenance: abandoned · Downloads: 125.2K/mo ## What it is and what it does Pinject is a dependency injection library designed to make object graph assembly straightforward and pythonic. It automatically creates bindings between constructor argument names and class names by following PEP8 conventions—converting CamelCase class names to snake_case argument names—so you can instantiate complex object hierarchies with a single call to new_object_graph() and provide(), without decorators or explicit configuration. The library depends on six and decorator for compatibility and function wrapping. It includes convenience decorators like @copy_args_to_internal_fields to reduce boilerplate in __init__ methods. However, the project has been archived since 2021 and receives no active maintenance, so it is no longer under active development or receiving updates. Use it for: - Assemble complex object graphs in application startup without writing factory methods or configuration code - Build modular Python applications where components are automatically wired based on constructor signatures - Reduce boilerplate in __init__ methods using @copy_args_to_internal_fields for classes with many dependencies - Prototype or develop applications where implicit binding conventions match your code structure ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Pinject is a dependency injection library that automatically assembles object graphs by matching constructor argument names to class names, eliminating the need for decorators or explicit configuration. No. While Pinject is a well-designed, low-friction dependency injection library with permissive licensing and no known vulnerabilities, the project is archived and unmaintained since 2021. For new projects, use an actively maintained alternative like dependency-injector or injector. For existing codebases already using Pinject, it remains functional but will not receive bug fixes or security updates. ## Install pip install pinject uv add pinject poetry add pinject ## Installing pinject Before you install: Low friction installation with only two lightweight runtime dependencies (six and decorator). However, the project is archived and has not been updated since 2019, with the last commit in March 2021, so it receives no active maintenance. License in practice: Licensed under Apache License 2.0 (permissive), allowing use in commercial and private projects with minimal restrictions, though you should include a copy of the license and note any modifications. Quickstart: pip install pinject import pinject class InnerClass: def __init__(self): self.value = 42 class OuterClass: def __init__(self, inner_class): self.inner_class = inner_class obj_graph = pinject.new_object_graph() outer = obj_graph.provide(OuterClass) print(outer.inner_class.value) Verify before relying: - Whether the package works reliably with modern Python versions (3.9+) given its age and lack of maintenance - Compatibility with current versions of runtime dependencies six and decorator - Whether the archived repository will accept bug reports or security fixes ## Package facts - License: Apache License 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 125.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags dependency injection python, object graph assembly, automatic dependency resolution, pythonic DI framework, constructor injection library, implicit binding injection, object instantiation framework, dependency-injection, archived [View on SkillFed](https://skillfed.io/packages/pinject) · [View on PyPI](https://pypi.org/project/pinject/)