Skip to main content

Reading, checking and writing YAML from Python

Project description

Documentation Build Status Build Status Codacy Grade Code Coverage Requirements Status https://zenodo.org/badge/147202299.svg https://img.shields.io/badge/rsd-yatiml-00a3e3.svg

YAtiML

YAML-based file formats can be very handy, as YAML is easy to write by humans, and parsing support for it is widely available. Just read your YAML file into a document structure (a tree of nested dicts and lists), and manipulate that in your code.

As long as that YAML file contains exactly what you expect, that works fine. But if it contains a mistake, then you’re likely to crash the program with a cryptic error message, or worse (especially if the YAML file was loaded from the Internet) it may do something unexpected.

To avoid that, you can validate your YAML using various schema checkers. You write a description of what your YAML file must look like, then feed that to a library which checks the incoming file against the description. That gives you a better error message, but it’s a lot of work.

YAtiML takes a different approach. Instead of a schema, you write a Python class. You probably already know how to do that, so no need to learn anything. YAtiML then generates loading and dumping functions for you, which convert between YAML and Python objects. If needed, you can add some extra code to make the YAML look nicer or implement special features.

YAtiML supports Python 3.6 and later.

If you use YAtiML for scientific work, we ask that you cite it. You can download a citation in various formats at the Research Software Directory.

Documentation and Help

Instructions on how to install and use YAtiML can be found in the YAtiML documentation.

Code of Conduct

Before describing where to ask questions or report bugs, we’d like to point out that this project is governed by a code of conduct, as described in CODE_OF_CONDUCT.rst, and we expect you to adhere to it. Please be nice to your fellow humans.

Questions

If you have a question that the documentation does not answer for you, then you have found a bug in the documentation. We’d love to fix it, but we need a bit of help from you to do so. Please do the following:

  1. use the search functionality to see if someone already filed the same issue;

  2. if your issue search did not yield any relevant results, make a new issue;

  3. apply the “Question” label; apply other labels when relevant.

We’ll answer your question, and improve the documentation where necessary.

Bugs

Like most software, YAtiML is made by humans, and we make mistakes. If you think you’ve found a bug in YAtiML, please let us know! Reporting bugs goes as follows.

  1. Use the search functionality to see if someone already filed the same issue.

  2. If your issue search did not yield any relevant results, make a new issue.

    Please explain:
    • what you were trying to achieve,

    • what you did to make that happen,

    • what you expected the result to be,

    • what happened instead.

It really helps to have the actual code for a simple example that demonstrates the issue, but excerpts and error messages and a description are welcome too.

  1. Finally, apply any relevant labels to the newly created issue.

With that, we should be able to fix the problem.

License

YAtiML is Copyright 2018-2022, Netherlands eScience Center, University of Amsterdam, and VU University Amsterdam

Distributed under the Apache Software License 2.0.

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

yatiml-0.9.0.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

yatiml-0.9.0-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

Details for the file yatiml-0.9.0.tar.gz.

File metadata

  • Download URL: yatiml-0.9.0.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9

File hashes

Hashes for yatiml-0.9.0.tar.gz
Algorithm Hash digest
SHA256 3e55a37ba005ca2de2c854dcc6098f3a156a1781f047b5d2b3f5028396c66da6
MD5 3d9b7335ead7b19278997b63a2c9beb0
BLAKE2b-256 4223f679f6404ba944e28eb63ff8736ff8958bfcd0ec6095f1542ed476496794

See more details on using hashes here.

File details

Details for the file yatiml-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: yatiml-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 38.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9

File hashes

Hashes for yatiml-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43eb0b0882f92eb1693ecbde25920a69e000107a81fee0f9af1c424ed061a074
MD5 b4dbb0e824c2d41b24d8bcca44904d8d
BLAKE2b-256 ddcb704dd3810d1e28946899152c1ff61a0a489a074050c6eb8f21a59133efa5

See more details on using hashes here.

Supported by

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