KSON2TOML
Librería para la transformación de KSON a TOML.
Descripción
kson2toml es una librería Python que permite convertir strings a formato KSON a formato TOML (Tom's Obvious, Minimal Language). Esta librería utiliza el parser oficial de KSON y genera TOML válido y legible.
Instalación
pip install kson2toml
O clona este repositorio:
git clone https://github.com/Matoxx01/kson2toml.git
cd kson2toml
Uso
Aplicación Gráfica
Instala el paquete:
pip install kson2toml
Luego ejecuta:
kson2toml
Uso en Código
from kson2toml import kson2toml
resultado = kson2toml(string_kson)
API
kson2toml(kson_string: str) -> str
Función principal que convierte un string KSON a TOML.
Parámetros:
kson_string(str): String en formato KSON válido
Retorna:
str: String en formato TOML
Excepciones:
ValueError: Si el string KSON no es válido o contiene errores de sintaxis
Clases AST
El módulo ast.py contiene las siguientes clases para representar el árbol de sintaxis abstracta:
TomlNode: Clase base para todos los nodosTomlString: Representa stringsTomlInteger: Representa enterosTomlFloat: Representa decimalesTomlBoolean: Representa booleanosTomlNull: Representa valores nulosTomlArray: Representa arraysTomlTable: Representa tablas/objetosTomlEmbed: Representa bloques embebidos
Desarrollo
Ejecutar Tests
python tests/test.py
Requisitos
- Python 3.13+
kson-lang: Parser oficial de KSONtoml: Parser y validador de TOML
Contribuir
Las contribuciones son bienvenidas. Por favor, asegúrate de que el código pase todos los tests antes de enviar un pull request.
Metadata
Release files for kson2toml 1.0.6
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 | |
|---|---|---|---|---|
| kson2toml-1.0.6.tar.gz | 26.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kson2toml-1.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.4 kB
Release files / kson2toml-1.0.6.tar.gz
| Download URL | kson2toml-1.0.6.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d02b0245c8652c6d0d4306087e5e0e1b0c38707106c7da68859feeedb9b63501
|
|
BLAKE2b-256 checksum How to use checksums |
d28d830236d545226568f4b7cba766be050677baa94372a2704fab95380e3c99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / kson2toml-1.0.6-py3-none-any.whl
| Download URL | kson2toml-1.0.6-py3-none-any.whl |
|---|---|
| Size | 23.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3517b9747b0b681e5277af7fa0fa2d62c5c0e5cd9d130ebfe116cb6eb0caab2
|
|
BLAKE2b-256 checksum How to use checksums |
d91416c669a9d00802a31e9e62d5bfc5947263228e9a7a487ab4f2c9bee42fd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for kson2toml 1.0.6
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.