Welcome to click-types documentation!¶
click-types: Python API client library for phpIPAM installation¶
PyPI version
Codacy Badge
Documentation Status
click is the Command line interface creation kit
and it helps you to create command line interfaces with some few lines of code. Click comes with meaningful defauls to make starting with it as easy as possible.
A powerful feature of click is to develop custom types to convert and/or validate user input. There are several custom types in the wild but this repository is intended to collect such custom types to make it easily accessable.
CHANGELOG¶
All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning and Keep a Changelog.
click_types¶
click_types package¶
Python package that provides custom click types.
Submodules¶
click_types.ansible module¶
click_types.coding module¶
Module for custom click types regarding to development.
- class click_types.coding.SemVerParamType[source]¶
Bases:
click.types.ParamType
Provide a custom click type for semantic versions.
This custom click type provides validity checks for semantic versions.
- convert(value, param, ctx)[source]¶
Converts the value from string into semver type.
This method takes a string and check if this string belongs to semantic verstion definition. If the test is passed the value will be returned. If not a error message will be prompted.
- Parameters
value (str) – the value passed
param (str) – the parameter that we declared
ctx (str) – context of the command
- Returns
the passed value as a checked semver
- Return type
str
- name: str = 'semver'¶
the descriptive name of this type
click_types.net module¶
Module for custom click types regarding to network.
- class click_types.net.CIDRParamType[source]¶
Bases:
click.types.ParamType
Provide a custom click type for network cidr handling.
This custom click type provides validity check for network cidrs. Both ip version (v4 and v6) are supported.
- convert(value, param, ctx)[source]¶
Converts the value from string into cidr type.
This method takes a string and check if this string belongs to ipv4 or ipv6 cidr definition. If the test is passed the value will be returned. If not a error message will be prompted.
- Parameters
value (str) – the value passed
param (str) – the parameter that we declared
ctx (str) – context of the command
- Returns
the passed value as a checked cidr
- Return type
int
- name: str = 'cidr'¶
the descriptive name of this type
- class click_types.net.VlanIDParamType[source]¶
Bases:
click.types.ParamType
Provide a custom click type for vlan id handling.
This custom click type provides validity checks for vlan ids according to IEEE 802.1Q standard.
- convert(value, param, ctx)[source]¶
Converts the value from string into semver type.
This method tages a string and check if this string belongs to semantic verstion definition. If the test is passed the value will be returned. If not a error message will be prompted.
- Parameters
value (str) – the value passed
param (str) – the parameter that we declared
ctx (str) – context of the command
- Returns
the passed value as a checked vlan id
- Return type
int
- name: str = 'vlanid'¶
the descriptive name of this type
How to contribute to click-types¶
Did you found a bug¶
Make sure the bug is not already opened by another user.
If you can’t find an open issue which reflects your observed problem go ahead an open a new bug.
Provide as much information as mentioned in the bug report template.
Did you wrote a patch for an open bug¶
Open new pull request containing the patch.
Provide a clear description which describes the problem and the solution. Link the existing bug to the PR.
Do you want to add a new feature¶
Make sure there isn’t already a feature request.
If you can’t find an open feature request which describe your feature idea or parts of it feel free to open a new feature request.
Suggest your feature idea within the created feature request.
Provide as much discribtion as possible to enable others to have a good understanding of what you are doing.
Point out that you want to start to work on the new feature
Do you wnat to contribute to documentation¶
Write you documentation change.
Open a PR with your change.
Discuss with the team about your changes.
Thank you for any contribution¶
We will thank you for heed the contribution guidelines and we encourage you to contribute and join the team.