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.14.tar.gz (191.7 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.14-py3-none-any.whl (56.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for serieux-0.3.14.tar.gz
Algorithm Hash digest
SHA256 9dad5e96f8df45a2118ac1a0689421461eb3d44df16a081419affc637937addf
MD5 7cdc93eba6dd23dcd8df1e85e61d20a5
BLAKE2b-256 a50ae3a4644bee274ac81b3bf78232701acf289902eec6a55e87fe8ef2ea78c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for serieux-0.3.14.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.14-py3-none-any.whl.

File metadata

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

File hashes

Hashes for serieux-0.3.14-py3-none-any.whl
Algorithm Hash digest
SHA256 b2af7519706488a7444761c5cc190841546afe5035b2729f41d1928126a21c5f
MD5 b38d4cfdc2002dd20338e95595588bc3
BLAKE2b-256 5533defe7ca43b0aae80e959063b04d564723b7b1b8f3f631adb29ede5a6bb8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for serieux-0.3.14-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