Safe JSON/YAML serialization with circular-reference handling. Data processing utility.
Project description
pyserializer
Safe JSON/YAML serialization
Installation
pip install pyserializer
💡 Usage Examples
Basic Operations
from pylib_serializer import serialize, to_json, to_yaml
# Serialize to JSON
data = {"name": "John", "age": 30}
json_str = serialize(data)
# '{"name": "John", "age": 30}'
# Convert to JSON
json_output = to_json(data)
# Convert to YAML
yaml_output = to_yaml(data)
# 'name: John
age: 30'
AI/ML Use Cases
from pylib_serializer import serialize, to_json, to_yaml
# Serialize ML model predictions
predictions = {"class": "cat", "confidence": 0.95}
json_predictions = serialize(predictions)
# Save model config
config = {"model": "resnet50", "epochs": 100}
yaml_config = to_yaml(config)
📚 API Reference
See package documentation for complete API reference.
🤖 AI Agent Friendly
This package is optimized for AI agents and code generation tools:
- Clear function names and signatures
- Comprehensive docstrings with examples
- Type hints for better IDE support
- Common use cases documented
- Zero dependencies for reliability
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylib_serializer-0.1.0.tar.gz.
File metadata
- Download URL: pylib_serializer-0.1.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f92e88c77ad65cd9e276c871f63578f3c76bfdd8449dae17fa280e17461b9e1
|
|
| MD5 |
fa772265eaa394173864782c4f8f004d
|
|
| BLAKE2b-256 |
1fadd234c141150cf6b0b801f48a63451c6b4b3c4fe3912a4fdbdcc6cd51eccd
|
File details
Details for the file pylib_serializer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pylib_serializer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c16ea8269bed5b8010691200c961ae2487196c18cbcbe6b175baf6d2c784ad29
|
|
| MD5 |
d75a5be78c2213fa8ec2cb6e314bf378
|
|
| BLAKE2b-256 |
d6379e50bbab1535240da5bbaf1320ac2ab9eb4904de2483d7c6c6efb2a7f8e6
|