Mastertables

A Python package to interact with Mastertables.
This package provides a very simple way of getting data from your mastertables through the public Rest API.
Installation
Install from PyPI (recommended)
Just run the command below from the CLI:
pip install mastertables
To add the package to your local requirements.txt
run:
pip freeze > requirements.txt
Install from repo
You can install Mastertables from the Github repo:
pip install git+https://github.com/athento/mastertables
Install from source
Alternatively, you can even install it from the sources:
git clone https://github.com/athento/mastertables
cd mastertables
pip install .
Updating
Update from PyPI
pip install mastertables --upgrade
Update from repo
pip install git+https://github.com/athento/mastertables --upgrade
Update from source
cd /path/to/mastertables/repo
git pull
pip install . --upgrade
API reference
from mastertables import mastertables
mt = mastertables.MasterTablesClient("OAIV9839AF893H923ONWAN3IGNAWNAUNEGIU")
print(mt.get_vocabulary("1234abcd-12ab-34cd-56ef-12345678abcd"))
print(mt.get_vocabulary_reverse("1234abcd-12ab-34cd-56ef-12345678abcd"))
print(mt.get_values("1234abcd-12ab-34cd-56ef-12345678abcd"))
print(mt.get_value("1234abcd-12ab-34cd-56ef-12345678abcd", "foo", 0))
Packaging and distributing
Click on this link to read the manual on how to package and upload mastertables to PyPI.