finsec.serializer module#

finsec.serializer.dict_decode(obj_dict: Dict[Any, Any]) Security[source]#

Converts dict into a security.

finsec.serializer.dict_encode(security: Security) Dict[source]#

Converts security into dict.

finsec.serializer.get_constructor(obj_dict: Dict[Any, Any]) Callable[[...], Security] | None[source]#

Infers the necessary constructor from the dict provided, and returns that constructor.

finsec.serializer.get_constructor_from_types(security_type: SecurityType, security_subtype: SecuritySubtype) Callable[[...], Security][source]#

Returns the constructor which builds a security from a dict of kwargs.

finsec.serializer.json_decode(obj_json: str) Security[source]#

Converts json string into a security.

finsec.serializer.json_encode(security: Security) str[source]#

Converts security into json string.