tables
Interfaces for pytables and hdf5 generally
Classes:
Base class for H5F Nodes |
|
Description of a pytables group and its location |
|
Functions:
|
Make a table description from the type annotations in a model |
|
Make a pydantic |
- pydantic model H5F_Node[source]
Bases:
autopilot.data.modeling.base.Node
Base class for H5F Nodes
Show JSON schema
{ "title": "H5F_Node", "description": "Base class for H5F Nodes", "type": "object", "properties": { "path": { "title": "Path", "type": "string" }, "title": { "title": "Title", "default": "", "type": "string" }, "filters": { "title": "Filters" }, "attrs": { "title": "Attrs", "type": "object" } }, "required": [ "path" ] }
- Config
arbitrary_types_allowed: bool = True
- Fields
- field filters: Optional[tables.filters.Filters] = None
- pydantic model H5F_Group[source]
Bases:
autopilot.data.interfaces.tables.H5F_Node
Description of a pytables group and its location
Show JSON schema
{ "title": "H5F_Group", "description": "Description of a pytables group and its location", "type": "object", "properties": { "path": { "title": "Path", "type": "string" }, "title": { "title": "Title", "default": "", "type": "string" }, "filters": { "title": "Filters" }, "attrs": { "title": "Attrs", "type": "object" }, "children": { "title": "Children" } }, "required": [ "path" ] }
- Config
arbitrary_types_allowed: bool = True
- Fields
- field children: Optional[List[Union[autopilot.data.interfaces.tables.H5F_Node, H5F_Group]]] = None
- pydantic model H5F_Table[source]
Bases:
autopilot.data.interfaces.tables.H5F_Node
Show JSON schema
{ "title": "H5F_Table", "description": "Base class for H5F Nodes", "type": "object", "properties": { "path": { "title": "Path", "type": "string" }, "title": { "title": "Title", "default": "", "type": "string" }, "filters": { "title": "Filters" }, "attrs": { "title": "Attrs", "type": "object" }, "description": { "title": "Description" }, "expectedrows": { "title": "Expectedrows", "default": 10000, "type": "integer" } }, "required": [ "path" ] }
- Config
fields: dict = {‘description’: {‘exclude’: True}}
- Fields
- field description: tables.description.MetaIsDescription [Required]
- pydantic model Tables_Interface[source]
Bases:
autopilot.data.interfaces.base.Interface
Show JSON schema
{ "title": "Tables_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 = Interface_Mapset(bool=<class 'tables.description.Col._subclass_from_prefix.<locals>.NewCol'>, int=<class 'tables.description.Col._subclass_from_prefix.<locals>.NewCol'>, float=<class 'tables.description.Col._subclass_from_prefix.<locals>.NewCol'>, str=Interface_Map(equals=<class 'tables.description.Col._subclass_from_prefix.<locals>.NewCol'>, args=[1024], kwargs=None, conversion=None), bytes=Interface_Map(equals=<class 'tables.description.Col._subclass_from_prefix.<locals>.NewCol'>, args=[1024], kwargs=None, conversion=None), datetime=Interface_Map(equals=<class 'tables.description.Col._subclass_from_prefix.<locals>.NewCol'>, args=[1024], kwargs=None, conversion=<function <lambda> at 0x7fa92c05cdc0>), group=<class 'autopilot.data.interfaces.tables.H5F_Group'>, node=None)
- make(h5f: tables.file.File) bool [source]
Make a given schema using the interface mapping given.
- Returns
True
if successful- Return type
- field schema_: autopilot.data.modeling.base.Schema [Required] (alias 'schema')
- model_to_description(table: Type[Table]) Type[tables.description.IsDescription] [source]
Make a table description from the type annotations in a model
- Parameters
table (
modeling.base.Table
) – Table description- Returns
tables.IsDescription
- description_to_model(description: Type[tables.description.IsDescription], cls: Type[Table]) Table [source]
Make a pydantic
modeling.base.Table
from atables.IsDescription
- Parameters
description (
tables.IsDescription
) – to convertcls (
modeling.base.Table
) – Subclass of Table to make
- Returns
Subclass of Table