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. This parser is intended for early testing and integration. The public API and edge-case behavior may still change before
1.0.0.
Quick Start
// 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 (sub-section of App)
^^ Server
host = "localhost"
port = 8080 # Can comment with # too
useTLS = off
from yini_parser import load
data = load("sample/basic.yini")
print(data["App"]["name"]) # Outputs: Demo App
Use load(...) to parse a file and loads(...) to parse a string.
See the YINI specification and documentation.
Installation
From PyPI, once published:
pip install yini-parser
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
^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.0a1.tar.gz.
File metadata
- Download URL: yini_parser-0.1.0a1.tar.gz
- Upload date:
- Size: 38.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
880981a8e7aeb741e283e2e2f8ccb01528bf1bfca025c00b4eed95956677f7dd
|
|
| MD5 |
59d8d15feaab869a8e6efcbf35f71a61
|
|
| BLAKE2b-256 |
3029af3e2fd6feea66ffd2a47cd61d8e1f1a67a88fa2d47b6152f1abe1f57d9a
|
File details
Details for the file yini_parser-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: yini_parser-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 36.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bf502c62327e7e9f93fb198aa818d2b0015d495af909836d510218e11fd60b6
|
|
| MD5 |
9aa9fc35f44f195a3f0511f06b0ee413
|
|
| BLAKE2b-256 |
dd32c043f2ef5efbad9e879052803ac39bb2765ad34e2cb39d895da9aa40826d
|