Skip to main content

A Python package to interact with the mastertables.athento.com public API

Project description

Mastertables

Website PyPI PyPI - Status PyPI - Python Version

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.

API

# module
from mastertables import mastertables


# mastertables client instantiation
# usage:
#   mastertables.MasterTablesClient("<team_api_key>")

mt = mastertables.MasterTablesClient("OAIV9839AF893H923ONWAN3IGNAWNAUNEGIU")


# get vocabulary
# usage:
#   mastertables.MasterTablesClient.get_vocabulary("<vocabulary_uuid>" [, category="<category>"])
# output:
#   {u'foo': u'bar', u'asdf': u'qwer'}

print(mt.get_vocabulary("1234abcd-12ab-34cd-56ef-12345678abcd"))


# get vocabulary reverse (value:key, instead of key:value)
# usage:
#   mastertables.MasterTablesClient.get_vocabulary_reverse("<vocabulary_uuid>" [, category="<category>"])
# output:
#   {u'bar': u'foo', u'qwer': u'asdf'}

print(mt.get_vocabulary_reverse("1234abcd-12ab-34cd-56ef-12345678abcd"))


# get vocabulary values
# usage:
#   mastertables.MasterTablesClient.get_values("<vocabulary_uuid>")
# output:
#   [u'foo', u'asdf']

print(mt.get_values("1234abcd-12ab-34cd-56ef-12345678abcd"))

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

mastertables-0.0.0.tar.gz (3.8 kB view hashes)

Uploaded Source

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