Transkribus API Client
Python bindings for the new Transkribus Developer Platform, the old Transkribus Metagrapho/Processing API and the Transkribus Legacy API. This project unites my previous separate projects for the Metagrapho/Processing APIt and Legacy API.
Usage
import lxml
import transkribus
from time import sleep
with transkribus.open(USERNAME, PASSWORD) as api:
process_ids = [
api.metagrapho.process(IMAGE_PATH, line_detection=49272, htr_id=51170)["processId"],
api.metagrapho.process(IMAGE_URL, line_detection=49272, htr_id=51170)["processId"],
]
done = set()
while True:
for process_id in process_ids:
if process_id in done:
continue
match api.metagrapho.status(process_id)["status"].lower():
case "finished":
with open(f"{process_id}-page.xml", "wb") as f:
lxml.etree.tostring(api.metagrapho.page(process_id), pretty_print=True)
with open(f"{process_id}-alto.xml", "wb") as f:
lxml.etree.tostring(api.metagrapho.alto(process_id), pretty_print=True)
done.add(process_id)
case "failed":
print(f"{process_id} FAILED")
done.add(process_id)
if len(done) == len(process_ids):
break
sleep(10)
Metadata
Release files for transkribus-api 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| transkribus_api-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for transkribus_api-0.1.2-py3-none-any.whl |
Release files / transkribus_api-0.1.2-py3-none-any.whl
| Download URL | transkribus_api-0.1.2-py3-none-any.whl |
|---|---|
| Size | 22.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67a53f9256dfdc017bc905b9926348430f0058e185b32d36061c6d5f83730228
|
|
BLAKE2b-256 checksum How to use checksums |
7d96c3cc08f3d2b9e42d2f98160505b8817e5b0d2cab0f540da63f9a6c4b120d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Security for transkribus-api 0.1.2
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.