Skip to main content

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

Project description


Additional types for the click module that I find useful.

For a list of available types check the README file from the module.


Install from PyPI:

## Python 3
python3 -m pip install clicktypes

## PyPy3
pypy3 -m pip install clicktypes


The following are some examples. For complete examples check the appropriate README.


If you accept an IP address parameter:

from import IPAddressParam

    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.


If you accept an email address parameter:

from clicktypes.web import EmailParam

    nargs           = -1,
    required        = True,
    type            = EmailParam(),

This will validate the email address provided matches an approved regex and it will convert it to lowercase.

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.5.tar.gz (6.9 kB view hashes)

Uploaded source

Built Distribution

clicktypes-0.0.5-py2.py3-none-any.whl (9.0 kB view hashes)

Uploaded py2 py3

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