Skip to main content

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

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)

Source distribution for udf-tools 0.1.0
File Size Uploaded
udf_tools-0.1.0.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for udf-tools 0.1.0
File Interpreter ABI Platform
udf_tools-0.1.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

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