Braze Python Client
Project description
braze-client
A Python client for the Braze REST API
How to install
Make sure you have Python 2.7+ or 3.6+ installed and run:
$ git clone https://github.com/dtatarkin/braze-client
$ cd braze-client
$ python setup.py install
How to use
from braze.client import BrazeClient
client = BrazeClient(api_key='YOUR_API_KEY', use_auth_header=True)
r = client.user_track(
attributes=[{
'external_id': '1',
'first_name': 'First name',
'last_name': 'Last name',
'email': 'email@example.com',
'status': 'Active',
# And other fields ...
}],
events=None,
purchases=None,
)
if r['success']:
# do our magic here
print('Success!')
print(r)
else:
print(r['client_error'])
print(r['errors'])
For more examples, check examples.py
.
How to test
To run the unit tests, make sure you have the tox module installed and run the following from the repository root directory:
$ tox
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
braze-client-2.3.2.tar.gz
(8.0 kB
view hashes)
Built Distribution
Close
Hashes for braze_client-2.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 082039591770cecd811dcdf2b1b96b0d9baf5767ef6a36367fba635dfcef8c0f |
|
MD5 | 74f00020d603510961b24ceb321d9cc2 |
|
BLAKE2b-256 | 7721506c5c4f9abe41617b9165f69038a0a70e48be092031512a83a150c4aaf8 |