A type representing a string in the configuration.
Example in configuration:
my_string = "hello, world!"
A string based type validated against a regex.
A string based type like Regex but returning named groups in dict.
A re Python object.
Parameters: | flags – python re compile flag |
---|
Example in configuration:
match = '/[a-z]+(-[a-z]+)?\.css'
A string based type representing an ipv4 or ipv6 address.
This type require the “ipaddr” package to work and will return an ipaddr.IPAddress object.
Parameters: | version – type or ip address to validate, can be 4 (ipv4 addresses only), 6 (ipv6 addresses only), or None (both). |
---|
Example in configuration:
interface = "127.0.0.1"
A string based type representing an ipv4 or ipv6 network.
This type require the “ipaddr” package to work and will return an ipaddr.IPNetwork object.
Parameters: | version – type or ip address to validate, can be 4 (ipv4 addresses only), 6 (ipv6 addresses only), or None (both). |
---|
Example in configuration:
allow = "10.0.0.0/8"
A string based type representing an URL.
This type return an urlparse.ParseResult object.
Example in configuration:
proxy = "http://proxy:3128"
A string based type representing an (ip address, port) couple.
This type return an IPSocketAddress.Address object.
Example in configuration:
interface = "0.0.0.0:80"
A string base type evaluating string as Python expression.
Example in configuration:
sum = 'sum(range(3, 10))'
Warning
This type can be dangerous since any Python expression can be typed by the user, like __import__(“sys”).exit(). Use it at your own risk.
A type representing an integer in the configuration.
Parameters: |
|
---|
Example in configuration:
my_integer = 42
my_integer = 42.0 # Will also match this type
A type representing a float in the configuration.
Example in configuration:
my_float = 42.2
my_float = 42 # All values matched by the Integer type also match
# for the Float type