Python wrapper around the Assembly Payments API
Project description
py-assembly-payments
Unofficial Python client for the Assembly Payments API
🚧 In Development 🚧
This package is still undergoing development and is pre-v1. It currently implements around 30% of the Assembly Payments API. You can keep up with the coverage here
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:
- Through arguments to the client:
AssemblyClient(client_id=CLIENT_ID, client_secret=CLIENT_SECRET, scope=CLIENT_SCOPE, grant_type="client_credentials")
- 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
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
File details
Details for the file py-assembly-payments-0.4.1.tar.gz
.
File metadata
- Download URL: py-assembly-payments-0.4.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e58b1c7abc1c76f5c2d55cc243dccf2be59ebcb26e763c3e66e90a633734222 |
|
MD5 | eeae26ce9b16fca1e3cbc1578dac57fe |
|
BLAKE2b-256 | fa8a6063b4211b7aa0bbdc6e0781ca4a72eb3b43921b0cf3ffd84db740d4d87a |