Dependency Injection Library
Project description
Fast Dependency
Installation
pip install fastdependency
Usage
from fastdependency import Depends, inject
def username() -> str:
return 'mahdi'
def password() -> str:
return '123***456'
@inject
def my_function(
param: int,
username: str = Depends(username), # Gets it from function.
password: str = Depends(password), # Gets it from container.
):
print(param)
print(username)
print(password)
my_function(12)
TODO
- Full Docs
- Precommit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastdependency-0.2.0.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for fastdependency-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 990aedddbe3efc4645df7900c7d914cee2ce682e67fdf03e08d287d92360a329 |
|
MD5 | 6a99cc9f1a0dfa28c742a95b306c0f66 |
|
BLAKE2b-256 | 6736f2ef30a6038dc718ed7dd32e4f196764963469a923f3067eb02d646d0a39 |