Simple method-chaining tool
Project description
Example
import chainop, argparse
parser = argparse.ArgumentParser()
chop = chainop(parser).add_argument("--arg0")("--arg1")("--foobar")("--arg3", type=int)
foobar_arg:argparse.Action = chop[2] # Get the returned value for the 3rd add_argument call
print(foobar_arg.dest)
chop[3].default = 0
args = parser.parse_args()
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
chainop-1.0.1.tar.gz
(1.5 kB
view details)
File details
Details for the file chainop-1.0.1.tar.gz
.
File metadata
- Download URL: chainop-1.0.1.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89b73e0d7a5db60efbd343d1f411af38fd1d359d6cd4b34a302e2e4785668925 |
|
MD5 | 3ee09f2395cdb58b2632cdd269804990 |
|
BLAKE2b-256 | 622ac82346070ae769281d6bb7f8ec771751f9324e2072db396f3f1c29606009 |