This simple python package makes it easy to connect to an eScriptorium instance and to work with the data there.
Project description
[]
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file escriptorium-connector-0.0.13.tar.gz
.
File metadata
- Download URL: escriptorium-connector-0.0.13.tar.gz
- Upload date:
- Size: 6.3 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8600944a62f479a7e57538a0ecf5df3724c12cb34e58d6f0129118b1a8a737df |
|
MD5 | 79524b9880b92d18658ea9fc7fdc93de |
|
BLAKE2b-256 | 7aeaead7a06fc190d327e4d24b937b3002621e6a521cd2fb6723ada2d337a808 |
File details
Details for the file escriptorium_connector-0.0.13-py3-none-any.whl
.
File metadata
- Download URL: escriptorium_connector-0.0.13-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.6 Linux/5.4.0-84-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95d3ae1eee6bceed4186fcc477b49a2caa447790d4a43bd702afa9f7f00ec3fe |
|
MD5 | 865a7a7f765c1097dd893aa5060c4395 |
|
BLAKE2b-256 | 8af153f320b7f46560ab2580ed9e5a05ce2c6e49f7081baefed187802f5331b0 |