Skip to main content

YLSpec for Python

PyPI Python Distributions CI License

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

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.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ylspec 0.1.4
File Size Uploaded Provenance Actions
ylspec-0.1.4.tar.gz 190.3 kB Without provenance Details for ylspec-0.1.4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ylspec 0.1.4
File Actions
ylspec-0.1.4-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for ylspec-0.1.4-cp311-abi3-win_amd64.whl
ylspec-0.1.4-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details for ylspec-0.1.4-cp311-abi3-musllinux_1_2_x86_64.whl
ylspec-0.1.4-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details for ylspec-0.1.4-cp311-abi3-musllinux_1_2_aarch64.whl
ylspec-0.1.4-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for ylspec-0.1.4-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
ylspec-0.1.4-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details for ylspec-0.1.4-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
ylspec-0.1.4-cp311-abi3-macosx_11_0_x86_64.whl CPython 3.11 abi3 macOS 11.0+ x86-64 Details for ylspec-0.1.4-cp311-abi3-macosx_11_0_x86_64.whl
ylspec-0.1.4-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for ylspec-0.1.4-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 637.3 kB

Release files / ylspec-0.1.4.tar.gz

Download URL ylspec-0.1.4.tar.gz
Size 190.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ddc6ea02064ce8550a698dccbae14e784249698b0c23250f8223c49762435261
BLAKE2b-256 checksum
How to use checksums
d75570c2ee6f346a3d217d542ddbf3d52ff254e441acbe89be1c11787afff971
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.4-cp311-abi3-win_amd64.whl

Download URL ylspec-0.1.4-cp311-abi3-win_amd64.whl
Size 57.5 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
7cbacec15ddfea0114f4d6fd4a9e01f4f1ed2d2d8fb93d8e85ff640fc8bf887f
BLAKE2b-256 checksum
How to use checksums
48e9dba13e2509bf532706f6b283765a641755ac8a4b5d25858ed117178275f5
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.4-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL ylspec-0.1.4-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
00fe452f0f9adc2c06410770b7ed48c720815ad75054508efb06003ccdb3024b
BLAKE2b-256 checksum
How to use checksums
5f4058e1317f0a13323044d512234f5505968b07ca1b458ac532b9c97f66606e
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.4-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL ylspec-0.1.4-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
652d0d4498ee76f31c779963bf0c9992f970dcb248672ef785c6b8179306be20
BLAKE2b-256 checksum
How to use checksums
90d683150edc8d06f888e867669e6cd62e2d336bd11eacd4dd91f1eab4e47274
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.4-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL ylspec-0.1.4-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
a8ba98066d5bd59947dc7205e56af8eef4255c4d5540b2de000bc9cea8d74b1b
BLAKE2b-256 checksum
How to use checksums
8e31b6b06aa9b9397eafc84bad59dedb15635bd7edc75bafc87a8f9414192e47
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.4-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL ylspec-0.1.4-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
544251be55bb60320de15e5a25527fdaaafe101ace1d00e473493b4867b5a07d
BLAKE2b-256 checksum
How to use checksums
511bf298f2d8bd0a5c6221bafaeb43ff02dcee0fa9d3cffe85e237c361557d1b
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.4-cp311-abi3-macosx_11_0_x86_64.whl

Download URL ylspec-0.1.4-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
83568de549c118fc238c54d9badd8081eefeff9c80aeda4534eef102ab516f7d
BLAKE2b-256 checksum
How to use checksums
35080570c1ea66230e0b42cbebc44b5cd81fad8639906a5ce8b4c4078bdc469e
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.4-cp311-abi3-macosx_11_0_arm64.whl

Download URL ylspec-0.1.4-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
ddf244706a611129a7275642881af86d494bfeea70cc96f7b918c56a06c020ba
BLAKE2b-256 checksum
How to use checksums
88e6f1b97386efbeefa753845fad54b51b1358047ddf06df8359e0426435934a
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.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page