Metadata-Version: 2.1
Name: limier
Version: 0.0.2
Summary: Smart toolkit for conversion and validation of function arguments powered by type annotations
Home-page: https://github.com/florimondmanca/limier
Author: Florimond Manca
Author-email: florimond.manca@gmail.com
License: License :: OSI Approved :: MIT License
Platform: UNKNOWN
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# Limier

Limier is a smart toolkit for conversion and validation of function arguments in Python powered by type annotations.

A typical use case is the conversion of route parameters in the context of web routing.

## Install

```bash
pip install limier
```

## Basic usage

```python
from limier import converted, chain

# Custom converter: validate that the input value is positive
def positive(value: int) -> int:
    if value < 0:
        raise ValueError("Expected positive value")
    return value

@converted
def compute(x: int, times: chain(int, positive)) -> float:
    return x * times

result = compute("2", times="2.5")
assert result == 5
```


