astropy 5.0

The value can be supplied as a string - e.g. from a config file. In this case the check will also convert the value to the required type. This allows you to add validation as a transparent layer to access data stored as strings. The validation checks that the data is correct and converts it to the expected type.

Some standard checks are provided for basic data types. Additional checks are easy to write. They can be provided when the Validator is instantiated or added afterwards.

The standard functions work with the following basic data types :

plus lists of these datatypes

Adding additional checks is done through coding simple functions.

The full set of standard checks are :

You can supply a default value (returned if no value is supplied) using the default keyword argument.

You specify a list argument for default using a list constructor syntax in the check : :

checkname(arg1, arg2, default=list('val 1', 'val 2', 'val 3'))

A badly formatted set of arguments will raise a VdtParamError .

The Validator object is used to check that supplied values conform to a specification.

The Validator object is used to check that supplied values conform to a specification.

The value can be supplied as a string - e.g. from a config file. In this case the check will also convert the value to the required type. This allows you to add validation as a transparent layer to access data stored as strings. The validation checks that the data is correct and converts it to the expected type.

Some standard checks are provided for basic data types. Additional checks are easy to write. They can be provided when the Validator is instantiated or added afterwards.

The standard functions work with the following basic data types :

plus lists of these datatypes

Adding additional checks is done through coding simple functions.

The full set of standard checks are :

You can supply a default value (returned if no value is supplied) using the default keyword argument.

You specify a list argument for default using a list constructor syntax in the check : :

checkname(arg1, arg2, default=list('val 1', 'val 2', 'val 3'))

A badly formatted set of arguments will raise a VdtParamError .

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /astropy/extern/configobj/validate.py#0
type: <class 'module'>
Commit: