Skip to main content

Extremely customizable serialization

Project description

serieux

(The README is a work in progress)

Serieux is a very extensible composable serialization/configuration library for Python. Based on ovld's extensive multiple dispatch and code generation, Serieux has many features and makes it possible to define many more with little interference with the rest of the system.

📋 Documentation

Features

Configuration

Serieux has many features that pertain directly to human-writable configuration:

  • Merge multiple sources: seamlessly merge information from multiple files, formats, dictionaries
  • Include files: (optional) include configuration files from configuration files to better separate concerns
  • Variable interpolation: (optional) interpolate and environment variables and data from elsewhere in the configuration
  • Encrypt fields: fields marked as Secret[T] can be set directly in the configuration and encrypted using the command serieux patch <file>
  • Dotted notation: (optional) allow keys of the form x.y.z instead of nesting data

All of the aforementioned features should work with each other (although there may still be some bugs, the more of them you combine). For instance, you can merge and encrypt fields through file inclusions, you can determine which file to include through a variable interpolation, and so on.

Types

  • Tagged types: tagged types use the $class property to determine the deserialization type
    • TaggedUnion[T1, T2, ...]: Define auto-named tagged unions of multiple types (type information goes in $class)
    • TaggedSubclass[T]: Point to any subclass of T
    • TaggedSubclass[Any]: Point to any constructor at all
  • Referenced[T]: Deserialize some_module:some_symbol into the referenced symbol
  • Lazy[T]: Proxy data of type T so that it is only loaded when accessed
  • Comment[DT, CT]: Allow data of type DT to be commented by data with type CT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

serieux-0.3.13.tar.gz (183.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

serieux-0.3.13-py3-none-any.whl (56.5 kB view details)

Uploaded Python 3

File details

Details for the file serieux-0.3.13.tar.gz.

File metadata

  • Download URL: serieux-0.3.13.tar.gz
  • Upload date:
  • Size: 183.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for serieux-0.3.13.tar.gz
Algorithm Hash digest
SHA256 8a5b54ac27bb627e1ddd1439b845095fcd1287ca337fbac3932f7cd5e7dc5c71
MD5 33a54ee695eff3b0b18a3a508c1699cd
BLAKE2b-256 c4c39e32f8261dc638404959d8ce52e694942d1d89a8cf3655af1091f303840c

See more details on using hashes here.

Provenance

The following attestation bundles were made for serieux-0.3.13.tar.gz:

Publisher: publish.yml on breuleux/serieux

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file serieux-0.3.13-py3-none-any.whl.

File metadata

  • Download URL: serieux-0.3.13-py3-none-any.whl
  • Upload date:
  • Size: 56.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for serieux-0.3.13-py3-none-any.whl
Algorithm Hash digest
SHA256 3cffff20714a5f07baba73bb8efc530e60273a7d2fa66a9bfa1e2f48b336071d
MD5 492afd55c5f500c322efb25ebe8c6ee5
BLAKE2b-256 21307803a65ed696ba8a4e7febf71b533c57c88695a61f1ec1903d59ab9aa549

See more details on using hashes here.

Provenance

The following attestation bundles were made for serieux-0.3.13-py3-none-any.whl:

Publisher: publish.yml on breuleux/serieux

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page