Provides decorator for creating components
Project description
Classic Components
This package provides decorator for creating components with explicitly defined dependencies for Dependency Injection. Decorator marks class as component and, optionally, generates constructor from type annotations.
Part of project "Classic".
Usage:
from classic.components import component
@component
class SomeService:
prop: int
def action(self):
print(self.prop)
service = SomeService(prop=1)
service.action() # prints 1
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for classic_components-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3df9d8562f676f14e2e5003b79d79f0d6148bf5b4eca01afb7bc7c54e8d5d3d0 |
|
MD5 | 325a372afc749a576bc5899a4b5de0e3 |
|
BLAKE2b-256 | 7f35fb640ffe50b66b608bd427dc7dd43aa1bd8be59deba1c63f2942e5c5c3c9 |