Typing#

Concourse Tools contains a small number of additional types for easier resource development.

Warning

Although Concourse Tools is a typed library, the concoursetools.resource.ConcourseResource class breaks the Liskov substitution principle. If you wish to utilise type hinting in your development process, then please switch off the check for this type of method overloading.

Concourse Types#

The following types map onto Concourse basic schemas used throughout the library.

concoursetools.typing.ResourceConfig#

Represents arbitrary configuration passed to a Concourse resource. See the config schema for more information.

alias of Dict[str, Any]

concoursetools.typing.Params#

Represents arbitrary parameters passed to a Concourse resource. See the config schema for more information.

alias of Dict[str, Any]

concoursetools.typing.Metadata#

Represents Step Metadata as used by Concourse Tools. Restrictions on key and value types are determined by MetadataPair.

alias of Dict[str, str]

concoursetools.typing.MetadataPair#

Represents Step Metadata as used internally by Concourse. Restrictions on key and value types are determined by the Go structure itself.

alias of Dict[Literal[‘name’, ‘value’], str]

concoursetools.typing.VersionConfig#

Represents a version of a Concourse resource. See the version schema for more information.

alias of Dict[str, str]

Type Vars#

concoursetools.typing.VersionT = ~VersionT#

Represents a generic Version subclass.

concoursetools.typing.TypedVersionT = ~TypedVersionT#

Represents a generic TypedVersion subclass.

concoursetools.typing.SortableVersionT = ~SortableVersionT#

Represents a generic Version subclass which is also sortable.

concoursetools.typing.MultiVersionT = ~MultiVersionT#

Represents a generic MultiVersion subclass.

Protocols#

class concoursetools.typing.VersionProtocol(*args, **kwargs)[source]#

Corresponds to a generic Version subclass.

class concoursetools.typing.TypedVersionProtocol(*args, **kwargs)[source]#

Corresponds to a generic TypedVersion subclass.

class concoursetools.typing.SortableVersionProtocol(*args, **kwargs)[source]#

Corresponds to a generic Version subclass which is also sortable.

class concoursetools.typing.MultiVersionProtocol(*args, **kwargs)[source]#

Corresponds to a generic MultiVersion subclass.