Download the library on GitHub
After downloading the client, add the indicative.py
file to your project and import Indicative.
import indicative
Before you start recording events, call the init()
method and pass in your project’s API key:
indicative.init('Your-API-key-goes-here')
You should only have to do this once.
Next, to record an event, set up a dictionary object with your property names and value, and then call the record()
method. Its usage looks like this:
properties = {'Gender': 'Female', 'Age': 23}
indicative.record('Registration', 'user47', properties)
The record()
method takes three arguments: the event name, the user’s unique ID, and a dictionary containing the event’s property names and values. This method creates a JSON representation of your event and sends it to our API endpoint. Note that this is done synchronously.
Was this page helpful?