hdmf-common¶
1.5.0¶
- class datetime(year, month, day[, hour[, minute[, second[, microsecond[, tzinfo]]]]])¶
The year, month and day arguments are required. tzinfo may be None, or an instance of a tzinfo subclass. The remaining arguments may be ints.
- hour¶
- minute¶
- second¶
- microsecond¶
- tzinfo¶
- fold¶
- fromtimestamp()¶
timestamp[, tz] -> tz’s local time from POSIX timestamp.
- utcfromtimestamp()¶
Construct a naive UTC datetime from a POSIX timestamp.
- now()¶
Returns new datetime object representing current time local to tz.
- tz
Timezone object.
If no tz is specified, uses local timezone.
- utcnow()¶
Return a new datetime representing UTC day and time.
- combine()¶
date, time -> datetime with same date and time fields
- fromisoformat()¶
string -> datetime from a string in most ISO 8601 formats
- timetuple()¶
Return time tuple, compatible with time.localtime().
- timestamp()¶
Return POSIX timestamp as float.
- utctimetuple()¶
Return UTC time tuple, compatible with time.localtime().
- date()¶
Return date object with same year, month and day.
- time()¶
Return time object with same time but with tzinfo=None.
- timetz()¶
Return time object with same time and tzinfo.
- replace()¶
Return datetime with new specified fields.
- astimezone()¶
tz -> convert to local time in new timezone tz
- ctime()¶
Return ctime() style string.
- isoformat()¶
[sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM]. sep is used to separate the year from the time, and defaults to ‘T’. The optional argument timespec specifies the number of additional terms of the time to include. Valid options are ‘auto’, ‘hours’, ‘minutes’, ‘seconds’, ‘milliseconds’ and ‘microseconds’.
- strptime()¶
string, format -> new datetime parsed from a string (like time.strptime()).
- utcoffset()¶
Return self.tzinfo.utcoffset(self).
- tzname()¶
Return self.tzinfo.tzname(self).
- dst()¶
Return self.tzinfo.dst(self).
- max = datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)¶
- min = datetime.datetime(1, 1, 1, 0, 0)¶
- resolution = datetime.timedelta(microseconds=1)¶
- class date¶
date(year, month, day) –> date object
- fromtimestamp()¶
Create a date from a POSIX timestamp.
The timestamp is a number, e.g. created via time.time(), that is interpreted as local time.
- today()¶
Current date or datetime: same as self.__class__.fromtimestamp(time.time()).
- fromordinal()¶
int -> date corresponding to a proleptic Gregorian ordinal.
- fromisoformat()¶
str -> Construct a date from a string in ISO 8601 format.
- fromisocalendar()¶
int, int, int -> Construct a date from the ISO year, week number and weekday.
This is the inverse of the date.isocalendar() function
- ctime()¶
Return ctime() style string.
- strftime()¶
format -> strftime() style string.
- isoformat()¶
Return string in ISO 8601 format, YYYY-MM-DD.
- year¶
- month¶
- day¶
- timetuple()¶
Return time tuple, compatible with time.localtime().
- toordinal()¶
Return proleptic Gregorian ordinal. January 1 of year 1 is day 1.
- replace()¶
Return date with new specified fields.
- weekday()¶
Return the day of the week represented by the date. Monday == 0 … Sunday == 6
- isoweekday()¶
Return the day of the week represented by the date. Monday == 1 … Sunday == 7
- isocalendar()¶
Return a named tuple containing ISO year, week number, and weekday.
- max = datetime.date(9999, 12, 31)¶
- min = datetime.date(1, 1, 1)¶
- resolution = datetime.timedelta(days=1)¶
- class Enum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- class Any(*args, **kwargs)¶
Special type indicating an unconstrained type.
Any is compatible with every type.
Any assumed to have all methods.
All values assumed to be instances of Any.
Note that all the above statements are true from the point of view of static type checkers. At runtime, Any should not be used with instance checks.
- pydantic model BaseModel¶
Usage docs: https://docs.pydantic.dev/2.8/concepts/models/
A base class for creating Pydantic models.
- __class_vars__¶
The names of classvars defined on the model.
- __private_attributes__¶
Metadata about the private attributes of the model.
- __signature__¶
The signature for instantiating the model.
- __pydantic_complete__¶
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__¶
The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.
- __pydantic_custom_init__¶
Whether the model has a custom __init__ function.
- __pydantic_decorators__¶
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__¶
Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
- __pydantic_parent_namespace__¶
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__¶
The name of the post-init method for the model, if defined.
- __pydantic_root_model__¶
Whether the model is a RootModel.
- __pydantic_serializer__¶
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__¶
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_extra__¶
An instance attribute with the values of extra fields from validation when model_config[‘extra’] == ‘allow’.
- __pydantic_fields_set__¶
An instance attribute with the names of fields explicitly set.
- __pydantic_private__¶
Instance attribute with the values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- copy(*, include: AbstractSetIntStr | MappingIntStrAny | None = None, exclude: AbstractSetIntStr | MappingIntStrAny | None = None, update: Dict[str, Any] | None = None, deep: bool = False) Self¶
Returns a copy of the model.
- !!! warning “Deprecated”
This method is now deprecated; use model_copy instead.
If you need include or exclude, use:
`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `- Parameters:
include – Optional set or mapping specifying which fields to include in the copied model.
exclude – Optional set or mapping specifying which fields to exclude in the copied model.
update – Optional dictionary of field-value pairs to override field values in the copied model.
deep – If True, the values of fields that are Pydantic models will be deep-copied.
- Returns:
A copy of the model with included, excluded and updated fields as specified.
- dict(*, include: Set[int] | Set[str] | Dict[int, Any] | Dict[str, Any] | None = None, exclude: Set[int] | Set[str] | Dict[int, Any] | Dict[str, Any] | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) Dict[str, Any]¶
- json(*, include: Set[int] | Set[str] | Dict[int, Any] | Dict[str, Any] | None = None, exclude: Set[int] | Set[str] | Dict[int, Any] | Dict[str, Any] | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Callable[[Any], Any] | None = PydanticUndefined, models_as_dict: bool = PydanticUndefined, **dumps_kwargs: Any) str¶
- classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self¶
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – The set of field names accepted for the Model instance.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- model_copy(*, update: dict[str, Any] | None = None, deep: bool = False) Self¶
Usage docs: https://docs.pydantic.dev/2.8/concepts/serialization/#model_copy
Returns a copy of the model.
- Parameters:
update – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.
deep – Set to True to make a deep copy of the model.
- Returns:
New model instance.
- model_dump(*, mode: Literal['json', 'python'] | str = 'python', include: Set[int] | Set[str] | Dict[int, Any] | Dict[str, Any] | None = None, exclude: Set[int] | Set[str] | Dict[int, Any] | Dict[str, Any] | None = None, context: Any | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, round_trip: bool = False, warnings: bool | Literal['none', 'warn', 'error'] = True, serialize_as_any: bool = False) dict[str, Any]¶
Usage docs: https://docs.pydantic.dev/2.8/concepts/serialization/#modelmodel_dump
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- model_dump_json(*, indent: int | None = None, include: Set[int] | Set[str] | Dict[int, Any] | Dict[str, Any] | None = None, exclude: Set[int] | Set[str] | Dict[int, Any] | Dict[str, Any] | None = None, context: Any | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, round_trip: bool = False, warnings: bool | Literal['none', 'warn', 'error'] = True, serialize_as_any: bool = False) str¶
Usage docs: https://docs.pydantic.dev/2.8/concepts/serialization/#modelmodel_dump_json
Generates a JSON representation of the model using Pydantic’s to_json method.
- Parameters:
indent – Indentation to use in the JSON output. If None is passed, the output will be compact.
include – Field(s) to include in the JSON output.
exclude – Field(s) to exclude from the JSON output.
context – Additional context to pass to the serializer.
by_alias – Whether to serialize using field aliases.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A JSON string representation of the model.
- classmethod model_json_schema(by_alias: bool = True, ref_template: str = '#/$defs/{model}', schema_generator: type[~pydantic.json_schema.GenerateJsonSchema] = <class 'pydantic.json_schema.GenerateJsonSchema'>, mode: ~typing.Literal['validation', 'serialization'] = 'validation') dict[str, Any]¶
Generates a JSON schema for a model class.
- Parameters:
by_alias – Whether to use attribute aliases or not.
ref_template – The reference template.
schema_generator – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications
mode – The mode in which to generate the schema.
- Returns:
The JSON schema for the given model class.
- classmethod model_parametrized_name(params: tuple[type[Any], ...]) str¶
Compute the class name for parametrizations of generic classes.
This method can be overridden to achieve a custom naming scheme for generic BaseModels.
- Parameters:
params – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.
- Returns:
String representing the new class where params are passed to cls as type variables.
- Raises:
TypeError – Raised when trying to generate concrete names for non-generic models.
- model_post_init(_BaseModel__context: Any) None¶
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- classmethod model_rebuild(*, force: bool = False, raise_errors: bool = True, _parent_namespace_depth: int = 2, _types_namespace: dict[str, Any] | None = None) bool | None¶
Try to rebuild the pydantic-core schema for the model.
This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.
- Parameters:
force – Whether to force the rebuilding of the model schema, defaults to False.
raise_errors – Whether to raise errors, defaults to True.
_parent_namespace_depth – The depth level of the parent namespace, defaults to 2.
_types_namespace – The types namespace, defaults to None.
- Returns:
Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.
- classmethod model_validate(obj: Any, *, strict: bool | None = None, from_attributes: bool | None = None, context: Any | None = None) Self¶
Validate a pydantic model instance.
- Parameters:
obj – The object to validate.
strict – Whether to enforce types strictly.
from_attributes – Whether to extract data from object attributes.
context – Additional context to pass to the validator.
- Raises:
ValidationError – If the object could not be validated.
- Returns:
The validated model instance.
- classmethod model_validate_json(json_data: str | bytes | bytearray, *, strict: bool | None = None, context: Any | None = None) Self¶
Usage docs: https://docs.pydantic.dev/2.8/concepts/json/#json-parsing
Validate the given JSON data against the Pydantic model.
- Parameters:
json_data – The JSON data to validate.
strict – Whether to enforce types strictly.
context – Extra variables to pass to the validator.
- Returns:
The validated Pydantic model.
- Raises:
ValueError – If json_data is not a JSON string.
- classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None) Self¶
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
context – Extra variables to pass to the validator.
- Returns:
The validated Pydantic model.
- classmethod parse_file(path: str | Path, *, content_type: str | None = None, encoding: str = 'utf8', proto: DeprecatedParseProtocol | None = None, allow_pickle: bool = False) Self¶
- classmethod parse_raw(b: str | bytes, *, content_type: str | None = None, encoding: str = 'utf8', proto: DeprecatedParseProtocol | None = None, allow_pickle: bool = False) Self¶
- classmethod schema_json(*, by_alias: bool = True, ref_template: str = '#/$defs/{model}', **dumps_kwargs: Any) str¶
- Field(default: Any = PydanticUndefined, *, default_factory: Callable[[], Any] | None = PydanticUndefined, alias: str | None = PydanticUndefined, alias_priority: int | None = PydanticUndefined, validation_alias: str | AliasPath | AliasChoices | None = PydanticUndefined, serialization_alias: str | None = PydanticUndefined, title: str | None = PydanticUndefined, field_title_generator: typing_extensions.Callable[[str, FieldInfo], str] | None = PydanticUndefined, description: str | None = PydanticUndefined, examples: list[Any] | None = PydanticUndefined, exclude: bool | None = PydanticUndefined, discriminator: str | types.Discriminator | None = PydanticUndefined, deprecated: Deprecated | str | bool | None = PydanticUndefined, json_schema_extra: JsonDict | Callable[[JsonDict], None] | None = PydanticUndefined, frozen: bool | None = PydanticUndefined, validate_default: bool | None = PydanticUndefined, repr: bool = PydanticUndefined, init: bool | None = PydanticUndefined, init_var: bool | None = PydanticUndefined, kw_only: bool | None = PydanticUndefined, pattern: str | Pattern[str] | None = PydanticUndefined, strict: bool | None = PydanticUndefined, coerce_numbers_to_str: bool | None = PydanticUndefined, gt: annotated_types.SupportsGt | None = PydanticUndefined, ge: annotated_types.SupportsGe | None = PydanticUndefined, lt: annotated_types.SupportsLt | None = PydanticUndefined, le: annotated_types.SupportsLe | None = PydanticUndefined, multiple_of: float | None = PydanticUndefined, allow_inf_nan: bool | None = PydanticUndefined, max_digits: int | None = PydanticUndefined, decimal_places: int | None = PydanticUndefined, min_length: int | None = PydanticUndefined, max_length: int | None = PydanticUndefined, union_mode: Literal['smart', 'left_to_right'] = PydanticUndefined, fail_fast: bool | None = PydanticUndefined, **extra: Unpack[_EmptyKwargs]) Any¶
Usage docs: https://docs.pydantic.dev/2.8/concepts/fields
Create a field for objects that can be configured.
Used to provide extra information about a field, either for the model schema or complex validation. Some arguments apply only to number fields (int, float, Decimal) and some apply only to str.
Note
Any _Unset objects will be replaced by the corresponding value defined in the _DefaultValues dictionary. If a key for the _Unset object is not found in the _DefaultValues dictionary, it will default to None
- Parameters:
default – Default value if the field is not set.
default_factory – A callable to generate the default value, such as
utcnow().alias – The name to use for the attribute when validating or serializing by alias. This is often used for things like converting between snake and camel case.
alias_priority – Priority of the alias. This affects whether an alias generator is used.
validation_alias – Like alias, but only affects validation, not serialization.
serialization_alias – Like alias, but only affects serialization, not validation.
title – Human-readable title.
field_title_generator – A callable that takes a field name and returns title for it.
description – Human-readable description.
examples – Example values for this field.
exclude – Whether to exclude the field from the model serialization.
discriminator – Field name or Discriminator for discriminating the type in a tagged union.
deprecated – A deprecation message, an instance of warnings.deprecated or the typing_extensions.deprecated backport, or a boolean. If True, a default deprecation message will be emitted when accessing the field.
json_schema_extra – A dict or callable to provide extra JSON schema properties.
frozen – Whether the field is frozen. If true, attempts to change the value on an instance will raise an error.
validate_default – If True, apply validation to the default value every time you create an instance. Otherwise, for performance reasons, the default value of the field is trusted and not validated.
repr – A boolean indicating whether to include the field in the __repr__ output.
init – Whether the field should be included in the constructor of the dataclass. (Only applies to dataclasses.)
init_var – Whether the field should _only_ be included in the constructor of the dataclass. (Only applies to dataclasses.)
kw_only – Whether the field should be a keyword-only argument in the constructor of the dataclass. (Only applies to dataclasses.)
coerce_numbers_to_str – Whether to enable coercion of any Number type to str (not applicable in strict mode).
strict – If True, strict validation is applied to the field. See [Strict Mode](../concepts/strict_mode.md) for details.
gt – Greater than. If set, value must be greater than this. Only applicable to numbers.
ge – Greater than or equal. If set, value must be greater than or equal to this. Only applicable to numbers.
lt – Less than. If set, value must be less than this. Only applicable to numbers.
le – Less than or equal. If set, value must be less than or equal to this. Only applicable to numbers.
multiple_of – Value must be a multiple of this. Only applicable to numbers.
min_length – Minimum length for iterables.
max_length – Maximum length for iterables.
pattern – Pattern for strings (a regular expression).
allow_inf_nan – Allow inf, -inf, nan. Only applicable to numbers.
max_digits – Maximum number of allow digits for strings.
decimal_places – Maximum number of decimal places allowed for numbers.
union_mode – The strategy to apply when validating a union. Can be smart (the default), or left_to_right. See [Union Mode](../concepts/unions.md#union-modes) for details.
fail_fast – If True, validation will stop on the first error. If False, all validation errors will be collected. This option can be applied only to iterable types (list, tuple, set, and frozenset).
extra –
(Deprecated) Extra fields that will be included in the JSON schema.
- !!! warning Deprecated
The extra kwargs is deprecated. Use json_schema_extra instead.
- Returns:
- A new [FieldInfo][pydantic.fields.FieldInfo]. The return annotation is Any so Field can be used on
type-annotated fields without causing a type error.
- Float¶
alias of
float64
- Float32¶
alias of
float32
- Double¶
alias of
float64
- Float64¶
alias of
float64
- Int64¶
alias of
int64
- Int32¶
alias of
int32
- Int16¶
alias of
int16
- Short¶
alias of
int16
- Int8¶
alias of
int8
- UInt¶
alias of
uint64
- UInt32¶
alias of
uint32
- UInt16¶
alias of
uint16
- UInt8¶
alias of
uint8
- UInt64¶
alias of
uint64
- Bool¶
alias of
bool_
- Datetime64¶
alias of
datetime64
- pydantic model CSRMatrix¶
A compressed sparse row matrix. Data are stored in the standard CSR format, where column indices for row i are stored in indices[indptr[i]:indptr[i+1]] and their corresponding values are stored in data[indptr[i]:indptr[i+1]].
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = True
use_enum_values: bool = True
- Fields:
hdf5_path (Optional[str])
- field shape: int | None = None¶
The shape (number of rows, number of columns) of this sparse matrix.
- linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)¶
- pydantic model Data¶
An abstract data type for a dataset.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = True
use_enum_values: bool = True
- Fields:
hdf5_path (Optional[str])
- linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)¶
- pydantic model Container¶
An abstract data type for a group storing collections of data and metadata. Base type for all data and metadata containers.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = True
use_enum_values: bool = True
- Fields:
hdf5_path (Optional[str])
- linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)¶
- pydantic model SimpleMultiContainer¶
A simple Container for holding onto multiple containers.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = True
use_enum_values: bool = True
- Fields:
hdf5_path (Optional[str])
- linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)¶
- pydantic model VectorData¶
An n-dimensional dataset representing a column of a DynamicTable. If used without an accompanying VectorIndex, first dimension is along the rows of the DynamicTable and each step along the first dimension is a cell of the larger table. VectorData can also be used to represent a ragged array if paired with a VectorIndex. This allows for storing arrays of varying length in a single cell of the DynamicTable by indexing into this VectorData. The first vector is at VectorData[0:VectorIndex[0]]. The second vector is at VectorData[VectorIndex[0]:VectorIndex[1]], and so on.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = True
use_enum_values: bool = True
- Fields:
- field array: NDArray[Shape['* dim0'], Any] | NDArray[Shape['* dim0, * dim1'], Any] | NDArray[Shape['* dim0, * dim1, * dim2'], Any] | NDArray[Shape['* dim0, * dim1, * dim2, * dim3'], Any] | None = None¶
- linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)¶
- pydantic model VectorIndex¶
Used with VectorData to encode a ragged array. An array of indices into the first dimension of the target VectorData, and forming a map between the rows of a DynamicTable and the indices of the VectorData. The name of the VectorIndex is expected to be the name of the target VectorData object followed by “_index”.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = True
use_enum_values: bool = True
- Fields:
- field array: NDArray[Shape['* dim0'], Any] | NDArray[Shape['* dim0, * dim1'], Any] | NDArray[Shape['* dim0, * dim1, * dim2'], Any] | NDArray[Shape['* dim0, * dim1, * dim2, * dim3'], Any] | None = None¶
- field target: VectorData | None = None¶
Reference to the target dataset that this index applies to.
- linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)¶
- pydantic model ElementIdentifiers¶
A list of unique identifiers for values within a dataset, e.g. rows of a DynamicTable.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = True
use_enum_values: bool = True
- Fields:
hdf5_path (Optional[str])
- linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)¶
- pydantic model DynamicTableRegion¶
DynamicTableRegion provides a link from one table to an index or region of another. The table attribute is a link to another DynamicTable, indicating which table is referenced, and the data is int(s) indicating the row(s) (0-indexed) of the target array. DynamicTableRegion`s can be used to associate rows with repeated meta-data without data duplication. They can also be used to create hierarchical relationships between multiple `DynamicTable`s. `DynamicTableRegion objects may be paired with a VectorIndex object to create ragged references, so a single cell of a DynamicTable can reference many rows of another DynamicTable.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = True
use_enum_values: bool = True
- Fields:
- field array: NDArray[Shape['* dim0'], Any] | NDArray[Shape['* dim0, * dim1'], Any] | NDArray[Shape['* dim0, * dim1, * dim2'], Any] | NDArray[Shape['* dim0, * dim1, * dim2, * dim3'], Any] | None = None¶
- field table: DynamicTable | None = None¶
Reference to the DynamicTable object that this region applies to.
- linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)¶
- pydantic model DynamicTable¶
A group containing multiple datasets that are aligned on the first dimension (Currently, this requirement if left up to APIs to check and enforce). These datasets represent different columns in the table. Apart from a column that contains unique identifiers for each row, there are no other required datasets. Users are free to add any number of custom VectorData objects (columns) here. DynamicTable also supports ragged array columns, where each element can be of a different size. To add a ragged array column, use a VectorIndex type to index the corresponding VectorData type. See documentation for VectorData and VectorIndex for more details. Unlike a compound data type, which is analogous to storing an array-of-structs, a DynamicTable can be thought of as a struct-of-arrays. This provides an alternative structure to choose from when optimizing storage for anticipated access patterns. Additionally, this type provides a way of creating a table without having to define a compound type up front. Although this convenience may be attractive, users should think carefully about how data will be accessed. DynamicTable is more appropriate for column-centric access, whereas a dataset with a compound type would be more appropriate for row-centric access. Finally, data size should also be taken into account. For small tables, performance loss may be an acceptable trade-off for the flexibility of a DynamicTable.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = True
use_enum_values: bool = True
- Fields:
hdf5_path (Optional[str])
- field colnames: str | None = None¶
The names of the columns in this table. This should be used to specify an order to the columns.
- field vector_data: List[VectorData] | None [Optional]¶
Vector columns, including index columns, of this dynamic table.
- linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)¶
- pydantic model AlignedDynamicTable¶
DynamicTable container that supports storing a collection of sub-tables. Each sub-table is a DynamicTable itself that is aligned with the main table by row index. I.e., all DynamicTables stored in this group MUST have the same number of rows. This type effectively defines a 2-level table in which the main data is stored in the main table implemented by this type and additional columns of the table are grouped into categories, with each category being represented by a separate DynamicTable stored within the group.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = True
use_enum_values: bool = True
- Fields:
- field children: Dict[str, DynamicTable] | None [Optional]¶
- field colnames: str | None = None¶
The names of the columns in this table. This should be used to specify an order to the columns.
- field vector_data: List[VectorData] | None [Optional]¶
Vector columns, including index columns, of this dynamic table.
- linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)¶
- pydantic model ConfiguredBaseModel¶
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = True
use_enum_values: bool = True
- Fields:
- pydantic model LinkML_Meta¶
Extra LinkML Metadata stored as a class attribute
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields: