JSON to YAML Lite
A zero-dependency Python micro-tool that converts JSON strings into YAML.
It does not require PyYAML and is optimized specifically for reducing LLM token usage in prompts.
Installation
pip install json-to-yaml-lite
Usage
from json_to_yaml_lite import convert_json_to_yaml
json_schema = """
{
"employees": [
{"firstName": "John", "lastName": "Doe"},
{"firstName": "Anna", "lastName": "Smith"}
]
}
"""
print(convert_json_to_yaml(json_schema))
Output: (Token-efficient YAML)
employees:
- firstName: John
lastName: Doe
- firstName: Anna
lastName: Smith
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file json_to_yaml_lite-0.1.0.tar.gz.
File metadata
- Download URL: json_to_yaml_lite-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54237604f7f182d51ca1f9324065de566bb00db27aba64d85c45b43058ff5c38
|
|
| MD5 |
57016fa7afb08fab6a470edea0dc1682
|
|
| BLAKE2b-256 |
49110c3f7afe81db202758258d7a805ba145940ba8e7ff28410420c40ec77869
|
Provenance
The following attestation bundles were made for json_to_yaml_lite-0.1.0.tar.gz:
Publisher:
publish.yml on Encephos/json-to-yaml-lite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
json_to_yaml_lite-0.1.0.tar.gz -
Subject digest:
54237604f7f182d51ca1f9324065de566bb00db27aba64d85c45b43058ff5c38 - Sigstore transparency entry: 2596952588
- Sigstore integration time:
-
Permalink:
Encephos/json-to-yaml-lite@36277b5cd1a3a41ddd941b691ee45c0c008c46db -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Encephos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36277b5cd1a3a41ddd941b691ee45c0c008c46db -
Trigger Event:
release
-
Statement type:
File details
Details for the file json_to_yaml_lite-0.1.0-py3-none-any.whl.
File metadata
- Download URL: json_to_yaml_lite-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80ef22329445b5e5254f3b9bed2940724a4b81b41e81f21617de6c3beed685ef
|
|
| MD5 |
061147f036b7239ed1bd5bb96f867619
|
|
| BLAKE2b-256 |
a84c73e6c84eb7a1eb6fbf332e47e8f420bfc4d0ee609cefc9f86afc95230aad
|
Provenance
The following attestation bundles were made for json_to_yaml_lite-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Encephos/json-to-yaml-lite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
json_to_yaml_lite-0.1.0-py3-none-any.whl -
Subject digest:
80ef22329445b5e5254f3b9bed2940724a4b81b41e81f21617de6c3beed685ef - Sigstore transparency entry: 2596952603
- Sigstore integration time:
-
Permalink:
Encephos/json-to-yaml-lite@36277b5cd1a3a41ddd941b691ee45c0c008c46db -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Encephos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36277b5cd1a3a41ddd941b691ee45c0c008c46db -
Trigger Event:
release
-
Statement type: