Skip to main content

Python wrapper around the Assembly Payments API

Project description

py-assembly-payments

Unofficial Python client for the Assembly Payments API

Installation

pip install py-assembly-payments

Example

from assembly_payments.client import AssemblyClient

client = AssemblyClient(client_id=CLIENT_ID, client_secret=CLIENT_SECRET)

# List Users
client.users.list()

# Create User
user = client.users.create(
    id="your-user-id",
    first_name="Jane",
    last_name="Doe",
    email="jane.doe@example.com"
)

# Easy object access
print(user.first_name + user.last_name) # Jane Doe

Credentials

You can set your auth credentials in two ways:

  1. Through arguments to the client:
AssemblyClient(client_id=CLIENT_ID, client_secret=CLIENT_SECRET, scope=CLIENT_SCOPE, grant_type="client_credentials")
  1. Through environment variable which AssemblyClient will pick up from:
export ASSEMBLY_CLIENT_ID=my-client-id
export ASSEMBLY_CLIENT_SECRET=my-client-secret
export ASSEMBLY_SCOPE=my-scope

grant_type defaults to "client_credentials" and can only be controlled by an argument to AssemblyClient.

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

py-assembly_payments-0.1.1.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file py-assembly_payments-0.1.1.tar.gz.

File metadata

  • Download URL: py-assembly_payments-0.1.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.8

File hashes

Hashes for py-assembly_payments-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9e91effd36fdcb8354ed9bcda744bf1b0fabb1ea8f8fe07f7fca2975ca06fedb
MD5 2c810031268e96998e9266c5fc71e20f
BLAKE2b-256 31e1cc8ca056cc62d8b2f14804b2433c5b7fbc9cf6b0fb666e3b0ad1a1344115

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