Skip to main content

API wrapper class for roam.plus

Project description

roamPy

A python library of API wrapper functions to retrieve data from the roam.plus platform. Includes the

Roam python class which has one method corresponding to each API endpoint including, Subscriptions, SubscriptionPeriods, Products and Licenses.

Installation

pip install roamPy

Get Started

How to test connection to the Roam server:


from roamPy import Roam



#API Key stored as system variable

token = = os.environ.get('Roam_API_Key')



#Instantiate object of Roam class

roam = Roam(url=<base url of roam instance>, token=token)



#Test connection

print(roam.checkHeartbeat())

Successful Connection Output


{'data': None, 'meta': {'message': 'API ready for requests'}}

Request metadata for a given subscription using its id number:


from roamPy import Roam



#API Key stored as system variable

token = = os.environ.get('Roam_API_Key')



#Instantiate object of Roam class

roam = Roam(url=<base url of roam instance>, token=token)



#Return Data for Subscription using ID.

sub = roam.getOneSubscription(id = 'id number')



print(sub)

Retreive data for all subscription periods between two dates:


from roamPy import Roam



#API Key stored as system variable

token = = os.environ.get('Roam_API_Key')



#Instantiate object of Roam class

roam = Roam(url=<base url of roam instance>, token=token)



allSPBetween = roam.getSubscriptionPeriodsBetween(startDate='2020-01-01', endDate='2021-01-01')



print(allSPBetween)

Retreive all licenses and relations:


from roamPy import Roam



#API Key stored as system variable

token = = os.environ.get('Roam_API_Key')



#Instantiate object of Roam class

roam = Roam(url=<base url of roam instance>, token=token)



licRel = roam.getLicenseswRels(['licensePeriods', 'publisher'])



print(licRel)

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

roamPy-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

roamPy-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file roamPy-0.1.0.tar.gz.

File metadata

  • Download URL: roamPy-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0

File hashes

Hashes for roamPy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5397371f31959c9808638ed5b8793081d1288dc2c6485c1e15f9e5acc130d5c6
MD5 2e3f0c427a1f4e05a4270fe4dd87d160
BLAKE2b-256 d19e18ab85d64db3de301aae8b3d46dad903295aa1781ca8ae3d337bda3162cb

See more details on using hashes here.

File details

Details for the file roamPy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: roamPy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0

File hashes

Hashes for roamPy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5bac8e104e8da178ae805373ac6c63464a115aced8b67ffefc5b54a9cd2cf4b1
MD5 0131592322fa38c0a22aa9a640f4740a
BLAKE2b-256 f0bf375a60cec115a85a74d0915df7357105834c726b5b0c210bfd6302908a1e

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