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 credentials in a hidden .env file that does not get distributed with your code. This is pretty easy to accomplish with python-dotenv. You will need to provide the connector with an eScriptorium instance URL, the API URL, your username, and your password (see below).

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 = str(os.getenv('ESCRIPTORIUM_URL'))
    api = f'{url}api/'
    username = str(os.getenv('ESCRIPTORIUM_USERNAME'))
    password = str(os.getenv('ESCRIPTORIUM_PASSWORD'))
    escr = EscriptoriumConnector(url, api, username, password)
    print(escr.get_documents())

And your .env file should have:

ESCRIPTORIUM_URL=https://www.escriptorium.fr/
ESCRIPTORIUM_USERNAME=your escriptorium username
ESCRIPTORIUM_PASSWORD=your escriptorium password

See this Jupyter notebook for a longer introduction to the connector.

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

Uploaded Source

Built Distribution

escriptorium_connector-0.0.11-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: escriptorium-connector-0.0.11.tar.gz
  • Upload date:
  • Size: 6.0 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.11.tar.gz
Algorithm Hash digest
SHA256 3c0855ccdeb8c4fdf3396fb6f536e8f1f88e5da9a2627132039e6a1e545fc109
MD5 1a11f01b3f83df9cb2430623c54a496d
BLAKE2b-256 8a5e8921af11bf5e6e533ea423707203ceca58d0f6434674cdfade8ba8c55f64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for escriptorium_connector-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 93c16a73d87897ffdf9d5ff52206a138771620f4868cd4218a2a813ebb29c344
MD5 02738d3ca4f84457ae658b8550242c26
BLAKE2b-256 c612781e532900cf517495de854b243d2b734175156f6ddc62b025cf60aac2b6

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