Skip to main content

Additional parameter types for the "click" module that I find useful.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clicktypes-0.0.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

clicktypes-0.0.2-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file clicktypes-0.0.2.tar.gz.

File metadata

  • Download URL: clicktypes-0.0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for clicktypes-0.0.2.tar.gz
Algorithm Hash digest
SHA256 75cfa46ca5df7a984c32b02e127fb2b5e05489a94895853db7d42e828b6fce06
MD5 49c9b3cc5ea8d2141cf01accb7fd7f14
BLAKE2b-256 63392e61f24c3227007cbff321285e521c0dbf4518d5c7b51256ac6c268848fb

See more details on using hashes here.

File details

Details for the file clicktypes-0.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: clicktypes-0.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for clicktypes-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 93936729c3f696f4cfddfd548c83cebc8db42e26e01dd04c3ea7375ff65bbafc
MD5 8e8556f700e74688b2f08ef0f4648ac5
BLAKE2b-256 2c5862c5c9eaf18645d4373cb9e8286b66553645ac5521cdec2db575221770f6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page