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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file braze-client-p311-0.0.5.tar.gz.
File metadata
- Download URL: braze-client-p311-0.0.5.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0baa14f3fd1a8c7d0330bd72ffa897119e88b2b219f7e3f373330c5b25bd2113
|
|
| MD5 |
7e9190f663b7469e2e22f73e6f76df85
|
|
| BLAKE2b-256 |
1ec3cd595f2fc506c17d214f57df6944e5834f456c8801c4de5614a1b6b719b7
|
File details
Details for the file braze_client_p311-0.0.5-py2-none-any.whl.
File metadata
- Download URL: braze_client_p311-0.0.5-py2-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7459e2914cac19fee91ba905bb843d5d7d9ad90c5dba2c9d15d00ea8e1f3acd0
|
|
| MD5 |
49d926fc439518a38d8efaad30ca6842
|
|
| BLAKE2b-256 |
2d7964f4fc00691d9955759bba0318dd07f43ced9e8bec91c26d7fb0f6a63b4d
|