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.1.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.1.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jamldump-1.1.0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","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.1.0.tar.gz
Algorithm Hash digest
SHA256 a0b9f3a718f9683056b13648af5d136bb604162f24f7cca3ac3122756138c03b
MD5 11294414f767e6c2bd026cc480bdfc77
BLAKE2b-256 bd20c00bcd54593ce121c533b878aa46edc4fdc78f8d5e25d56d96dec6568641

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jamldump-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af6bd3ba590663e4a6dff9ea05c980704f18c6aaf5d0af0140501457c2750b4f
MD5 6b67368894e9be71f75879a0d8ac8482
BLAKE2b-256 aa591ed172688516f65a02a65e1fe2b46e876f3f2b1cdad17943c0bebb76434e

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