clicktypes
Additional types for the click module that I find useful.
For a list of available types check the README file from the module.
Installation
Install from PyPI:
## Python 3
python3 -m pip install clicktypes
## PyPy3
pypy3 -m pip install clicktypes
Examples
The following are some examples. For complete examples check the appropriate README.
Networking
If you accept an IP address parameter:
from clicktypes.network import IPAddressParam
@click.argument(
'ip',
nargs = -1,
required = True,
type = IPAddressParam(),
)
This will validate the IP or IP's provided are IPv4 or IPv6 addresses and return them as an IPv4Address or IPv6Address object.
Web
If you accept an email address parameter:
from clicktypes.web import EmailParam
@click.argument(
'email',
nargs = -1,
required = True,
type = EmailParam(),
)
This will validate the email address provided matches an approved regex and it will convert it to lowercase.
Metadata
Release files for clicktypes 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 | |
|---|---|---|---|
| clicktypes-0.0.3.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| clicktypes-0.0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 12.2 kB
Release files / clicktypes-0.0.3.tar.gz
| Download URL | clicktypes-0.0.3.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f511292b5d0e84256f493b72bf9c4f689d4b1dcbb68646e1d3ebcbaf870063a
|
|
BLAKE2b-256 checksum How to use checksums |
c6e3b9584e6a656af1afa2e206b022c7a250cdbc13796295bb2776b7c247bb01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / clicktypes-0.0.3-py2.py3-none-any.whl
| Download URL | clicktypes-0.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a2c1cb482732f027b683d8fc3c30c828be3aeb1dba680ee0d41e9832a0ebbd78
|
|
BLAKE2b-256 checksum How to use checksums |
7de5f31121c8517fcf65c15d1d041c9bbac05415dcce5526624686985c3b2d37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|