init_attrs_with_kwargs
A helper for type-checked command-line argument store.
Please refer to the home page on the github for installation and usage.
Sample
from init_attrs_with_kwargs import cast_set_attrs
class MyArgs:
count: int
name: str
max_length: int
# Initialize from docopt's return value, with casting str to int
args = cast_set_attrs(MyArgs(), **{'<count>': '1', '--name': "Joe", '--max-length': '100'})
print("args.count=%s" % repr(args.count))
print("args.name=%s" % repr(args.name))
print("args.max_length=%s" % repr(args.max_length))
Metadata
Release files for init-attrs-with-kwargs 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| init_attrs_with_kwargs-0.2.0.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| init_attrs_with_kwargs-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / init_attrs_with_kwargs-0.2.0.tar.gz
| Download URL | init_attrs_with_kwargs-0.2.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79e8a79d7ecfaebdc98f6b7c362af66364f5d3d714e6f05d831643ebdda2600a
|
|
BLAKE2b-256 checksum How to use checksums |
e58541fc0f2f78bb462493cdd121a55778b3b0e5e7685c2d903967b9fa4bbedc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10
|
Release files / init_attrs_with_kwargs-0.2.0-py3-none-any.whl
| Download URL | init_attrs_with_kwargs-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f7e3fb51bccd8e550c9ddf187a46f333416b7fe7f4ea28b81d3172c203f4385
|
|
BLAKE2b-256 checksum How to use checksums |
4a6af3913229f46473d01f2fc7f970c2c917adac8486628c505ce22a6cd709ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10
|