Skip to main content

Braze Python Client

Project description

braze-client

A Python client for the Braze REST API

Build Status Coverage

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


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-p311-0.0.5.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

braze_client_p311-0.0.5-py2-none-any.whl (8.4 kB view details)

Uploaded Python 2

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

Hashes for braze-client-p311-0.0.5.tar.gz
Algorithm Hash digest
SHA256 0baa14f3fd1a8c7d0330bd72ffa897119e88b2b219f7e3f373330c5b25bd2113
MD5 7e9190f663b7469e2e22f73e6f76df85
BLAKE2b-256 1ec3cd595f2fc506c17d214f57df6944e5834f456c8801c4de5614a1b6b719b7

See more details on using hashes here.

File details

Details for the file braze_client_p311-0.0.5-py2-none-any.whl.

File metadata

File hashes

Hashes for braze_client_p311-0.0.5-py2-none-any.whl
Algorithm Hash digest
SHA256 7459e2914cac19fee91ba905bb843d5d7d9ad90c5dba2c9d15d00ea8e1f3acd0
MD5 49d926fc439518a38d8efaad30ca6842
BLAKE2b-256 2d7964f4fc00691d9955759bba0318dd07f43ced9e8bec91c26d7fb0f6a63b4d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page