Skip to main content

Creates a SDK for Braze platform

Project description

braze-python-sdk

The SDK is unofficial and is still under development.

Example

Create the SDK instance

from json import dumps

from braze import Braze

YOUR_HOST = "https://..."
YOUR_TOKEN = "12345678-1234-1234-1234-123456789012"

braze = Braze(
    host=YOUR_HOST,
    token=YOUR_TOKEN
)

Call /users/track endpoint

track_response = braze.users.track(
    content={
        "attributes": [
            {
                "external_id": "hello-world",
                "first_name": "Hello world"
            }
        ]
    }
)

print(dumps(track_response, indent=True))
# Console output
# {
#   "attributes_processed": 1,
#   "message": "success"
# }

Call /users/delete endpoint

delete_response = braze.users.delete(
    content={
        "external_ids": [
            "hello-world"
        ]
    }
)

print(dumps(delete_response, indent=True))
# Console output
# {
#   "deleted": 1,
#   "message": "success"
# }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

braze_client_sdk-1.0.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file braze_client_sdk-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for braze_client_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cccc8414210c6c1fe1c45cf118cbe1a0e747132d48ab1dc8ec36f04f45875eda
MD5 1cf77c09d5fea45eeefe5989cc46a085
BLAKE2b-256 79a9a9277905519ef34fb6163bc8922ae4d68cf4212849a5d7c9969aaf903e9d

See more details on using hashes here.

Supported by

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