Argparse Param Types
Introduction
Argparse is an excellent standard library for managing input in command-line python script, but it ships with only basic types. This project provides a library of option types that covers a lot of common use case to avoid rewriting again and again the same basic code.
Installation
pip install argparse_param_types
How to use
Available option types
file_type
directory_type
host_type
ip_type
rawip_type
ip4_type
rawip4_type
ip6_type
rawip6_type
net_type
rawnet_type
net4_type
rawnet4_type
net6_type
rawnet6_type
port_type
Changelog
0.0.3
- Add missing dependencies in pyproject (dependencies not automatically installed when pip install)
- Add a
logsflag on each param type to allow function nesting without erroneous error logging - Bug fix: Do not log error when param_type function is used as a test in a success scenario
- Use more precise except exception class to better fit business logic and not broadly catch exceptions
0.0.2
- Refactor to be PEP8 compliant, improve/add documentation, add type hinting
- Add easy import from module __init__
- Add .gitignore to project
- Add param type host_type & ip_type & rawip_type & ip4_type & rawip4_type & ip6_type & rawip6_type & net_type & rawnet_type & net4_type & rawnet4_type & net6_type & rawnet6_type & port_type
- Add unit tests for every param type
0.0.1
- Initial commit
- Implement param type file_type & directory_type
License
MIT License © [ndmalc]
Metadata
Release files for argparse-param-types 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| argparse_param_types-0.0.3.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| argparse_param_types-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.4 kB
Release files / argparse_param_types-0.0.3.tar.gz
| Download URL | argparse_param_types-0.0.3.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a43bafa3f2353d63c938dd901cc72a4390e21bac6fca331dadfdeeec683ecc68
|
|
BLAKE2b-256 checksum How to use checksums |
e80a6be64dfa3255b9ba0ed0eec5da0a93c1ac71a50216c0086b455f7a07f7f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Release files / argparse_param_types-0.0.3-py3-none-any.whl
| Download URL | argparse_param_types-0.0.3-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73c087066330d1030e36fa81318a514d37ce993871ffc080fcff29daafe3cb14
|
|
BLAKE2b-256 checksum How to use checksums |
1cc62fee867a101abfba6b399a0a0be9ec3a19b71a033b935c355968f1274587
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|