Skip to main content

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


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)

Uploaded Source

Built Distribution

pureport_client-0.0.1-py3-none-any.whl (9.3 kB view hashes)

Uploaded Python 3

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