Skip to main content

Opinionated YAML dump function for JSON serializable content.

Project description

JAMLDUMP

This library provides a to_jaml function that serializes JSON-serializable data in an arguably more readable YAML compatible fashion. The format chosen is supposed to be reproducible while avoiding the Norway-problem and it's cousins. We believe, this makes it useful for repeatedly templating the same (YAML) configuration files with the least expected surprise.

Notable features:

  • Dictionary keys need to be strings.
  • String values are always quoted (see Norway problem or versions decoded as numbers).
  • Indentation is always 2 spaces.
  • With level and embed_in, you can template a branch of a larger Yaml document.
  • When jinja2 is installed, a jinja2 filter is available.

For example usage, please take a look at the tests.

Versioning

This library follows SemVer. Its test suite specifies what is covered.

Development

This project is a case study for test driven development.

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

jamldump-1.2.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

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

jamldump-1.2.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file jamldump-1.2.0.tar.gz.

File metadata

  • Download URL: jamldump-1.2.0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":null,"id":"forky","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jamldump-1.2.0.tar.gz
Algorithm Hash digest
SHA256 d58870fe4f58efcc84cb605acbd769e1f00822e20de85b41d6ba502eb3289835
MD5 a4f3dc5f41bf3056e45dce2084e3cf6d
BLAKE2b-256 8b0bc94def171dfbfb44cad278b74a2d71f72a7bf390ed9cd6367ba2f22011d7

See more details on using hashes here.

File details

Details for the file jamldump-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: jamldump-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":null,"id":"forky","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jamldump-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfc4b9cfa247abe88445ba617e11591ea0d790e4f442701e5c280e112e5a5795
MD5 d0f555703b8961c56bbc4bdc7a85706f
BLAKE2b-256 618b2726c30ede2e2f6528040b125e45d17b905e33407366b9475c3399e75680

See more details on using hashes here.

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