Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

events-sdk-python

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

events-sdk-python

Events SDK Python for Hightouch event collection.

  • 0.0.3
  • PyPI
  • Socket score

Maintainers
3

Events SDK Python

Installation

Install events-sdk-python using pip:

python -m pip install events-sdk-python

Usage

By default, you do not need to manually instantiate the client. Simply set your key and start calling methods.

import hightouch.htevents as htevents

htevents.write_key = 'YOUR_WRITE_KEY'

htevents.identify('userId1', {
    'email': 'bat@example.com',
    'name': 'Person People',
})

htevents.track('userId1', 'Order Completed', {})

Note If you need to send data to multiple Hightouch sources, you can initialize one new Client per write_key.

from hightouch.htevents.client import Client

htevents.write_key = 'YOUR_WRITE_KEY'
other_htevents = Client('<OTHER_WRITE_KEY>')

htevents.identify('userId1', {
    'email': 'bat@example.com',
    'name': 'Person People',
})

other_htevents.identify('userId1', {
    'email': 'bat@example.com',
    'name': 'Person People',
})

htevents.track('userId1', 'Order Completed', {})
other_htevents.track('userId1', 'Order Completed', {})

Note Only instantiate Client class once per write key, per application.

from flask import Flask
from hightouch.htevents.client import Client

app = Flask(__name__)

// For example, in flask, instantiate the client outside of the request handlers
htevents = Client('<WRITE_KEY>')

@app.route('/')
def hello_world():
   htevents.track('userId1', 'hello', {})
   return 'Hello World'

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc