Metadata-Version: 2.1
Name: typedispatch
Version: 0.1.0
Summary: TypeDispatch is a Python utility for registering and dispatching functions based on object types, supporting inheritance through method resolution order (MRO).
Home-page: https://github.com/ruitcatarino/typedispatch
Author: Rui Catarino
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE

# typedispatch

`typedispatch` is a Python library for registering functions based on type resolution. It allows you to associate types with functions and dynamically look up functions based on the type of an object, including handling inheritance hierarchies.

## Installation

```bash
pip install typedispatch
```

## Usage
```python
from typedispatch import TypeDispatch, TypeDispatchError

typedispatch = TypeDispatch()

typedispatch.register(int, lambda x: f"Processing integer: {x}")
print(typedispatch.lookup(10))  # Output: Processing integer: 10
```


