Install & Compatibility
Where this runs
tested against v3.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
UnoConverter
✓ import unoserver
✗ from unoserver import UnoConverter
This quickstart demonstrates how to use the `UnoConverter` client to connect to a running `unoserver` instance and convert a dummy text file to PDF. It assumes that the `unoserver` command-line tool is already active in a separate process and that LibreOffice is installed on the server machine. The example creates a temporary input file and cleans up afterwards.
import os
from unoserver.converter import UnoConverter
# NOTE: For this code to run, the `unoserver` command-line tool
# must be running in a separate process, e.g., via `unoserver --log-level INFO`.
# LibreOffice must also be installed on the server machine.
# Create a dummy input file
dummy_input_path = 'dummy_input.txt'
with open(dummy_input_path, 'w') as f:
f.write('Hello, UnoServer! This is a test document.')
try:
with UnoConverter() as converter:
# Convert the dummy text file to PDF
output_path = converter.convert(dummy_input_path, 'dummy_output.pdf')
print(f"Successfully converted '{dummy_input_path}' to '{output_path}'")
except Exception as e:
print(f"Error during conversion: {e}")
print("Ensure `unoserver` is running and LibreOffice is installed.")
finally:
# Clean up dummy files
if os.path.exists(dummy_input_path):
os.remove(dummy_input_path)
if os.path.exists('dummy_output.pdf'): # Check if conversion actually created it
os.remove('dummy_output.pdf')
unoserver --version
Debug
Known issues
breakingUsers migrating from the older `unoconv` Python library to `unoserver` will encounter significant breaking changes. `unoserver` fundamentally redesigns the conversion process around a client-server architecture, meaning direct function calls like `unoconv.unoconvert()` no longer exist.fixRewrite conversion logic to use `unoserver.converter.UnoConverter` to connect to a running `unoserver` instance. Start `unoserver` as a separate process via the command line or `unoserver.start()`.
affects: < 3.0 (for unoconv users)
gotchaUnoserver requires LibreOffice or OpenOffice to be installed on the machine where the `unoserver` process is running. If LibreOffice is not found in the system's PATH, the server will fail to start or conversions will error out.fixInstall LibreOffice/OpenOffice on the server machine. Ensure its executable (`soffice` or similar) is accessible via the system's PATH or specify its path using the `--interface` option when starting `unoserver`.
affects: All versions
gotchaThe default port for unoserver is 2002. If another application is using this port, or if you attempt to run multiple unoserver instances on the same port, connection errors will occur. Firewalls can also block connections.fixChange the default port using the `--port` option when starting `unoserver` (e.g., `unoserver --port 2003`). Ensure your client code connects to the correct port. Check firewall rules if connections are refused.
affects: All versions
Upgrade
Version history
3.7latest on PyPI · released Jun 10, 2026
Audit
Dependencies
No dependency data recorded yet.