base
Classes:
Statement of equivalence between two things, potentially with some translation or parameterization, such that a base type can be written to. |
|
Metaclass for mapping base types to another format. |
|
Create a representation of a given Schema |
Functions:
|
Get the "inner" type of a model field, sans Optionals and Unions and the like |
- pydantic model Interface_Map[source]
Bases:
autopilot.root.Autopilot_Type
Statement of equivalence between two things, potentially with some translation or parameterization, such that a base type can be written to.
Show JSON schema
{ "title": "Interface_Map", "description": "Statement of equivalence between two things, potentially with some\ntranslation or parameterization, such that a base type can be written\nto.", "type": "object", "properties": { "equals": { "title": "Equals" }, "args": { "title": "Args", "type": "array", "items": {} }, "kwargs": { "title": "Kwargs", "type": "object" } } }
- field equals: Type [Required]
- field args: Optional[List] = None
- field kwargs: Optional[Dict] = None
- field conversion: Optional[Callable] = None
- pydantic model Interface_Mapset[source]
Bases:
autopilot.root.Autopilot_Type
Metaclass for mapping base types to another format.
Each field can be a Type (if it is instantiated without arguments, or can use the
Interface_Map
to specify them.The special types
group
andnode
correspond toGroup
andNode
classes, for when a given interface needs to do something to create an abstract representation of a group or node in a schema’s hierarchy.Todo
This will need to be generalized, eg. NWB doesn’t need a mapping between types and objects, but mappings between annotated types and paths (eg. something within the /data/trial_data makes a behavioral series, etc).
Show JSON schema
{ "title": "Interface_Mapset", "description": "Metaclass for mapping base types to another format.\n\nEach field can be a Type (if it is instantiated without arguments, or\ncan use the :class:`.Interface_Map` to specify them.\n\nThe special types ``group`` and ``node`` correspond to\n:class:`~.data.modeling.base.Group` and :class:`~.data.modeling.base.Node`\nclasses, for when a given interface needs to do something to create an\nabstract representation of a group or node in a schema's hierarchy.\n\n.. todo::\n\n This will need to be generalized, eg. NWB doesn't need a mapping between types and objects,\n but mappings between annotated types and paths (eg. something within the `/data/trial_data` makes\n a behavioral series, etc).", "type": "object", "properties": { "bool": { "title": "Bool" }, "int": { "title": "Int" }, "float": { "title": "Float" }, "str": { "title": "Str" }, "bytes": { "title": "Bytes" }, "datetime": { "title": "Datetime" }, "group": { "title": "Group" }, "node": { "title": "Node" } } }
- Fields
bool (Union[autopilot.data.interfaces.base.Interface_Map, Type])
bytes (Optional[Union[autopilot.data.interfaces.base.Interface_Map, Type]])
datetime (Union[autopilot.data.interfaces.base.Interface_Map, Type])
float (Union[autopilot.data.interfaces.base.Interface_Map, Type])
group (Optional[Union[autopilot.data.interfaces.base.Interface_Map, Type]])
int (Union[autopilot.data.interfaces.base.Interface_Map, Type])
node (Optional[Union[autopilot.data.interfaces.base.Interface_Map, Type]])
str (Union[autopilot.data.interfaces.base.Interface_Map, Type])
- field bool: Union[autopilot.data.interfaces.base.Interface_Map, Type] [Required]
- field int: Union[autopilot.data.interfaces.base.Interface_Map, Type] [Required]
- field float: Union[autopilot.data.interfaces.base.Interface_Map, Type] [Required]
- field str: Union[autopilot.data.interfaces.base.Interface_Map, Type] [Required]
- field bytes: Optional[Union[autopilot.data.interfaces.base.Interface_Map, Type]] = None
- field datetime: Union[autopilot.data.interfaces.base.Interface_Map, Type] [Required]
- field group: Optional[Union[autopilot.data.interfaces.base.Interface_Map, Type]] = None
- field node: Optional[Union[autopilot.data.interfaces.base.Interface_Map, Type]] = None
- pydantic model Interface[source]
Bases:
autopilot.root.Autopilot_Type
Create a representation of a given Schema
Show JSON schema
{ "title": "Interface", "description": "Create a representation of a given Schema", "type": "object", "properties": { "map": { "title": "Map" }, "schema": { "$ref": "#/definitions/Schema" } }, "required": [ "schema" ], "definitions": { "Schema": { "title": "Schema", "description": "A special type of type intended to be a representation of an\nabstract structure/schema of data, rather than a live container of\ndata objects themselves. This class is used for constructing data containers,\ntranslating between formats, etc. rather than momentary data handling", "type": "object", "properties": {} } } }
- Fields
- field map: autopilot.data.interfaces.base.Interface_Mapset [Required]
- field schema_: autopilot.data.modeling.base.Schema [Required] (alias 'schema')