Skip to main content

Piano API SDK

This is simple wrapper for Piano API.

Requirements

Python 3.7+

Examples

VX API

from pianosdk import Client, AccessTokenStorage

host = 'sandbox' # use 'production', 'sandbox' or custom endpoint here, like 'https://api-ap.piano.io'
client = Client(api_host=host, api_token='TOKEN', private_key='PRIVATE_KEY')
response = client.access_api.list('AID')
print(response)
response = client.publisher_term_api.list('AID')
print(response)
response = client.userref_create('UID', 'EMAIL')
print(f'User ref for [uid=UID, email=EMAIL]: {response}')
response = client.parse_webhook_data('WEBHOOK_DATA')
print(f'Webhook event: [{type(response)}] {response}')
token_storage = AccessTokenStorage(client.config)
response = token_storage.get_access_token('UNKNOWN_RID')
print(f'Access token for unknown rid: {response}')
token_storage.parse_access_tokens('TAC_VALUE')
# or use
token_storage.parse_access_tokens_from_cookies_string('ALL_COOKIES_STRING')
response = token_storage.get_access_token('RID')
print(f'Access token for known rid: {response}')

ID API

from pianosdk import Client
from pianosdk.id import PublisherLoginRequest
client = Client(environment='sandbox', api_token='TOKEN')
request = PublisherLoginRequest(aid='AID', email='test@example.com', password='1234')
response = client.publisher_identity_api.login(authorization=client.config.api_token, body=request)
print(response)

Metadata

Release files for pianosdk 16.924.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pianosdk 16.924.1
File Size Uploaded
pianosdk-16.924.1.tar.gz 109.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pianosdk 16.924.1
File Interpreter ABI Platform
pianosdk-16.924.1-py3-none-any.whl Python 3 none any Details

Total release size: 456.1 kB

Release files / pianosdk-16.924.1.tar.gz

Download URL pianosdk-16.924.1.tar.gz
Size 109.4 kB
Tags Source
SHA-256 checksum
How to use checksums
61a3d08b9ff76db6f50ceb999cf3de6495303a20a8c3990aed6ccac0b7d0da79
BLAKE2b-256 checksum
How to use checksums
f4a436befaf3647537015eec000b273c5b3bd55f4eb332a116cda9944241e3d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / pianosdk-16.924.1-py3-none-any.whl

Download URL pianosdk-16.924.1-py3-none-any.whl
Size 346.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca75f31a8d3d3ac426d42a9067133000af9ee5bac33c9a455b12d95e166c8633
BLAKE2b-256 checksum
How to use checksums
5dc9677b92150d9ca1062e7110dec067986b98600c17bdaacf8dcc885018f63a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

16.924.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page