Skip to main content

A piano API implementation

Project description

piano_sdk

Our Python SDK for Piano's API

Merge/Continous Delivery

This SDK has a deployment pipeline running on the Team City server that will automatically package new merges to Master and deploy to PyPI. This requires that all merges to Master have an incremented version compared to previous merges.

At this time, there is no enforcement in the build pipeline, and will result in a failed deployment on Team City as PyPI will not let you deploy an existing version (without workarounds that are not currently used, and which break the paradigm of semantic versioning).

So ensure that all PRs contain a version bump, and please adhere to Semantic versioning

Usage examples

import piano_sdk

piano_sdk.aid = '<aid>'
piano_sdk.api_token = '<api_token>'


data = ('p7p3HxV20qHo3loRA36dJ1W2Y45taSpB7DXvJHImnuZuIre3j3x5HQ1B89YDWJkEIyWGCbsv_E25KqkV_8'
        '4v8VxgkxLaBEMqyOvNe_KSo1FDj7Upxv5Mgh8O7nGBEfQMVNE8XcbSKxwc-2kO4riLFoePVs9M4K3zMEmU'
        '5sJ7lKQL7S6bRsxm0MJtTV5gWEhKm85tPZcI2DewZVittlW1kOSAUBWzUPIO9iLh27n9CXKOUmbdXs4lAG'
        'O0U6ut_v2ApR-izNVo5mEzQygGsBCDWHvnmN2gx301XdM_vbGcfT0~~~NFxQCAc3j9Q7C_6j7z0P_wMSW3'
        'Lo22g1VlOdbvtNyj0')

descrypted = piano_sdk.SecurityUtils.decrypt(PRIVATE_KEY, data)

app = piano_sdk.App.retrieve('4Jqhagel8p')
apps = piano_sdk.App.list()

conversion = piano_sdk.Conversion.retrieve('TCC8DQTNPPK6')
conversions = piano_sdk.Conversion.list()

export = piano_sdk.Export.retrieve('URP2EVQIEEC3')
exports = piano_sdk.Export.list()

inquires = piano_sdk.Inquiry.list(uid='PNIIkVWiLprzb1b')

offer = piano_sdk.Offer.retrieve('OFU5ZE7R3O7U')
offers = piano_sdk.Offer.list()

promotion = piano_sdk.Promotion.retrieve('PN7BQW44LNMD')
promotions = piano_sdk.Promotion.list()

resource = piano_sdk.Resource.retrieve('BRDGIBNP')
resources = piano_sdk.Resource.list()

subscriptions = piano_sdk.Subscription.list()

offer_template = piano_sdk.OfferTemplate.retrieve('OTAI93QQ8MU5')
offer_templates = piano_sdk.OfferTemplate.list()

term = piano_sdk.Term.retrieve('TMQ93DOA69O3')
terms = piano_sdk.Term.list()

user = piano_sdk.User.retrieve('PNIIkVWiLprzb1b')
access_check = user.access_check(rid='BRDGIBNP')
accesses = user.access_list(access_id='7hOudV6FD1zZ')
subscriptions = user.subscriptions()
users = piano_sdk.User.list(limit=2)

for user in users.auto_paging_iter():
    print('{}: {} {}'.format(user['uid'], user['first_name'], user['last_name']))

webhook = piano_sdk.Webhook.retrieve('WERKQKWQYRSJYULWMCLA')
webhooks = piano_sdk.Webhook.list()

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

hr-piano-sdk-0.8.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

hr_piano_sdk-0.8.1-py2-none-any.whl (11.1 kB view details)

Uploaded Python 2

File details

Details for the file hr-piano-sdk-0.8.1.tar.gz.

File metadata

  • Download URL: hr-piano-sdk-0.8.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/2.7.15rc1

File hashes

Hashes for hr-piano-sdk-0.8.1.tar.gz
Algorithm Hash digest
SHA256 aa657f71a34267c5b281144f04298596c210e4ae73fa5a01fa365054246b7715
MD5 625c9e07c8603127a29c159ae4f7ce62
BLAKE2b-256 56f2c5b23f4fa8369e03c6c94503cf27cdec4d720ec327d71eb3fcb58463a7ab

See more details on using hashes here.

File details

Details for the file hr_piano_sdk-0.8.1-py2-none-any.whl.

File metadata

  • Download URL: hr_piano_sdk-0.8.1-py2-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/2.7.15rc1

File hashes

Hashes for hr_piano_sdk-0.8.1-py2-none-any.whl
Algorithm Hash digest
SHA256 35a30a345817b972e38b47b2084a5a9dc6ea20db89a1d9061481c6ba55f8212a
MD5 f1a75df4f9fe44174df9a4760e6dd884
BLAKE2b-256 ba88af3ebe85134bcc6d9f8c659beba87c0e3026b2811d899fa6f247a58b18ed

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