Python Type validator with decorators
Project description
# python-type-valid
Python type validation decorator with hinting
### Installation
~~~sh
pip install type-valid
~~~
### Usage
~~~python
from type_valid import type_valid
@type_valid
def hello(name: str) -> str:
return name
~~~
### Raises TypeError
~~~sh
TypeError: in method 'hello', Argument 'name' is not of type <class 'str'>, received <class 'int'>
~~~
Python type validation decorator with hinting
### Installation
~~~sh
pip install type-valid
~~~
### Usage
~~~python
from type_valid import type_valid
@type_valid
def hello(name: str) -> str:
return name
~~~
### Raises TypeError
~~~sh
TypeError: in method 'hello', Argument 'name' is not of type <class 'str'>, received <class 'int'>
~~~
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
type_valid-0.1.1.tar.gz
(1.2 kB
view hashes)
Built Distribution
Close
Hashes for type_valid-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9d525e9fea7d911c279f8b927dcaa8a04d23cd148c6d4573b0781691ae342b1 |
|
MD5 | 6f07de953c0e8da53e7479285c461766 |
|
BLAKE2b-256 | 9f5cb119ffa820fe0d4a31d9f5243b438b80e4a8f5215ec3c2ffc7cb5ecdafd0 |