Package gavo :: Package utils :: Module serializers
[frames] | no frames]

Module serializers

source code

A framework for pluggable serialisation of (python) values.

This module collects a set of basic (looking primarily towards VOTables) serialiser factories. These are just functions receiving AnnotatedColumn objects and returning either None ("not responsible") or a function taking a value and returning a string. They may change the AnnotatedColumn objects, for instance, when an MJD (float) becomes a datetime.

These factories are registered in ValueMapperFactoryRegistry classes; the one used for "normal" VOTables is the defaultMFRegistry.

Most factories are created here. However, some depend on advance functionality not available here; they will be registered on import of the respective modules (for instance, stc).

In DaCHS, a second such factory registry is created in web.htmltable.

Classes
  ValueMapperFactoryRegistry
An object clients can ask for functions fixing up values for encoding.
  AnnotatedColumn
A collection of annotations for a column.
Functions
 
registerDefaultMF(factory) source code
 
getMapperRegistry()
returns a copy of the default value mapper registry.
source code
Variables
  defaultMFRegistry = <gavo.utils.serializers.ValueMapperFactory...
  GEOMETRY_ARRAY_TYPES = set(['sbox', 'scircle', 'spoint', 'spol...
  __package__ = 'gavo.utils'
Variables Details

defaultMFRegistry

Value:
<gavo.utils.serializers.ValueMapperFactoryRegistry object>

GEOMETRY_ARRAY_TYPES

Value:
set(['sbox', 'scircle', 'spoint', 'spoly'])