Skip to main content

🎯 Tenty Parser

Tenty Parser es una herramienta CLI moderna para parsear, transformar y convertir entre diferentes formatos de datos estructurados: JSON, YAML y TOON (Token-Oriented Object Notation).

Python License PyPI

✨ Características

  • 🔍 Parse múltiples formatos: JSON, YAML, TOON
  • 🌳 Visualización en árbol de estructuras de datos
  • 📊 Generación de schemas: JSON Schema y OpenAPI
  • 🔄 Conversión entre formatos con un solo comando
  • 🎨 Salida colorida con Rich
  • Optimizado para LLMs con formato TOON (30-60% reducción de tokens)

📦 Instalación

Requisitos previos

  • Python 3.12+
  • uv (recomendado) o pip

Con uv (recomendado)

# Clonar el repositorio
git clone https://github.com/Keniding/tenty-parser.git
cd tenty-parser

# Instalar dependencias
uv sync

# Ejecutar
uv run python -m src.cli --help

Con pip

# Clonar el repositorio
git clone https://github.com/Keniding/tenty-parser.git
cd tenty-parser

# Crear entorno virtual
python -m venv .venv
source .venv/bin/activate  # En Windows: .venv\Scripts\activate

# Instalar dependencias
pip install -e .

# Ejecutar
python -m src.cli --help

🚀 Uso

Comandos principales

1. Parse - Analizar archivos

# Visualizar estructura en árbol
uv run python -m src.cli parse data.json

# Mostrar como JSON estructurado
uv run python -m src.cli parse data.json --format json

# Generar schema
uv run python -m src.cli parse data.json --format schema

# Convertir a TOON
uv run python -m src.cli parse data.json --format toon

# Guardar resultado
uv run python -m src.cli parse data.json --format toon -o output.toon

2. Convert - Convertir entre formatos

# JSON a TOON
uv run python -m src.cli convert input.json output.toon --to toon

# YAML a JSON
uv run python -m src.cli convert config.yaml config.json --to json

# JSON a YAML
uv run python -m src.cli convert data.json data.yaml --to yaml

# TOON a JSON
uv run python -m src.cli convert data.toon data.json --to json

3. Schema - Generar schemas

# Generar JSON Schema
uv run python -m src.cli schema data.json -o schema.json

# Generar OpenAPI Schema
uv run python -m src.cli schema data.json --format openapi -o openapi.json

# Con título personalizado
uv run python -m src.cli schema data.json --title "User API Schema"

4. Version - Ver versión

uv run python -m src.cli version

📖 Formato TOON

TOON (Token-Oriented Object Notation) es un formato optimizado para modelos de lenguaje que reduce el uso de tokens en 30-60%.

Características de TOON

  • Arrays con tamaño explícito: users[2]:
  • Formato tabular para objetos: users[2]{id,name,role}:
  • Indentación en lugar de llaves
  • Sin comillas innecesarias

Ejemplo de conversión

JSON original:

{
  "user": {
    "name": "John Doe",
    "age": 30,
    "tags": ["developer", "python", "rust"]
  },
  "posts": [
    {
      "id": 1,
      "title": "Hello World",
      "published": true
    }
  ]
}

TOON equivalente:

user:
  name: "John Doe"
  age: 30
  tags[3]: developer, python, rust
posts[1]{id,title,published}:
  1,"Hello World",true

Reducción de tokens: ~45% menos tokens que JSON

🏗️ Estructura del proyecto

tenty-parser/
├── src/
│   ├── models/
│   │   └── structure.py          # Modelos Pydantic
│   ├── parsers/
│   │   ├── json_parser.py        # Parser JSON
│   │   ├── yaml_parser.py        # Parser YAML
│   │   └── toon_parser.py        # Parser TOON
│   ├── transformers/
│   │   ├── to_structure.py       # Transformador a estructura
│   │   ├── to_toon.py           # Transformador a TOON
│   │   └── to_schema.py         # Generador de schemas
│   └── cli.py                    # Interfaz CLI
├── tests/                        # Tests (próximamente)
├── pyproject.toml               # Configuración del proyecto
├── README.md                    # Este archivo
├── LICENSE                      # Licencia personalizada
└── .gitignore                   # Archivos ignorados

🔧 Desarrollo

Configurar entorno de desarrollo

# Clonar repositorio
git clone https://github.com/Keniding/tenty-parser.git
cd tenty-parser

# Instalar en modo desarrollo
uv sync

# Ejecutar tests (próximamente)
uv run pytest

Agregar nuevas características

  1. Fork el proyecto
  2. Crea una rama: git checkout -b feature/nueva-caracteristica
  3. Commit cambios: git commit -am 'Agregar nueva característica'
  4. Push a la rama: git push origin feature/nueva-caracteristica
  5. Crea un Pull Request

📚 Ejemplos

Ejemplo 1: Analizar API Response

# Descargar respuesta de API
curl https://api.example.com/users > users.json

# Visualizar estructura
uv run python -m src.cli parse users.json

# Generar schema para documentación
uv run python -m src.cli schema users.json -o users-schema.json

# Convertir a TOON para usar con LLMs
uv run python -m src.cli convert users.json users.toon --to toon

Ejemplo 2: Convertir configuración

# Convertir YAML a JSON
uv run python -m src.cli convert config.yaml config.json --to json

# Ver estructura
uv run python -m src.cli parse config.json --format tree

Ejemplo 3: Workflow completo

# 1. Parse archivo original
uv run python -m src.cli parse data.json --format tree

# 2. Generar schema
uv run python -m src.cli schema data.json -o schema.json

# 3. Convertir a TOON para LLM
uv run python -m src.cli convert data.json data.toon --to toon

# 4. Convertir de vuelta a JSON
uv run python -m src.cli convert data.toon data-restored.json --to json

🎯 Casos de uso

Para desarrolladores

  • 📝 Generar schemas automáticamente desde ejemplos
  • 🔄 Convertir entre formatos de configuración
  • 🔍 Explorar estructuras de datos complejas
  • 📊 Documentar APIs

Para trabajar con LLMs

  • ⚡ Reducir tokens en prompts (formato TOON)
  • 📦 Estructurar datos de forma eficiente
  • 🎯 Mejorar comprensión de estructuras por LLMs

Para análisis de datos

  • 🌳 Visualizar jerarquías de datos
  • 📋 Validar estructuras
  • 🔄 Normalizar formatos

🤝 Contribuir

¡Las contribuciones son bienvenidas! Por favor:

  1. Lee las guías de contribución
  2. Abre un issue para discutir cambios grandes
  3. Escribe tests para nuevas características
  4. Mantén el estilo de código consistente

Nota: Al contribuir, aceptas que tus contribuciones se licencien bajo los mismos términos que este proyecto.

📄 Licencia

Este proyecto está bajo una Licencia Personalizada con los siguientes términos:

✅ Uso Personal y No Comercial

  • LIBRE: Puedes usar, modificar y distribuir el software gratuitamente
  • Requisito: Debes dar crédito al autor original (Keniding)

⚠️ Uso Comercial

  • REQUIERE AUTORIZACIÓN: Contacta para obtener una licencia comercial
  • Incluye: Compensación acordada y/o reconocimiento

📝 Reconocimiento Obligatorio

En cualquier uso del software, debes incluir:

Powered by Tenty Parser - Created by Keniding
https://github.com/Keniding/tenty-parser

Para más detalles, consulta el archivo LICENSE.

Para licencias comerciales, contacta a través de:

🙏 Agradecimientos

📞 Contacto

🗺️ Roadmap

  • Tests unitarios completos
  • Parser TOON más robusto
  • Soporte para más formatos (XML, TOML)
  • Validación de schemas
  • API Python para uso programático
  • Plugins para editores (VSCode)
  • Documentación interactiva

⭐ Si te gusta este proyecto, dale una estrella en GitHub!


Powered by Tenty Parser - Created by Keniding

Release files for tenty-parser 0.1.2

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

Source distribution (sdist)

Source distribution for tenty-parser 0.1.2
File Size Uploaded
tenty_parser-0.1.2.tar.gz 28.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tenty-parser 0.1.2
File Interpreter ABI Platform
tenty_parser-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 45.3 kB

Release files / tenty_parser-0.1.2.tar.gz

Download URL tenty_parser-0.1.2.tar.gz
Size 28.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f0e22c12f201a910cad5aa9828315ae9a82881cf1fb94dcb16aa0183aa7c0d05
BLAKE2b-256 checksum
How to use checksums
b9ed6981710008991ee6e77c352d3c00ebac152ca24383ad6f980db481c99db9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / tenty_parser-0.1.2-py3-none-any.whl

Download URL tenty_parser-0.1.2-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba9560c1acab22a1b96c9be0aa7b2009ecc7255c59dc13e8a9df910920d2295c
BLAKE2b-256 checksum
How to use checksums
69903954c6cbe67eb4968a42afce872cbba533bc8307c023652d7dc11dae2a6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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