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 = <class 'concoursetools.typing.MetadataPair'>[source]

Represents Step Metadata as used internally by Concourse.

Restrictions on key and value types are determined by the Go structure itself.

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.

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.