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.3.tar.gz
(8.0 kB
view details)
Built Distribution
File details
Details for the file braze-client-2.3.3.tar.gz
.
File metadata
- Download URL: braze-client-2.3.3.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 507250a133a42aa1ce3e4e6e98c16c5fa8df021addffe909b41d3903ccac1b75 |
|
MD5 | 581907b15448a7e33fc4774535d7b871 |
|
BLAKE2b-256 | 4d17832c7a59e9f872bef1f4c039f15ced35bdbd97cb1f926bb4f49aff611569 |
File details
Details for the file braze_client-2.3.3-py3-none-any.whl
.
File metadata
- Download URL: braze_client-2.3.3-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17a502998c7a777ced594cb10ad5aa67cbace5773c2a06e3684d08fcb3288c57 |
|
MD5 | e95972f19b3d33b4d013060b64b9c326 |
|
BLAKE2b-256 | 0e76d440321788b86392d6b06fb60ff0ed622304c32ceb54bd4f868ce725bfc9 |