A strict companion to dataclasses
Project description
# strictclasses
This is a validation companion to `dataclasses`. It adds a validation strict
Usage:
```python
from dataclasses import dataclass
from strictclasses import strict
@strict
@dataclass
class Foo:
bar: int
f = Foo('3')
f.strict() # -> AssertionError: bar is not an instance of <class 'int'>
```
This is a validation companion to `dataclasses`. It adds a validation strict
Usage:
```python
from dataclasses import dataclass
from strictclasses import strict
@strict
@dataclass
class Foo:
bar: int
f = Foo('3')
f.strict() # -> AssertionError: bar is not an instance of <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
strictclasses-0.1.1.tar.gz
(1.4 kB
view hashes)
Built Distribution
Close
Hashes for strictclasses-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88dc28c4b69da89cfa24d3acb664d8d12685d2d989ea1a937c1af61c840613d0 |
|
MD5 | eb56aac93c91ab2108d24a74d6f43980 |
|
BLAKE2b-256 | 453f8960861eedd23b66a4a80659de0224a00541b89eef39b9c9fb9ed771d2da |