Autoinject
A clean, simple type-safe framework for using the Dependency Injection pattern in Python.
Example
from autoinject import injector, auto
@injector.injectable
class MyService:
def __init__(self): ...
class MyClient:
service: MyService
@injector.construct
def __init__(self):
# self.service will be set before this function is called
...
@injector.inject
def my_client_function(service: MyService = auto()):
# service will be set before this function is called
...
Read the full documentation for more details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
autoinject-2.0.0.tar.gz
(32.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autoinject-2.0.0.tar.gz.
File metadata
- Download URL: autoinject-2.0.0.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c1bddcc4f51eb0d6df7b1291defe25b3a8e8b919bcbf28919793ff74ae6b57c
|
|
| MD5 |
21089062faee7f85aea09575455d9f8e
|
|
| BLAKE2b-256 |
2a5fff3e32828983da3c9bbbd904cd8e5eca0114800fc29e37cb0a63ef818734
|
File details
Details for the file autoinject-2.0.0-py3-none-any.whl.
File metadata
- Download URL: autoinject-2.0.0-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
718e10f5dbddbbd7a361dc7687189e8be246a8b204e3ee80b752812e6aa39e2d
|
|
| MD5 |
f36e20a5b659f262672821eca666b5cd
|
|
| BLAKE2b-256 |
9ff554e46a00264b656bab627f340ab16c3423b321ba5e8394b185f23c15a767
|