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:
$ pip install braze-client-p311
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
Built Distribution
Close
Hashes for braze_client_p311-0.0.4-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9303a617bacf26bd0ded8e76fab81da44994b91844b9076e426d7c257875c30 |
|
MD5 | 6c8c341505c41467ad389ca645f940e0 |
|
BLAKE2b-256 | 9fe593d9bf48d42c661f86d6df9a1a9486f62d6aeba09f973e80904243e8f6a6 |