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

Uploaded Python 3

File details

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

File metadata

  • Download URL: jamldump-1.2.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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.1.tar.gz
Algorithm Hash digest
SHA256 fa0f77dfbfb0fd6c34edb591bf964e9aeb295a0b290c0e00bda20a50808a9c1b
MD5 8754b2ad719763d0c57b3a334d6814c1
BLAKE2b-256 ec098f4fbf9434f63ac67b7d6ba7a4a7cbe00ff1fc7afeb761c1d27df7f8ade8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jamldump-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf11728f24ed595e798b06debfb0d8087b27351567023c647e658dab95d200a2
MD5 ad18a0f770b2b7e15d34634606006cb1
BLAKE2b-256 8b8a0ff892f69ad66dbfcbcf5ebe0fbe7d8d5eb4bbdf02401030aeeb0c104ac4

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