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.
Full focumentaion can be found here: roampy.readthedocs.io
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
Built Distribution
File details
Details for the file roamPy-0.1.3.tar.gz
.
File metadata
- Download URL: roamPy-0.1.3.tar.gz
- Upload date:
- Size: 7.3 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e4d0810bdc3d10ee2b83c5ee3a0e815849607b5e8702dcdb9d1bc28bfb466c2 |
|
MD5 | 54961a6f17f7a55706aac608d082efe6 |
|
BLAKE2b-256 | 4855451b9bf48abe02cb9864b2573276234d2e3c26f28b976064a6dc7b307611 |
File details
Details for the file roamPy-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: roamPy-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.0 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b436ca5c713ffc13e80bafb2d485a9b226c3f816641ee1bc3b849abb88ede677 |
|
MD5 | 44f71eb300415f8c60fe2bb566c4662e |
|
BLAKE2b-256 | 50ff648adb67ebef6179d0eefe1ff33ec9c5491ca8b6cea5688f407df95b476f |