transkribus-metagrapho-api


Nametranskribus-metagrapho-api JSON
Version 0.1.4 PyPI version JSON
download
home_page
SummaryTranskribus Metagrapho API Client.
upload_time2024-02-26 08:49:03
maintainer
docs_urlNone
author
requires_python>=3.10
licenseGPLv3+
keywords transkribus api
VCS
bugtrack_url
requirements Pillow requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Transkribus Metagrapho API Client

![Tests](https://github.com/jnphilipp/transkribus_metagrapho_api/actions/workflows/tests.yml/badge.svg)

## Usage

### with ContextManager

```python
from time import sleep
from transkribus_metagrapho_api import transkribus_metagrapho_api

with transkribus_metagrapho_api(USERNAME, PASSWORD) as api:
    process_id = api.process(IMAGE_PATH, line_detection=49272, htr_id=51170)
    while True:
        match api.status(process_id).upper():
            case "FINISHED":
                print(api.apge(process_id))
                break
            case "FAILED":
                print("FAILED")
                break
        sleep(10)
```

or

```python
with transkribus_metagrapho_api(USERNAME, PASSWORD) as api:
    for image_path, page_xml in zip(IMAGES, api(IMAGES*, line_detection=49272, htr_id=51170)):
        with open(
            Path(image_path.parent, image_path.name.replace(image_path.suffix, ".xml")),
            "w",
            encoding="utf8"
        ) as f:
            f.write(page_xml)
```

### from command line

```bash
$ python3 -m transkribus_metagrapho_api --username USERNAME --password PASSWORD --images images/*.tiff
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "transkribus-metagrapho-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "transkribus,api",
    "author": "",
    "author_email": "\"J. Nathanael Philipp\" <nathanael@philipp.land>",
    "download_url": "https://files.pythonhosted.org/packages/51/43/3aaccf0be326afce293cb3637de831a23eb49d07f639a7f30d50f2beb654/transkribus_metagrapho_api-0.1.4.tar.gz",
    "platform": null,
    "description": "# Transkribus Metagrapho API Client\n\n![Tests](https://github.com/jnphilipp/transkribus_metagrapho_api/actions/workflows/tests.yml/badge.svg)\n\n## Usage\n\n### with ContextManager\n\n```python\nfrom time import sleep\nfrom transkribus_metagrapho_api import transkribus_metagrapho_api\n\nwith transkribus_metagrapho_api(USERNAME, PASSWORD) as api:\n    process_id = api.process(IMAGE_PATH, line_detection=49272, htr_id=51170)\n    while True:\n        match api.status(process_id).upper():\n            case \"FINISHED\":\n                print(api.apge(process_id))\n                break\n            case \"FAILED\":\n                print(\"FAILED\")\n                break\n        sleep(10)\n```\n\nor\n\n```python\nwith transkribus_metagrapho_api(USERNAME, PASSWORD) as api:\n    for image_path, page_xml in zip(IMAGES, api(IMAGES*, line_detection=49272, htr_id=51170)):\n        with open(\n            Path(image_path.parent, image_path.name.replace(image_path.suffix, \".xml\")),\n            \"w\",\n            encoding=\"utf8\"\n        ) as f:\n            f.write(page_xml)\n```\n\n### from command line\n\n```bash\n$ python3 -m transkribus_metagrapho_api --username USERNAME --password PASSWORD --images images/*.tiff\n```\n",
    "bugtrack_url": null,
    "license": "GPLv3+",
    "summary": "Transkribus Metagrapho API Client.",
    "version": "0.1.4",
    "project_urls": {
        "Bug Tracker": "http://github.com/jnphilipp/transkribus_metagrapho_api/issues",
        "Homepage": "https://github.com/jnphilipp/transkribus_metagrapho_api"
    },
    "split_keywords": [
        "transkribus",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "afe634750a8ab9c8cedccc9976c1b01046b38b9429470de0b52f49f0d8b9713e",
                "md5": "a2fd987bc13a2c0676ff3f1968ca5972",
                "sha256": "df86902bef0c7891ed4f7b1fc6ef033e2735d7bdf9f57f1d18c7d1c0e775d447"
            },
            "downloads": -1,
            "filename": "transkribus_metagrapho_api-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a2fd987bc13a2c0676ff3f1968ca5972",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 22299,
            "upload_time": "2024-02-26T08:49:02",
            "upload_time_iso_8601": "2024-02-26T08:49:02.092163Z",
            "url": "https://files.pythonhosted.org/packages/af/e6/34750a8ab9c8cedccc9976c1b01046b38b9429470de0b52f49f0d8b9713e/transkribus_metagrapho_api-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "51433aaccf0be326afce293cb3637de831a23eb49d07f639a7f30d50f2beb654",
                "md5": "a4d4e67f664f8cd5f3a08fba077aa856",
                "sha256": "d4898a5ccfe6f175e9dcb5475b978810420fe023ff3e0114373b2a2b953be4e7"
            },
            "downloads": -1,
            "filename": "transkribus_metagrapho_api-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a4d4e67f664f8cd5f3a08fba077aa856",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 20360,
            "upload_time": "2024-02-26T08:49:03",
            "upload_time_iso_8601": "2024-02-26T08:49:03.171466Z",
            "url": "https://files.pythonhosted.org/packages/51/43/3aaccf0be326afce293cb3637de831a23eb49d07f639a7f30d50f2beb654/transkribus_metagrapho_api-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-26 08:49:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jnphilipp",
    "github_project": "transkribus_metagrapho_api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "Pillow",
            "specs": [
                [
                    "~=",
                    "10.1.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "~=",
                    "2.31.0"
                ]
            ]
        }
    ],
    "lcname": "transkribus-metagrapho-api"
}
        
Elapsed time: 2.06150s