Outbound Format Registrar¶
Registrar: an object to manage registrations of outbound data formats.
InteractiveSession instance uses its own
Manage registrations of data formats for production during outbound conversion.
This class does not manage format conversion. This class accepts registrations and unregistrations, and also produces a list of the formats that are currently registered.
The “who” part of registrations allows Lychee to disambiguate multiple interface components that require data in the same format. If one component registers without a
whoargument, and another component unregisters without a
Registrarcannot know that these actions were requested by different components. However, if each interface component uses a unique “who” argument,
Registrarwill ensure the data format is always produced until all registered components have unregistered themselves.
Return a list of the formats that are currently registered for outbound conversion.
Returns: The list. Return type: list of str
register(dtype, who=None, outbound=False, **kwargs)¶
Register a format for outbound conversion.
dtypedoes not have a converter listed in
lychee.converters.OUTBOUND_CONVERTERS, the format will not be registered and WARN message will be written to the log.
unregister(dtype, who=None, **kwargs)¶
Unregister a format from outbound conversion.
whocombination are not currently registered for outbound conversion, a DEBUG message will be written to the log.