Official KISSmetrics client library.
Project description
KISSmetrics tracking API wrapper for Python
A description of the API can be found at: https://support.kissmetrics.io/reference#api-specifications-1
- Support for:
Python 3.5, 3.6
- Also tested against:
PyPy (Generally the latest release)
Documentation: http://py-kissmetrics.readthedocs.org/
Using this library
>>> import KISSmetrics
>>> KM = KISSmetrics.Client(key='mySuperSecretApiKey')
>>> KM.record('bob@bob.com', 'Viewed Homepage')
<urllib3.response.HTTPResponse object at 0x...>
>>> KM.record('bob@bob.com', 'Signed Up', {'Plan' : 'Pro', 'Amount' : 99.95})
<urllib3.response.HTTPResponse object at 0x...>
>>> KM.record('bob@bob.com', 'Signed Up', timestamp=1234567890)
<urllib3.response.HTTPResponse object at 0x...>
>>> KM.set('bob@bob.com', {'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('bob@bob.com')
>>> km.identity
'bob@bob.com'
>>> 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py-KISSmetrics-1.1.0.tar.gz.
File metadata
- Download URL: py-KISSmetrics-1.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b92a8dbb8827a5e77d41772d774211322ea986175393f59d5ad4b17a35a73fd4
|
|
| MD5 |
865553046cd837a52101597baa25fed5
|
|
| BLAKE2b-256 |
f24dd8e940c168de8d5bdd5d213a94d72d086df15398ef6130760cfbc3b6d6d1
|
File details
Details for the file py_KISSmetrics-1.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: py_KISSmetrics-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b1faa2a87ee251caddd6f633584d9f82451e36f2e4dd8c540e243cd69076d9d
|
|
| MD5 |
cb926949da46a2ba3d12c4f6f97db1da
|
|
| BLAKE2b-256 |
a1bdaba64cccf15899187a648f4849124c44605bdfd2c7355db510bbcaa75abc
|