travelkit.io.query package

Submodules

travelkit.io.query.registry module

class travelkit.io.query.registry.IORegistry

Bases: object

Central registry for importers and exporters by format.

This class maintains mappings of available importers and exporters for different data formats. It provides methods to register and retrieve these handlers, as well as convenience methods for directly dumping objects to strings and loading objects from strings in specified formats.

Attributes:

importers (dict): Mapping of format strings to importer instances. exporters (dict): Mapping of format strings to exporter instances.

get_exporter(fmt)
get_importer(fmt)
load(data, fmt)
Return type:

dict

register_exporter(fmt, exporter)
register_importer(fmt, importer)
save(obj, fmt)
Return type:

str

Module contents