No project description provided
Project description
cwtch [wip] - Python Data Classes with validation.
In [1]: from cwtch import dataclass, field
In [2]: @dataclass
...: class D:
...: i: int
...: s: str = field(validate=False)
...:
In [3]: D(i=1, s='s')
Out[3]: D(i=1, s='s')
In [4]: D(i='i', s='s')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
File /vagrant/dev/cwtch/ext/core.pyx:618, in cwtch.core.make.validate_value_using_validator()
...
ValueError: invalid literal for int() with base 10: 'i'
During handling of the above exception, another exception occurred:
ValidationError Traceback (most recent call last)
...
ValidationError: type=[<class 'int'>] input_type=[<class 'str'>]
E: invalid literal for int() with base 10: 'i'
During handling of the above exception, another exception occurred:
ValidationError Traceback (most recent call last)
Cell In[4], line 1
----> 1 D(i='i', s='s')
File <string>:11, in __init__(__cwtch_self__, i, s, **__cwtch_kwds__)
ValidationError: type=[<class '__main__.D'>] path=['i'] input_type=[<class 'str'>]
type=[<class 'int'>] input_type=[<class 'str'>]
E: invalid literal for int() with base 10: 'i'
In [5]: D(i='1', s=0)
Out[5]: D(i=1, s=0)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cwtch-0.1.0a7.tar.gz
(17.0 kB
view hashes)
Built Distributions
Close
Hashes for cwtch-0.1.0a7-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ad438bcfe1928bfc73be79a9ef570b610807f261f0a5db819797eebe6632a05 |
|
MD5 | 6312f4c4225feb57d19edca51032c054 |
|
BLAKE2b-256 | fbdf94fceda474f27e00dc403752c01a92a1f2dfdeda56d71b4764698ee64540 |
Close
Hashes for cwtch-0.1.0a7-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cee717adb03b48ffcfb538076d4fd65829217a1e0d45d01a675dac07409b7801 |
|
MD5 | 5dd83d08e7d89f7ddfaac9a36575a7bb |
|
BLAKE2b-256 | fe46159d496ea9b45561601de7651b7783eeca4164255f69b5af14bcdaab6e83 |
Close
Hashes for cwtch-0.1.0a7-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24a251d7a8295d72626f589070ce65fb5a3bdbcee7590f782e74535bdb9268d0 |
|
MD5 | 3706da113c4f6bbc021ebe9b4a8d8b81 |
|
BLAKE2b-256 | 59deefd39f9ad28c591e63cfd5deb3acae25ded22acf00e68ee71d652ea3ec62 |
Close
Hashes for cwtch-0.1.0a7-cp312-cp312-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f5cdbf641baa29a37c3d767a7061b84dc0a591e896571925b2b03b25a76661f |
|
MD5 | e7391d282b809bc4884108386757f8b4 |
|
BLAKE2b-256 | c5ca51e0462688d0dfda120f84c60b534c1e47fb3d933b801356bc28aaa1207a |
Close
Hashes for cwtch-0.1.0a7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3eb756b3defa2dcddb6799a89cadd0906094917f52a94560130f1905bdd19216 |
|
MD5 | ff0f10017b727153d39518d40b66dd6a |
|
BLAKE2b-256 | 551022ef0bb485c495826e36100ce5a2cb586a5dee50f5688e7b43a2676bf76a |
Close
Hashes for cwtch-0.1.0a7-cp312-cp312-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88b3474d6eb009ba4f0fc7c7167d9843230d11099dd2b478c68606971db44439 |
|
MD5 | dd874172c76074c094c0e029813e0fa5 |
|
BLAKE2b-256 | ad1eb01bd7bb16b6aa37016424e68a2860c384c8dff7e69d219813179955c691 |
Close
Hashes for cwtch-0.1.0a7-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76b2ad327d07e40f025b53522ff15e2958f9ded015f419defcfc195e17be6674 |
|
MD5 | 29a4c479652d0da07b6abfff5f21caf6 |
|
BLAKE2b-256 | 5a0df86960e98f64723c7e34c0a430cca3ae893939447e99a0d9e63ed0c7c4c6 |
Close
Hashes for cwtch-0.1.0a7-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6857c02a63b86599326ffbb98671ef80cccda767c22a467d184cdbf894f6714a |
|
MD5 | 16bf0593616f46cdd253dc8a759a4972 |
|
BLAKE2b-256 | 3b3cc74b22b47a1baef4e0396c98d2d24d331b8c3c3de9a35a5e793f78fd12e0 |
Close
Hashes for cwtch-0.1.0a7-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9eff7123c2838dd129ab6a00dfb3b9ea0d82a216656d6dd7706c7ccceeb5f03 |
|
MD5 | ccf461d39c1f1901910bea269b86ec1d |
|
BLAKE2b-256 | a9b1659b5c82a39cbbca68b1438838416fa2e1b1cf2d95d047d32fe7143a800f |
Close
Hashes for cwtch-0.1.0a7-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b90221b7aa4c677dcf01e998e99c7de81c01a3fa01196ce70d917e7df01f5b39 |
|
MD5 | 9419f5e549449094c1c4c877ee5518e4 |
|
BLAKE2b-256 | ae1e05fd4168bcf7f1ed6631e296c390abbc690dc8237a660c2df5da7da866b2 |
Close
Hashes for cwtch-0.1.0a7-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1067978f93bc091eed864d1f115d9a1078956a3a8ee5f1d47e10e79dcbc963d7 |
|
MD5 | c9593ae97ee3af97ab21ec6746399c30 |
|
BLAKE2b-256 | 688dc1cdd7e43da08df612a31af4dc1d3a958a2e383c46cdfe1b29f1ab9e19e4 |
Close
Hashes for cwtch-0.1.0a7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ab94e1603f718ddbe3b788ed3536cc41ec56d7fa431436793e491c7ee534d43 |
|
MD5 | e4dacafa18f9193fd1f744dac409f256 |
|
BLAKE2b-256 | 644267be7829cf82b5506afa2e7934be8cefe50e59ec2c00c745d27f343628b5 |
Close
Hashes for cwtch-0.1.0a7-cp311-cp311-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d5089e9da215becd13131b1ef86dc888dd526bf5d87c27670e4cbd62c77301e |
|
MD5 | c2add2a629734eee35f05032f4741911 |
|
BLAKE2b-256 | 333a7a7f148e844efc574fd03751db81793cac69555df7486685271033acc760 |
Close
Hashes for cwtch-0.1.0a7-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f516604a8f438efc726cff96ae9b7484c2086bab2b68af6671ad6c157dcb058 |
|
MD5 | dee2226646d495c518cbe349373dec22 |
|
BLAKE2b-256 | 18ab459a2bd8c91520d24053bf4866fda7970bf1b5da004421285078f3f38f47 |