Important: As of August 13, 2024, this page will no longer be actively maintained. Please refer to the current version of this content here.
Overview
1. Installation & Setup
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.
2. Sending Events
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.