Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Official KISSmetrics client library.

Project description

KISSmetrics tracking API wrapper for Python

A description of the API can be found at:

Support for:
  • Python 3.5, 3.6
Also tested against:
  • PyPy (Generally the latest release)


Using this library

>>> import KISSmetrics
>>> KM = KISSmetrics.Client(key='mySuperSecretApiKey')
>>> KM.record('', 'Viewed Homepage')
<urllib3.response.HTTPResponse object at 0x...>
>>> KM.record('', 'Signed Up', {'Plan' : 'Pro', 'Amount' : 99.95})
<urllib3.response.HTTPResponse object at 0x...>
>>> KM.record('', 'Signed Up', timestamp=1234567890)
<urllib3.response.HTTPResponse object at 0x...>
>>> KM.set('', {'gender': 'male'})
<urllib3.response.HTTPResponse object at 0x...>

Compatibility client

A compatibility client is provided which is intended to act like the previous generation of Python library here.

This interface is provided for compatibility only, and will not be supported in the future.

Example Usage

>>> from KISSmetrics import KM
>>> km = KM("this is your API key")
>>> km.key
'this is your API key'
>>> km.identify('')
>>> km.identity
>>> km.check_id_key() # this will throw exception if key or identity is None
>>> km.record('Viewed Homepage')
>>> km.record('Signed Up', {'Plan' : 'Pro', 'Amount' : 99.95})
>>> km.record('Signed Up', {'_d' : 1, '_t' : 1234567890})
>>> km.set({'gender' : 'male'})

Project details

Download files

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

Files for py-KISSmetrics, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size py_KISSmetrics-1.1.0-py2.py3-none-any.whl (8.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size py-KISSmetrics-1.1.0.tar.gz (5.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page