A strict companion to dataclasses
Project description
strictclasses
This is a validation companion to dataclasses
. It adds a validation strict
Usage:
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.2.tar.gz
(1.4 kB
view hashes)
Built Distribution
Close
Hashes for strictclasses-0.1.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6754e38a9d1060d003c02bdec478731a7a033bd425df30b285d0538b3a63d9d |
|
MD5 | d9af45895e47d1174005e922ef070317 |
|
BLAKE2b-256 | 30a937a657845a161bb5c577f0edcf434cbcefb863f982eb9bdf4c75ea36cd0f |