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
Metadata
Release files for braze-client 2.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| braze-client-2.3.3.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| braze_client-2.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / braze-client-2.3.3.tar.gz
| Download URL | braze-client-2.3.3.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
507250a133a42aa1ce3e4e6e98c16c5fa8df021addffe909b41d3903ccac1b75
|
|
BLAKE2b-256 checksum How to use checksums |
4d17832c7a59e9f872bef1f4c039f15ced35bdbd97cb1f926bb4f49aff611569
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.2
|
Release files / braze_client-2.3.3-py3-none-any.whl
| Download URL | braze_client-2.3.3-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17a502998c7a777ced594cb10ad5aa67cbace5773c2a06e3684d08fcb3288c57
|
|
BLAKE2b-256 checksum How to use checksums |
0e76d440321788b86392d6b06fb60ff0ed622304c32ceb54bd4f868ce725bfc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.2
|