udf-tools
udf-tools is a comprehensive Python library and command-line interface (CLI) for handling UYAP UDF (National Judiciary Network Project Document Format) files. It allows you to create, edit, and convert UDF documents with ease.
Features
- Create & Edit: Build UDF documents from scratch using a modern Python API.
- DOCX to UDF: Convert standard World (.docx) documents to UDF format.
- Offset Management: Handles the complex internal XML structure and offset-based text referencing of UDF files automatically.
- CLI Support: Easy-to-use command-line interface for batch conversions.
- Rich Output: Enhanced terminal experience with progress indicators.
Installation
pip install udf-tools
Usage
As a Library
from udf_tools.editor import UDFEditor
from udf_tools.models.styles import UDFStyle
# Initialize editor
editor = UDFEditor()
# Add custom styles
editor.add_style(UDFStyle(name="Header", size=16.0, bold=True))
# Add content
editor.add_paragraph("TÜRKİYE CUMHURİYETİ", alignment=1)
editor.add_paragraph("MAHKEME KARARI", style="Header", alignment=1)
editor.add_paragraph("Bu belge otomatik olarak oluşturulmuştur.")
# Save as .udf
editor.save("output_document.udf")
As a CLI
# Convert DOCX to UDF
udf-tools convert input.docx output.udf
# Show help
udf-tools --help
Technical Details
UDF is a ZIP-based format containing a content.xml file. The core of the document is a single CDATA block of text, where various elements (paragraphs, tables, styles) reference the text using startOffset and length. udf-tools manages these offsets for you, so you can focus on building your document.
License
MIT
Metadata
Release files for udf-tools 0.1.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 |
|---|---|---|---|---|
| udf_tools-0.1.0.tar.gz | 7.0 kB | Without provenance | Details for udf_tools-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| udf_tools-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for udf_tools-0.1.0-py3-none-any.whl |
Total release size: 15.6 kB
Release files / udf_tools-0.1.0.tar.gz
| Download URL | udf_tools-0.1.0.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b0027540387c90ec5d479c7c513ad4bde7c0f895aed9d747e480a2c0c729bcf
|
|
BLAKE2b-256 checksum How to use checksums |
03465e9ddf17cfee7a32080b12f81429f4ce1dab148b6488f24f5ddf18b438e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / udf_tools-0.1.0-py3-none-any.whl
| Download URL | udf_tools-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a16e3344c65166c8e6112381fb696eb51faea7cd35ec7613fcdb5ebd72f8b366
|
|
BLAKE2b-256 checksum How to use checksums |
2c3a75c0b5f9d21e30bf3fe686e82fcf1938c4243a889ef01bdf4b5df6921eb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for udf-tools 0.1.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.