Skip to main content

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.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clicktypes 0.0.7
File Size Uploaded
clicktypes-0.0.7.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clicktypes 0.0.7
File Interpreter ABI Platform
clicktypes-0.0.7-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 14.1 kB

Release files / clicktypes-0.0.7.tar.gz

Download URL clicktypes-0.0.7.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d1927b37eff13501afd1649605bc74ba530ba1038d728e27977029a4163b035a
BLAKE2b-256 checksum
How to use checksums
fe07765047d98ec276aba9bfb9a10b227e30e3c7a7a0d1008faf7d671d2b7e29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.5

Release files / clicktypes-0.0.7-py2.py3-none-any.whl

Download URL clicktypes-0.0.7-py2.py3-none-any.whl
Size 8.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
bef4dc37ca76e02d190c2af458ee3356aa42d8a6f055cbd734b9e3598915c258
BLAKE2b-256 checksum
How to use checksums
d1ede30af8566ddfb6e7105efd9c69f93396e5e52f4ab53a8eeb45da59d75c02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page