Skip to main content

A convenience connector to the eScriptorium platform

Project description

[License: MIT]

Escriptorium Connector

This simple python package makes it easy to connect to escriptorium and work with the data stored there.

Installation

And the obligatory: pip install escriptorium-connector

Usage

If you are working on a public repository, you will probably want to store your user token in a hidden .env file that does not get distributed with your code. This is pretty easy to accomplish with python-dotenv. You can get your user token by going to your eScriptorium instance (perhaps https://escriptorium.fr/), logging in, clicking on your username then "profile", and selecting "Api key". The token is a fairly long string of random letters and numbers.

The EscriptoriumConnector class provides (or will provide) all the methods needed to interact programmatically with the eScriptorium platform.

Example usage:

from escriptorium_connector import EscriptoriumConnector
import os
from dotenv import load_dotenv


if __name__ == '__main__':
    load_dotenv()
    url = os.getenv('ESCRIPTORIUM_URL')
    api = f'{url}api/'
    token = os.getenv('ESCRIPTORIUM_TOKEN')
    escr = EscriptoriumConnector(url, api, token)
    print(escr.get_documents())

And your .env file should have:

ESCRIPTORIUM_URL=https://www.escriptorium.fr/
ESCRIPTORIUM_TOKEN='your secret user token here'

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

escriptorium_connector-0.0.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

escriptorium_connector-0.0.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file escriptorium_connector-0.0.2.tar.gz.

File metadata

  • Download URL: escriptorium_connector-0.0.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for escriptorium_connector-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4a360d79798228ff66bcbf93e9a521fb220c38d88d4735ddd0d87d6bc608e7f8
MD5 07cd1663da1291221a34e468dfe2327a
BLAKE2b-256 2005ba74ff0d901e95f2f21126204877068d578f84ad970acebfa276766f3b43

See more details on using hashes here.

File details

Details for the file escriptorium_connector-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: escriptorium_connector-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for escriptorium_connector-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fad23d815482a537503cb3b8aa089cd63e44e1278ce59f3b54cd9161df6ef3aa
MD5 054a20c3f62da9cb34493071771c95eb
BLAKE2b-256 eef5d36b33772c60fecaa5e661435a89f7db5547ae4cb6ab0f855a4c71049853

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