https://github.com/xevoinc/dynamic_dispatch
dynamic dispatch decorator for classes and functions
https://github.com/xevoinc/dynamic_dispatch
dispatch dispatcher dynamic-dispatch libraries pypi pypi-packages python python-3 python-3-8 python-decorator python-decorators python-functional python-library python-utility python38
Last synced: 18 days ago
JSON representation
dynamic dispatch decorator for classes and functions
- Host: GitHub
- URL: https://github.com/xevoinc/dynamic_dispatch
- Owner: XevoInc
- License: other
- Created: 2020-06-09T21:54:10.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-22T22:11:33.000Z (almost 5 years ago)
- Last Synced: 2024-10-29T07:17:40.758Z (7 months ago)
- Topics: dispatch, dispatcher, dynamic-dispatch, libraries, pypi, pypi-packages, python, python-3, python-3-8, python-decorator, python-decorators, python-functional, python-library, python-utility, python38
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 4
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dynamic Dispatch

[](https://pypi.org/project/dynamic-dispatch/)
A lightweight, dynamic dispatch implementation for classes and functions. This allows a class or function to delegate
its implementation conditioned on the value of its first argument. This is similar to `functools.singledispatch`,
however this library dispatches over value while the other dispatches over type.## Install
You may install this via the [`dynamic-dispatch`](https://pypi.org/project/dynamic-dispatch/) package on [PyPi](https://pypi.org):
```bash
pip3 install dynamic-dispatch
```## Usage
## Development
When developing, it is recommended to use Pipenv. To create your development environment:
```bash
pipenv install --dev
```### Testing
This library uses the `unittest` framework. Tests may be run with the following:
```bash
python3 -m unittest
```