ymlref: load Yaml documents with possibility to resolve references.
ymlref is a library that allows you to load Yaml documents and resolve JSON-pointer references inside them.
Usage example
import ymlref
DOCUMENT = """
authors:
shakespear:
first_name: William
last_name: Shakespear
dostoevsky:
first_name: Fyodor
last_name: Dostoevsky
books:
- title: Makbet
author:
$ref: "#/authors/shakespear"
- title: Crime and punishment
author:
$ref: "#/authors/dostoevsky"
"""
doc = ymlref.loads(DOCUMENT)
print('Books in document: \n')
for book in doc['books']:
print(book['title'])
print('Author: ' + book['author']['first_name'] + ' ' + book['author']['last_name'])
print('---')
Exposed API
ymlref provides two functions: load and loads. The first one loads document from file-like object, while the second one loads document from str object.
Metadata
Release files for ymlref 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ymlref-0.1.1.tar.gz | 10.6 kB | Without provenance | Details |
Release files / ymlref-0.1.1.tar.gz
| Download URL | ymlref-0.1.1.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b9af91f90e6723f088d7a800063f70a130e50263bcdc6aecefca816f7e5cd8c
|
|
BLAKE2b-256 checksum How to use checksums |
abfc06a56dc247fef274fd2fbdd792cf9e78149763afab56f7e92a0bf9076035
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ymlref 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.