create_pyarrow_schema_for_dataclass#

API documentation for tradingstrategy.utils.schema.create_pyarrow_schema_for_dataclass Python function.

create_pyarrow_schema_for_dataclass(cls, hints=None, core_mappings={<class 'int'>: <function <lambda>>, <enum 'ChainId'>: <function <lambda>>, <class 'str'>: <function <lambda>>, <class 'bool'>: <function <lambda>>, <class 'float'>: <function <lambda>>, <class 'dict'>: <function <lambda>>, <class 'list'>: <function <lambda>>})[source]#

Map a Python dataclass to Pyarrow schema.

Most fields map automatically, but you can also provide per field name hints what types they should use.

Parameters:

hints (Optional[Dict[str, DataType]]) –

Return type:

Schema