An API client for the Pureport ReST API
Project description
Pureport Python Client
A thin Python 2/3 client for the Pureport ReST API, backed by requests.
Install
pip install pureport-client
Usage
from pureport.api.client import Client
client = Client()
client.login("MY_API_KEY", "MY_API_SECRET")
### List Accounts
accounts = client.accounts.list()
first_account = accounts[0]
### Get all Members or Roles for an Account
members = client.accounts.members(first_account).list()
roles = client.accounts.roles(first_account).list()
### Update a Member with all the Roles on an Account
first_member = members[0]
first_member['roles'] = [Client.to_link(role, role['name']) for role in roles]
client.accounts.members(first_account).update(first_member)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pureport-client-0.0.1.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for pureport_client-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c73d9bcf9ca011de273a9fbf7beb0b6c54354164f19e043a1626ed23c9ecc838 |
|
MD5 | ab5cda8d544609284948cefabd6940bc |
|
BLAKE2b-256 | 9d80ce5bfe6a4302c867a154150eba0e51bf2296ddc2321feeb8392ee9834532 |