JSON TOON Converter
json-toon-converter is a powerful Python library that helps you easily convert data between JSON and TOON formats. The TOON format is a compact, human-readable serialization format, perfect for reducing token usage in applications such as AI-driven models and data serialization. This package allows you to convert both JSON and TOON with minimal effort.
Python Version: 3.8+
PyPI Version: json-toon-converter
License: MIT License
Downloads: Available on PyPI
🌟 Key Features
- 🔄 Bidirectional Conversion: Convert JSON to TOON and TOON to JSON effortlessly.
- 🎯 Flexible Integration: Simple API for integrating into your Python projects.
- 🏷️ Token Savings: Save tokens when working with language models and APIs.
- 💡 Customizable Prompts: You can specify prompts for targeted description or formatting.
- 📝 Type Hints: Full type hints for better development experience.
- 🌐 CLI Support: Command-line interface for quick conversions and batch processing.
📦 Installation
To install the package, use pip:
pip install json-toon-converter
# 🚀 Quick Start
Import the package and use the provided functions to convert between **JSON** and **TOON** formats.
### Convert JSON to TOON
```python
from json_to_toon_converter import json_to_toon
json_data = {
"name": "Alice",
"age": 25,
"city": "Wonderland"
}
toon_data = json_to_toon(json_data)
print(toon_data)
Convert TOON to JSON
from json_to_toon_converter import toon_to_json
toon_data = '(name "Alice") (age 25) (city "Wonderland")'
json_data = toon_to_json(toon_data)
print(json_data)
🤝 Contributing
We welcome contributions! Here's how you can help:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Your contributions are greatly appreciated!
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for json-toon-converter 0.1.2
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 |
|---|---|---|---|---|
| json_toon_converter-0.1.2.tar.gz | 3.9 kB | Without provenance | Details for json_toon_converter-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| json_toon_converter-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for json_toon_converter-0.1.2-py3-none-any.whl |
Total release size: 8.5 kB
Release files / json_toon_converter-0.1.2.tar.gz
| Download URL | json_toon_converter-0.1.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d1f648a5ee44cf632584778da9398c83026c85ec5bf6a1438e4dcc683b776b7
|
|
BLAKE2b-256 checksum How to use checksums |
0d234c71d85d4dcad0dbc1368e1ff17686619a6825fa02b5ef7da9fd1b88c986
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / json_toon_converter-0.1.2-py3-none-any.whl
| Download URL | json_toon_converter-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bae66011859c93c3125660103a828d78c458a255e4e4816adba1735b86d8bb44
|
|
BLAKE2b-256 checksum How to use checksums |
bda1bf6252709e957e1faa09e36e47e413545cea42d6fe54b6c93aa797fffb9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for json-toon-converter 0.1.2
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.