Metadata-Version: 2.1
Name: limier
Version: 0.0.1
Summary: Smart conversion and validation toolkit 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
Description: # Limier
        
        Limier is a smart Python conversion and validation toolkit powered by type annotations.
        
        It is especially handy to automatically cast parameters passed to functions. A typical use case is processing route parameters in the context of web routing.
        
        ## Install
        
        Limier is released to PyPI and can be installed using `pip`:
        
        ```bash
        pip install limier
        ```
        
        ## Basic usage
        
        ```python
        from limier import deduce, 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
        
        @deduce
        def compute(x: int, times: chain(int, positive)) -> float:
            return x * times
        
        result = compute("2", times="2.5")
        assert result == 5
        ```
        
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
