Client library for communicating with LaBB-CAT servers
Project description
nzilbb-labbcat
Client library for communicating with LaBB-CAT servers using Python.
Documentation
Detailed documentation is available here
Basic usage
The following example shows how to upload a transcript.
For batch uploading and other example code, see the examples subdirectory.
import labbcat
# Connect to the LaBB-CAT annotation store
store = labbcat.Labbcat("http://localhost:8080/labbcat", "labbcat", "labbcat")
# List the corpora on the server
corpora = store.getCorpusIds()
# List the transcript types
transcript_type_layer = store.getLayer("transcript_type")
transcript_types = transcript_type_layer["validLabels"]
# Upload a transcript
corpus_id = corpora[0]
transcript_type = next(iter(transcript_types))
store.newTranscript("test/labbcat-py.test.txt", None, None, transcript_type, corpus_id, "test")
Developers
To build, test, release, and document the module, the following prerequisites are required:
pip install twine
pip install pathlib
apt install python3-sphinx
Unit tests
python -m unittest
Documentation generation
cd docs
make clean
make
Publishing
python setup.py sdist bdist_wheel
twine check dist/*
twine upload dist/*
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
nzilbb-labbcat-0.1.0.tar.gz
(8.5 kB
view hashes)
Built Distribution
Close
Hashes for nzilbb_labbcat-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0866c80bad0aaa9fe0f1e4aae29b12641348a2667e0255cf7bed85ce9b05d919 |
|
MD5 | e78e383d565f174280f1b75bc50013ca |
|
BLAKE2b-256 | f9508a9ad47242af3055b6d5468240a04d5879c6788fc6549c254de39148baed |