YLSpec for Python
One document model for configuration, manifests, and embedded metadata.
YLSpec is a typed Python interface to the portable C11 reference implementation.
Standalone .ylspec files use UTF-8 TOML 1.1. A small binary frame embeds the same
document at a host-supplied offset, without reading or decompressing host payloads.
Created by Cavanşir Qurbanzadə, maintained under YoungLionOrganization. Contact: cavanshirpro@gmail.com. This is an experimental 0.1 series implementation; document and frame formats remain at 0.1 independently of the package version.
Install
python -m pip install ylspec
CPython 3.11–3.15 is supported through the CPython 3.11 stable ABI. Published wheels
cover Windows x64, Linux x86_64/ARM64 (manylinux and musllinux), and macOS Intel and
Apple Silicon. A source installation requires a C11 compiler and CMake. Runtime
Python dependencies are not required. Complete .pyi stubs and py.typed ship
inside the package.
Standalone documents
import ylspec
document = ylspec.Document({"name": "Example", "enabled": True, "count": 42})
document.validate()
text = ylspec.dumps(document)
restored = ylspec.loads(text)
assert restored.data == document.data
assert restored.metadata["profile"] == "core.data"
load(path) and dump(document, path) provide filesystem adapters. The document
contains _ylspec, data, and optional namespaced extensions. Application
values belong in data; applications can register profile validators explicitly.
Unknown profiles remain readable without importing application code.
Embedded metadata
import io
import ylspec
document = ylspec.Document({"name": "Plugin metadata", "enabled": True})
frame = ylspec.pack(document)
prefix = b"host-prefix"
stream = io.BytesIO(prefix + frame + b"unrelated host payload")
stream.seek(3)
embedded = ylspec.read_at(stream, offset=len(prefix), available=len(frame))
assert embedded.data == document.data
assert stream.tell() == 3
assert ylspec.unpack(prefix + frame, offset=len(prefix)).data == document.data
The host records the offset and enclosing region. A successful read requests only the 32-byte header and declared document bytes. Frames do not authenticate content and do not define a plugin/package container or execution model.
Types, errors, and limits
| TOML value | Python representation |
|---|---|
| String / boolean | str / bool |
| Integer / float | Signed 64-bit int / binary64 float |
| Array / table | list / dict[str, value] |
| Date / time / timestamp | TemporalValue(kind, text) with exact fractional precision |
Standard datetime.date, datetime.time, and datetime.datetime objects are
accepted when writing. TOML has no null value. Serialization preserves value
meaning; comments, whitespace, and original literal spelling are not retained.
Limits() defaults to 16 MiB of document text and 64 nesting edges. Structured
exceptions include ParseError, FrameError, LimitError, UnsupportedError,
and ProfileError, with codes, byte offsets, and source positions when available.
Ordinary argument and filesystem failures use standard Python exceptions.
Reading never executes commands, expands environment variables, includes files,
or accesses the network.
Documentation and ownership
- Python API, ownership, and complete type contracts
- Normative document specification
- Embedding integration and frame byte layout
- Compatibility and migration policy
- Release history and checksummed assets
- Report an issue
Package identity is available through ylspec.__author__, __maintainer__,
__email__, __license__, __copyright__, __url__, and __version__.
For installed distribution metadata, use importlib.metadata.metadata("ylspec").
Copyright 2026 Cavanşir Qurbanzadə. Original code, tests, and documentation are licensed under Apache-2.0. The vendored tomlc17 parser retains its MIT license. Distribution files include the original notices; see third-party attribution.
Metadata
Release files for ylspec 0.1.3
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 | Actions |
|---|---|---|---|---|
| ylspec-0.1.3.tar.gz | 188.9 kB | Without provenance | Details for ylspec-0.1.3.tar.gz |
Built distributions (wheels)
Total release size: 636.2 kB
Release files / ylspec-0.1.3.tar.gz
| Download URL | ylspec-0.1.3.tar.gz |
|---|---|
| Size | 188.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
712d40fc8d15b29d89887389d39968f77c1068136402ffb992c32b32364cfae3
|
|
BLAKE2b-256 checksum How to use checksums |
2e1f60c3077e871d85d4e4bc719f7724683debfcc426622477d2ed3fa3a42f5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / ylspec-0.1.3-cp311-abi3-win_amd64.whl
| Download URL | ylspec-0.1.3-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 57.6 kB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d15502be4a898784b0788d292259f8d58ccb015a8db591bb09f4f51b078db903
|
|
BLAKE2b-256 checksum How to use checksums |
1b7881043297455350c2b62d1a54f575287c0734c0361a9d79d34a3a8dd320fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / ylspec-0.1.3-cp311-abi3-musllinux_1_2_x86_64.whl
| Download URL | ylspec-0.1.3-cp311-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 68.3 kB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8e5880b4ad48c8a5dc22e541d68fc8d974794a53217f425b98914fb0ced72840
|
|
BLAKE2b-256 checksum How to use checksums |
9ab91a14ed960f0f3a8fedef86db36eae0e1e55c40ced6bad04695fcc5f8cf51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / ylspec-0.1.3-cp311-abi3-musllinux_1_2_aarch64.whl
| Download URL | ylspec-0.1.3-cp311-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 68.1 kB |
| Tags | CPython 3.11 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
200e79e2cce3a624be25788a132481751f51ac507afe2c19246c2fd13d6004d9
|
|
BLAKE2b-256 checksum How to use checksums |
52e7e57a26a0d3377cc10718a7232fa777023fb6b0f8644e17447d7fc90b504f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / ylspec-0.1.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ylspec-0.1.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 68.6 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dea2016f0aa746e0cf846e2bfce83b2f5edac1928d86f15bb1e790cb912dff9b
|
|
BLAKE2b-256 checksum How to use checksums |
6eb87b373f5869309945eb9593bbd016fe86a111855107d6a9912a5b8d7b7e35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / ylspec-0.1.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | ylspec-0.1.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 67.9 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
6fb7fb75772685ba7f85d1d8e039c78e026930a86786ef98e3db8af5bb86e5be
|
|
BLAKE2b-256 checksum How to use checksums |
530bc6348069686054661a1eb5f629b72a4a4c85997f9699d40991cd7a470575
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / ylspec-0.1.3-cp311-abi3-macosx_11_0_x86_64.whl
| Download URL | ylspec-0.1.3-cp311-abi3-macosx_11_0_x86_64.whl |
|---|---|
| Size | 58.8 kB |
| Tags | CPython 3.11 abi3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
d667ff7dd256be02e4a9e792c84634b0740fad69895b243b61d347046941f8e8
|
|
BLAKE2b-256 checksum How to use checksums |
6e03736100a7ecdf4b572a48c4b36a351bdbe83c3fccfcb7e69a6de4129962aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / ylspec-0.1.3-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | ylspec-0.1.3-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 57.8 kB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7e046cf47ce1e0402bd769ae25ac1f8e07c08258226d8a01a8a3b9057a521f00
|
|
BLAKE2b-256 checksum How to use checksums |
a63ba510100b56f7eab5904cd4f785fca6a5a998c21f8fa0b567015d3322849e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for ylspec 0.1.3
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.