Skip to main content

dynamic dispatch decorator for classes and functions

Project description

Dynamic Dispatch

Build status PyPI PyPI - License

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 package on PyPi:

pip3 install dynamic-dispatch

Usage

Development

When developing, it is recommended to use Pipenv. To create your development environment:

pipenv install --dev

Testing

This library uses the unittest framework. Tests may be run with the following:

python3 -m unittest

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

dynamic_dispatch-1.0.2.tar.gz (5.8 kB view details)

Uploaded Source

File details

Details for the file dynamic_dispatch-1.0.2.tar.gz.

File metadata

  • Download URL: dynamic_dispatch-1.0.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for dynamic_dispatch-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ec7025b2890e7a882ceef95ff82fd154265136af930cab42533070b557d2a15d
MD5 0e29d2afa806b9b87dadfbed6a0afd6d
BLAKE2b-256 4abb7be5d47bcfb1e46fa8c3287cb9405e6fa7ecebd5716a95608160c76072e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page