This project add able to work with delegators in python
Project description
Quick guide
1. Install pydelegator
Past this in your console
pip install pydelegator
2. Create main delegator manager
from pydelegator.delegator_manager import DelegatorManager
main_delegator_manager = DelegatorManager() # it is your main manager
3. Create delegator
In your file where you create want to create new delegator
import <your file name> # you have to import only file but dont import copy of main_delegator_manager
your_file_name.main_delegator_manager.create_delegator(<delegator name>)
4. Link a function to delegator
def test_func(name: str, age: int):
print(name, age)
import <your file name> # you have to import only file but dont import copy of main_delegator_manager
your_file_name.main_delegator_manager.link_func(<delegator name>, <your func>) # for exaple ("test_delegator", test_func) dont use ()
5. Call delegator
import <your file name> # you have to import only file but dont import copy of main_delegator_manager
your_file_name.main_delegator_manager.call_delegator(<delegator name>, <params>) # for exaple ("test_delegator", ("Dmytro", 15, )) int tuple you can hand over args
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
pydelegator-0.3.1.tar.gz
(1.5 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 pydelegator-0.3.1.tar.gz.
File metadata
- Download URL: pydelegator-0.3.1.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.12.8 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5447fbd5d2dd5616bfae0577dc55d88470b15a4e8e1ba1f7493e01818e498cca
|
|
| MD5 |
44d9ef6c49248d96322eab9f9cb3c935
|
|
| BLAKE2b-256 |
b658f1cbf42e60fe23003e87a89e5d3f5566f16a1826e2573054d294618d6a0d
|
File details
Details for the file pydelegator-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pydelegator-0.3.1-py3-none-any.whl
- Upload date:
- Size: 1.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.12.8 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c891037c222136c7bbb9143ee5b5db4723e64d0e42042f9fb49e34ced0dd1130
|
|
| MD5 |
a3d55a642c224e8153d8dafeb76ae0f1
|
|
| BLAKE2b-256 |
c03cf8d0f9d271c6542809a78a9df1d81a2bcb27e015ec18461ec5c213eaa9ec
|