Skip to main content

This package is a set of extensions to colander especially useful when implementing REST APIs.

Strict types

The colander_tools.strict module includes a series of strict types. Those types follow the Postel’s law: they are strict on serialize and loose on deserialize.

Included are:

  • Integer

  • Float

  • Boolean

  • String

  • Mapping

Byte types

The colander_tools.bytes module includes types serializing / deserializing encoded binary data.

Included are:

  • Base16Bytes

  • Base32Bytes

  • Base64Bytes

  • URLSafeBase64Bytes

Open mappings

The colander_tools.mapping module includes two Mapping subclasses that allow and validate arbitrary keys in addition to the values.

Included are:

  • OpenMapping: a mapping that allows you to specify the type of keys and the type of values separately;

  • SortedOpenMapping: an extension of OpenMapping that conserve the order of keys by deserializing to collections.OrderedDict.

Network addresses types

The colander_tools.netaddr module includes a series of types that serializes and deserializes network addresses (IP addresses, MAC addresses, etc.), powered by the netaddr package.

Null types

The colander_tools.null module includes a wrapper type that allows None as a value.

Serializable classes

The colander_tools.serializable module includes tools to bind Python classes to their schema.

Schema inheritance / sub-schemas

The colander_tools.subschema module includes tools to build schemas of things that can have different types / classes.

Timezone type

The colander_tools.timezone module includes a type for serializing and deserializing timezone identifiers like Europe/Amsterdam or Asia/Hong_Kong, powered by the pytz package.

Metadata

Release files for colander-tools 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colander-tools 0.13.0
File Size Uploaded
colander_tools-0.13.0.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for colander-tools 0.13.0
File Interpreter ABI Platform
colander_tools-0.13.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 21.2 kB

Release files / colander_tools-0.13.0.tar.gz

Download URL colander_tools-0.13.0.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f0eb89f426d207514c31b5d1927e8729f740956552d1bb295844194560da45bf
BLAKE2b-256 checksum
How to use checksums
bbbe894cce3d1ee234941e1eb7f853dc935fb30fa1c59631104357630282dba5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / colander_tools-0.13.0-py2.py3-none-any.whl

Download URL colander_tools-0.13.0-py2.py3-none-any.whl
Size 11.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5bf6bae174dae88706c30ebe243f76f3d0f03c799f21debe40c8f660aae54252
BLAKE2b-256 checksum
How to use checksums
58d1834359a8b659416418b2ca659d926a40f19966e108696eaf820bf9ee2e6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release history Release notifications | RSS feed

This release

0.13.0 This release

2 release files

0.12.0

1 release file

0.11.0

1 release file

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

1 release file

0.6.1

1 release file

0.6.0

2 release files

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page