Universal Converter
A comprehensive Python library for converting between file formats, data types, and domain-specific formats.
Overview
Universal Converter provides a unified interface for hundreds of conversion operations across multiple domains:
- Data formats: JSON, CSV, XML, YAML, TOML, Parquet
- Documents: PDF, DOCX, Markdown, HTML, RTF
- Media: Images (PNG, JPG, WebP, TIFF), Audio (MP3, WAV, FLAC), Video (MP4, AVI, MKV)
- Scientific: Bioinformatics (FASTA, FASTQ, GenBank, VCF), GIS (GeoJSON, Shapefile, KML)
- ML/AI: PyTorch, ONNX, TensorFlow, Keras model formats
- Infrastructure: Terraform, Kubernetes manifests, cloud configs
Installation
pip install universal-converter
Install with specific extras for additional features:
pip install universal-converter[images] # Image processing
pip install universal-converter[audio] # Audio conversion
pip install universal-converter[video] # Video conversion
pip install universal-converter[ai] # ML model conversion
pip install universal-converter[database] # Database formats
pip install universal-converter[all] # All features
Architecture
The library follows a modular, plugin-based architecture:
universal_converter/
├── converters/ # Format-specific converters
│ ├── data.py # JSON, CSV, XML, YAML
│ ├── images.py # Image formats
│ ├── audio.py # Audio formats
│ ├── video.py # Video formats
│ ├── documents.py # Document formats
│ ├── ai.py # ML model formats
│ ├── cloud.py # Cloud configs
│ ├── bioinformatics.py
│ ├── gis.py
│ ├── network.py
│ └── database.py
└── utils/
└── platform.py # System utilities
All converters inherit from BaseConverter and implement a consistent interface.
Usage
Python API
from universal_converter import convert_file, resize_image
# Convert between data formats
convert_file('data.json', 'output.xml')
# Resize an image
resize_image('photo.png', 'thumb.png', width=200)
# Access specific converters directly
from universal_converter.converters import DataConverter, ImageConverter
converter = DataConverter()
result = converter.convert(task)
Command Line
# Convert a file
python -m universal_converter input.json -t csv -o output.csv
# List supported formats
python -m universal_converter -l
Supported Formats
| Category | Formats |
|---|---|
| Data | json, csv, xml, yaml, toml, parquet |
| Images | png, jpg, gif, bmp, tiff, webp |
| Audio | mp3, wav, flac, ogg, aac, m4a |
| Video | mp4, avi, mkv, mov, webm |
| Documents | pdf, docx, txt, html, md |
| ML Models | pt, h5, onnx, tflite, pkl |
| Bioinformatics | fasta, fastq, genbank, vcf, bed |
| GIS | shp, geojson, kml, gpx, tif |
| Database | sqlite, sql, xlsx |
Design Principles
- Lazy loading: Converters are loaded on-demand to minimize startup time
- Optional dependencies: Heavy dependencies are optional; the core works without them
- Clear error messages: Missing dependencies return actionable installation instructions
- Type hints: Full type annotations for IDE support
Requirements
- Python 3.9+
- Core dependencies installed automatically
License
MIT
Repository
Metadata
Release files for universal-converter 1.0.0
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 |
|---|---|---|---|---|
| universal_converter-1.0.0.tar.gz | 26.3 kB | Without provenance | Details for universal_converter-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| universal_converter-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for universal_converter-1.0.0-py3-none-any.whl |
Total release size: 54.0 kB
Release files / universal_converter-1.0.0.tar.gz
| Download URL | universal_converter-1.0.0.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72e06f7163e7961a998027aba9efea081c6ad953c161781c8600bb5a84d1cf78
|
|
BLAKE2b-256 checksum How to use checksums |
dfe0011e6c58338fa843c3d0033146aca56df0a2e29a8386d8d06229fa23d756
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / universal_converter-1.0.0-py3-none-any.whl
| Download URL | universal_converter-1.0.0-py3-none-any.whl |
|---|---|
| Size | 27.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
240a4019e0281550ee509ba5835c020f07d4d63c7568643091bf5ea642b505e5
|
|
BLAKE2b-256 checksum How to use checksums |
48b3fcf62d46e92d28e44e8093f75d889f2e7da6a6d6bdc760f73e3312324e05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for universal-converter 1.0.0
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.