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.949.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pianosdk-16.949.0.tar.gz | 109.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pianosdk-16.949.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 458.2 kB
Release files / pianosdk-16.949.0.tar.gz
| Download URL | pianosdk-16.949.0.tar.gz |
|---|---|
| Size | 109.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8b9d2e91326a08925d8872cd5c41e82d341d921c0750afeb58e0866b018bb40
|
|
BLAKE2b-256 checksum How to use checksums |
b93ad7f75b9541251c0e63dc8fd8cd024c734e6091ef02ae4f37876732455c33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / pianosdk-16.949.0-py3-none-any.whl
| Download URL | pianosdk-16.949.0-py3-none-any.whl |
|---|---|
| Size | 348.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f4581b1dc97ef28f70ee905106bd0a26c40e30c3bef64931c1c59959f54bae8
|
|
BLAKE2b-256 checksum How to use checksums |
64a2502e16871b135e22391e2463493ab67120ce316ec7b73e3c8a004124be46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|