Official Python parser for YINI, an INI-inspired, indentation-insensitive configuration format with clear nested sections and explicit structure.
Project description
yini-parser-python
The official Python parser for YINI (by the YINI-lang project) — a human-readable, INI-inspired, indentation-insensitive configuration format with clear nested sections, explicit structure, comments, and predictable parsing.
Status: Alpha (
0.1.0a1).
This parser is intended for early testing and integration. The public API and edge-case behavior may still change before1.0.0.
Installation
Install from PyPI:
pip install yini-parser
The package name on PyPI is:
yini-parser
The Python import name is:
import yini_parser
Quick Start
Example YINI file:
// A small, practical YINI config.
// The App section starts here.
^ App
name = "Demo App"
version = 1.2
features = ["search", "logs"]
debug = false // on/off, yes/no would work too.
pageSize = 25
// Another section, nested under App.
^^ Server
host = "localhost"
port = 8080 # Can comment with # too.
useTLS = off
Parse a YINI file:
from yini_parser import load
data = load("sample/basic.yini")
print(data["App"]["name"]) # Demo App
print(data["App"]["Server"]["port"]) # 8080
Parse a YINI string:
from yini_parser import loads
data = loads("""
^ App
name = "Demo App"
version = 1.2
debug = false
""")
print(data["App"]["name"]) # Demo App
Use load(...) to parse a file and loads(...) to parse a string.
See the YINI specification and documentation.
Examples
Runnable example projects are available in the YINI demo apps repository.
The Python examples show how to install yini-parser, load .yini files, and access parsed configuration data in small practical scripts.
Development
For local development:
python -m pip install -e ".[dev]"
or, if using the project Taskfile:
task install-dev
Tests
The tests/ directory contains a focused implementation-local test suite, including:
- Tests for the public API.
- Key semantic tests.
- Smoke/golden tests.
- Parser behavior tests for comments, values, sections, strict mode, conflicts, inline objects, and string concatenation.
Run the test suite with:
python -m pytest -v
or, if using the project Taskfile:
task test
Run the full project check with:
task check
Links
^YINI ≡
YINI is a human-readable, INI-inspired, indentation-insensitive configuration format with clear nested sections, explicit structure, and predictable parsing.
It has a formal specification and a defined grammar.
Project details
Release history Release notifications | RSS feed
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 yini_parser-0.1.0a2.tar.gz.
File metadata
- Download URL: yini_parser-0.1.0a2.tar.gz
- Upload date:
- Size: 38.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca948a5f8b1c78315b17c84d71c0e59bba84807d0acbc2265f97140ae6f85830
|
|
| MD5 |
6531fd96d9845f199b47a13d7ff3d6fd
|
|
| BLAKE2b-256 |
fd0543a97f9744abdef5c13f793a31579f9c453c4f205f1c624e723c7d53303b
|
Provenance
The following attestation bundles were made for yini_parser-0.1.0a2.tar.gz:
Publisher:
publish-to-pypi.yml on YINI-lang/yini-parser-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yini_parser-0.1.0a2.tar.gz -
Subject digest:
ca948a5f8b1c78315b17c84d71c0e59bba84807d0acbc2265f97140ae6f85830 - Sigstore transparency entry: 1551057816
- Sigstore integration time:
-
Permalink:
YINI-lang/yini-parser-python@68861e190b45d0eaaa0785610de849e5e47cd226 -
Branch / Tag:
refs/tags/v0.1.0a2 - Owner: https://github.com/YINI-lang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@68861e190b45d0eaaa0785610de849e5e47cd226 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yini_parser-0.1.0a2-py3-none-any.whl.
File metadata
- Download URL: yini_parser-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 36.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5240d55505fefe871383e344e3c2db4c74a8f773f438c626a6e9b65a3560af87
|
|
| MD5 |
3e8c1e46f3f04c9f8ce2f9e51b0e6935
|
|
| BLAKE2b-256 |
fc99efa2392f43561989e0ee346985b1cc898f88d303f83bf888715920960e73
|
Provenance
The following attestation bundles were made for yini_parser-0.1.0a2-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on YINI-lang/yini-parser-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yini_parser-0.1.0a2-py3-none-any.whl -
Subject digest:
5240d55505fefe871383e344e3c2db4c74a8f773f438c626a6e9b65a3560af87 - Sigstore transparency entry: 1551057832
- Sigstore integration time:
-
Permalink:
YINI-lang/yini-parser-python@68861e190b45d0eaaa0785610de849e5e47cd226 -
Branch / Tag:
refs/tags/v0.1.0a2 - Owner: https://github.com/YINI-lang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@68861e190b45d0eaaa0785610de849e5e47cd226 -
Trigger Event:
push
-
Statement type: