cobra_component_models.io.type package

Submodules

cobra_component_models.io.type.annotation_type module

Provide a custom pydantic type for component annotations.

class cobra_component_models.io.type.annotation_type.AnnotationType[source]

Bases: tuple

Define a custome pydantic type for component annotations.

An annotation consists of a pair of strings representing a biology qualifier and an identifier from a specific namespace.

classmethod __get_validators__()[source]

Implement pydantic special behavior.

classmethod validate(value: List[str]) → Tuple[str, str][source]

Validate and transform the given annotation.

cobra_component_models.io.type.notes_type module

Provide a custom pydantic type for component notes.

class cobra_component_models.io.type.notes_type.NotesType[source]

Bases: str

Define a custom pydantic type for component notes.

classmethod __get_validators__()[source]

Implement pydantic special behavior.

classmethod validate(value: str)[source]

Validate the notes value.

Module contents

Provide custom pydantic types.