Skip to main content

This simple python package makes it easy to connect to an eScriptorium instance and to work with the data there.

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.8.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

escriptorium_connector-0.0.8-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file escriptorium-connector-0.0.8.tar.gz.

File metadata

  • Download URL: escriptorium-connector-0.0.8.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.9.6 Linux/5.4.0-84-generic

File hashes

Hashes for escriptorium-connector-0.0.8.tar.gz
Algorithm Hash digest
SHA256 1ed8ef900416c58bf8418226b6df6362663b6dd5b21f048d47afa9a14eb73e18
MD5 570c08a72a4e10c9e41e0c3ceb184c2d
BLAKE2b-256 7c9abf93e6f3835e5cd7446c8a1d9eae0a290e2a301f6c7ac442a2a5a48dbf19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escriptorium_connector-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1a375cd088d4b622e991a02bde4326fabcb61a2287d4ec9aa7bb1adbc3914de2
MD5 9126911765747bbf5ae3634312eccfe3
BLAKE2b-256 333469b46534e257be83a868fd467cae98b736853d4bc44f3d1e7f35be2a8158

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