Models

class 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.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class ReftypeOptions(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
ref = 'ref'
reference = 'reference'
object = 'object'
region = 'region'
class QuantityEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
ASTERISK = '*'
QUESTION_MARK = '?'
PLUS_SIGN = '+'
zero_or_many = 'zero_or_many'
one_or_many = 'one_or_many'
zero_or_one = 'zero_or_one'
class FlatDtype(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
float = 'float'
float32 = 'float32'
double = 'double'
float64 = 'float64'
long = 'long'
int64 = 'int64'
int = 'int'
int32 = 'int32'
int16 = 'int16'
short = 'short'
int8 = 'int8'
uint = 'uint'
uint32 = 'uint32'
uint16 = 'uint16'
uint8 = 'uint8'
uint64 = 'uint64'
numeric = 'numeric'
text = 'text'
utf = 'utf'
utf8 = 'utf8'
utf_8 = 'utf-8'
ascii = 'ascii'
bool = 'bool'
isodatetime = 'isodatetime'
class Namespace

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.

doc: str
name: str
full_name: str | None
version: str
date: datetime | None
author: List[str] | str
contact: List[str] | str
schema_: List[Schema] | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'author': FieldInfo(annotation=Union[List[str], str], required=False, default_factory=list, description='List of strings with the names of the authors of the namespace.'), 'contact': FieldInfo(annotation=Union[List[str], str], required=False, default_factory=list, description='List of strings with the contact information for the authors. Ordering of the contacts should match the ordering of the authors.'), 'date': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='Date that a namespace was last modified or released'), 'doc': FieldInfo(annotation=str, required=True, description='Description of corresponding object.'), 'full_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Optional string with extended full name for the namespace.'), 'name': FieldInfo(annotation=str, required=True), 'schema_': FieldInfo(annotation=Union[List[Schema], NoneType], required=False, default_factory=list, alias='schema', alias_priority=2, description='List of the schema to be included in this namespace.'), 'version': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class Namespaces

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.

namespaces: List[Namespace] | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'namespaces': FieldInfo(annotation=Union[List[Namespace], NoneType], required=False, default_factory=list)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class Schema

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.

source: str | None
namespace: str | None
title: str | None
neurodata_types: List[Dataset | Group] | None
doc: str | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'doc': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'namespace': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='describes a named reference to another namespace. In contrast to source, this is a reference by name to a known namespace (i.e., the namespace is resolved during the build and must point to an already existing namespace). This mechanism is used to allow, e.g., extension of a core namespace (here the NWB core namespace) without requiring hard paths to the files describing the core namespace. Either source or namespace must be specified, but not both.'), 'neurodata_types': FieldInfo(annotation=Union[List[Union[Dataset, Group]], NoneType], required=False, default_factory=list, description='an optional list of strings indicating which data types should be included from the given specification source or namespace. The default is null indicating that all data types should be included.'), 'source': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='describes the name of the YAML (or JSON) file with the schema specification. The schema files should be located in the same folder as the namespace file.'), 'title': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='a descriptive title for a file for documentation purposes.')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class 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.

neurodata_type_def: str | None
neurodata_type_inc: str | None
name: str | None
default_name: str | None
doc: str
quantity: QuantityEnum | int | None
linkable: bool | None
attributes: List[Attribute] | None
datasets: List[Dataset] | None
groups: List[Group] | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'attributes': FieldInfo(annotation=Union[List[Attribute], NoneType], required=False, default_factory=list), 'datasets': FieldInfo(annotation=Union[List[Dataset], NoneType], required=False, default_factory=list), 'default_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'doc': FieldInfo(annotation=str, required=True, description='Description of corresponding object.'), 'groups': FieldInfo(annotation=Union[List[Group], NoneType], required=False, default_factory=list), 'linkable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'links': FieldInfo(annotation=Union[List[Link], NoneType], required=False, default_factory=list), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'neurodata_type_def': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Used alongside neurodata_type_inc to indicate inheritance, naming, and mixins'), 'neurodata_type_inc': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Used alongside neurodata_type_def to indicate inheritance, naming, and mixins'), 'quantity': FieldInfo(annotation=Union[QuantityEnum, int, NoneType], required=False, default=1)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class Groups

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.

groups: List[Group] | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'groups': FieldInfo(annotation=Union[List[Group], NoneType], required=False, default_factory=list)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

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.

name: str | None
doc: str
target_type: str
quantity: QuantityEnum | int | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'doc': FieldInfo(annotation=str, required=True, description='Description of corresponding object.'), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'quantity': FieldInfo(annotation=Union[QuantityEnum, int, NoneType], required=False, default=1), 'target_type': FieldInfo(annotation=str, required=True, description='Describes the neurodata_type of the target that the reference points to')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class Datasets

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.

datasets: List[Dataset] | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'datasets': FieldInfo(annotation=Union[List[Dataset], NoneType], required=False, default_factory=list)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class ReferenceDtype(*, target_type: str, reftype: ReftypeOptions | None = None)

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.

target_type: str
reftype: ReftypeOptions | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'reftype': FieldInfo(annotation=Union[ReftypeOptions, NoneType], required=False, default=None, description='describes the kind of reference'), 'target_type': FieldInfo(annotation=str, required=True, description='Describes the neurodata_type of the target that the reference points to')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class CompoundDtype(*, name: str, doc: str, dtype: FlatDtype | ReferenceDtype)

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.

name: str
doc: str
dtype: FlatDtype | ReferenceDtype
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'doc': FieldInfo(annotation=str, required=True, description='Description of corresponding object.'), 'dtype': FieldInfo(annotation=Union[FlatDtype, ReferenceDtype], required=True), 'name': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class DtypeMixin(*, dtype: List[CompoundDtype] | FlatDtype | ReferenceDtype | None = None)

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.

dtype: List[CompoundDtype] | FlatDtype | ReferenceDtype | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'dtype': FieldInfo(annotation=Union[List[CompoundDtype], FlatDtype, ReferenceDtype, NoneType], required=False, default_factory=list)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class Attribute(*, dtype: List[CompoundDtype] | FlatDtype | ReferenceDtype | None = None, name: str, dims: List[Any | str] | None = None, shape: List[Any | int | str] | None = None, value: Any | None = None, default_value: Any | None = None, doc: str, required: bool | None = True)

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.

name: str
dims: List[Any | str] | None
shape: List[Any | int | str] | None
value: Any | None
default_value: Any | None
doc: str
required: bool | None
dtype: List[CompoundDtype] | FlatDtype | ReferenceDtype | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'default_value': FieldInfo(annotation=Union[Any, NoneType], required=False, default=None, description='Optional default value for variable-valued attributes.'), 'dims': FieldInfo(annotation=Union[List[Union[Any, str]], NoneType], required=False, default_factory=list), 'doc': FieldInfo(annotation=str, required=True, description='Description of corresponding object.'), 'dtype': FieldInfo(annotation=Union[List[CompoundDtype], FlatDtype, ReferenceDtype, NoneType], required=False, default_factory=list), 'name': FieldInfo(annotation=str, required=True), 'required': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True, description='Optional boolean key describing whether the attribute is required. Default value is True.'), 'shape': FieldInfo(annotation=Union[List[Union[Any, int, str]], NoneType], required=False, default_factory=list), 'value': FieldInfo(annotation=Union[Any, NoneType], required=False, default=None, description='Optional constant, fixed value for the attribute.')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class Dataset(*, dtype: List[CompoundDtype] | FlatDtype | ReferenceDtype | None = None, neurodata_type_def: str | None = None, neurodata_type_inc: str | None = None, name: str | None = None, default_name: str | None = None, dims: List[Any | str] | None = None, shape: List[Any | int | str] | None = None, value: Any | None = None, default_value: Any | None = None, doc: str, quantity: QuantityEnum | int | None = 1, linkable: bool | None = None, attributes: List[Attribute] | None = None)

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.

neurodata_type_def: str | None
neurodata_type_inc: str | None
name: str | None
default_name: str | None
dims: List[Any | str] | None
shape: List[Any | int | str] | None
value: Any | None
default_value: Any | None
doc: str
quantity: QuantityEnum | int | None
linkable: bool | None
attributes: List[Attribute] | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'attributes': FieldInfo(annotation=Union[List[Attribute], NoneType], required=False, default_factory=list), 'default_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'default_value': FieldInfo(annotation=Union[Any, NoneType], required=False, default=None, description='Optional default value for variable-valued attributes.'), 'dims': FieldInfo(annotation=Union[List[Union[Any, str]], NoneType], required=False, default_factory=list), 'doc': FieldInfo(annotation=str, required=True, description='Description of corresponding object.'), 'dtype': FieldInfo(annotation=Union[List[CompoundDtype], FlatDtype, ReferenceDtype, NoneType], required=False, default_factory=list), 'linkable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'neurodata_type_def': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Used alongside neurodata_type_inc to indicate inheritance, naming, and mixins'), 'neurodata_type_inc': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Used alongside neurodata_type_def to indicate inheritance, naming, and mixins'), 'quantity': FieldInfo(annotation=Union[QuantityEnum, int, NoneType], required=False, default=1), 'shape': FieldInfo(annotation=Union[List[Union[Any, int, str]], NoneType], required=False, default_factory=list), 'value': FieldInfo(annotation=Union[Any, NoneType], required=False, default=None, description='Optional constant, fixed value for the attribute.')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

dtype: List[CompoundDtype] | FlatDtype | ReferenceDtype | None