Skip to main content

some utility function to interact with the Transkribus-API

Project description

acdh-transkribus-utils

PyPI version

A python package providing some utility functions for interacting with the Transkribus-API

Installation

pip install acdh-transkribus-utils

Usage

Authentication

Set Transkribus-Credentials as environment variables:

export TRANSKRIBUS_USER=some@mail.com
export TRANSKRIBUS_PASSWORD=verysecret

(or create a file called env.secret similar to env.dummy and run source export_env_variables.sh) you can pass in your credentials also as params e.g.

from transkribus_utils.transkribus_utils import ACDHTranskribusUtils

client = ACDHTranskribusUtils(user="some@mail.com", password="verysecret")

Download METS files from Collection

from transkribus_utils.transkribus_utils import ACDHTranskribusUtils

COL_ID = 51052
client = ACDHTranskribusUtils()
client.collection_to_mets(COL_ID)
# downloads a METS for each document in the given collection into a folder `./{COL_ID}

client.collection_to_mets(COL_ID, file_path='./foo')
# downloads a METS for each document in the given collection into a folder `./foo/{COL_ID}

client.collection_to_mets(COL_ID, filter_by_doc_ids=[230161, 230155])
# downloads only METS for document with ID 230161 and 230155 into a folder `./{COL_ID}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

acdh-transkribus-utils-2.3.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

acdh_transkribus_utils-2.3-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file acdh-transkribus-utils-2.3.tar.gz.

File metadata

  • Download URL: acdh-transkribus-utils-2.3.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for acdh-transkribus-utils-2.3.tar.gz
Algorithm Hash digest
SHA256 34924bf8149c3b401ed9ae8539a30df98c4605fa8c68183a9a3def823ce5b327
MD5 9bf911ad8cde2f68fa6c06a943beb5c2
BLAKE2b-256 a4657b16889f58d8fd4d69dc0ae1eca0c47f9f55aeb477e932fbb6456c8ab46a

See more details on using hashes here.

File details

Details for the file acdh_transkribus_utils-2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for acdh_transkribus_utils-2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 71b1b98b384683aec0553906ce9a47b6fb12588f94ffee51ec41f2918dbd5a0b
MD5 cc23e0ecd24e6c297bdb5d3105219b5a
BLAKE2b-256 ac4faf760bcb3d02226725f894d90c2870d527d9cf63b1b55a8a483a6fe1d76a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page