# cattr.preconf package

## Submodules

## cattr.preconf.bson module

Preconfigured converters for bson.

cattr.preconf.bson.configure_converter(converter)

  Configure the converter for use with the bson library.

  - sets are serialized as lists

  - non-string mapping keys are coerced into strings when unstructuring

  Parameters

    converter (cattr.converters.GenConverter) –

cattr.preconf.bson.make_converter(*args, **kwargs)
  Return type

    cattr.converters.GenConverter

## cattr.preconf.json module

Preconfigured converters for the stdlib json.

cattr.preconf.json.configure_converter(converter)

  Configure the converter for use with the stdlib json module.

  - bytes are serialized as base64 strings

  - datetimes are serialized as ISO 8601

  - counters are serialized as dicts

  - sets are serialized as lists

  Parameters

    converter (cattr.converters.Converter) –

cattr.preconf.json.make_converter(*args, **kwargs)
  Return type

    cattr.converters.GenConverter

## cattr.preconf.msgpack module

Preconfigured converters for msgpack.

cattr.preconf.msgpack.configure_converter(converter)

  Configure the converter for use with the msgpack library.

  - datetimes are serialized as timestamp floats

  - sets are serialized as lists

  Parameters

    converter (cattr.converters.GenConverter) –

cattr.preconf.msgpack.make_converter(*args, **kwargs)
  Return type

    cattr.converters.GenConverter

## cattr.preconf.orjson module

Preconfigured converters for orjson.

cattr.preconf.orjson.configure_converter(converter)

  Configure the converter for use with the orjson library.

  - bytes are serialized as base85 strings

  - datetimes are serialized as ISO 8601

  - sets are serialized as lists

  - string enum mapping keys have special handling

  - mapping keys are coerced into strings when unstructuring

  Parameters

    converter (cattr.converters.GenConverter) –

cattr.preconf.orjson.make_converter(*args, **kwargs)
  Return type

    cattr.converters.GenConverter

## cattr.preconf.pyyaml module

Preconfigured converters for pyyaml.

cattr.preconf.pyyaml.configure_converter(converter)

  Configure the converter for use with the pyyaml library.

  - frozensets are serialized as lists

  - string enums are converted into strings explicitly

  Parameters

    converter (cattr.converters.GenConverter) –

cattr.preconf.pyyaml.make_converter(*args, **kwargs)
  Return type

    cattr.converters.GenConverter

## cattr.preconf.tomlkit module

Preconfigured converters for tomlkit.

cattr.preconf.tomlkit.configure_converter(converter)

  Configure the converter for use with the tomlkit library.

  - bytes are serialized as base85 strings

  - sets are serialized as lists

  - tuples are serializas as lists

  - mapping keys are coerced into strings when unstructuring

  Parameters

    converter (cattr.converters.GenConverter) –

cattr.preconf.tomlkit.make_converter(*args, **kwargs)
  Return type

    cattr.converters.GenConverter

## cattr.preconf.ujson module

Preconfigured converters for ujson.

cattr.preconf.ujson.configure_converter(converter)

  Configure the converter for use with the ujson library.

  - bytes are serialized as base64 strings

  - datetimes are serialized as ISO 8601

  - sets are serialized as lists

  Parameters

    converter (cattr.converters.Converter) –

cattr.preconf.ujson.make_converter(*args, **kwargs)
  Return type

    cattr.converters.GenConverter

## Module contents

cattr.preconf.validate_datetime(v, _)