Umami Analytics Client for Python
Project description
Umami Analytics Client for Python
Analytics client for privacy-preserving, open source Umami platform based on
httpx
and pydantic
.
Partially implemented
Implemented endpoints:
POST /api/auth/login
aslogin_async
andlogin
POST /api/auth/verify
asverify_token_async
andverify_token
GET /api/websites
aswebsites_async
andwebsites
POST /api/send
asnew_event_async
andnew_event
See the API documentation for the remaining endpoints to be added (PRs welcome).
Installation
Just pip install umami-analytics
Usage
import umami
umami.set_url_base(analytics_server_url)
login = umami.login(user, password)
# Skip the need to pass the target website in subseqent calls.
umami.set_website_id('cc726914-8e68-4d1a-4be0-af4ca8933456')
# List your websites
websites = umami.websites()
# Create a new event in the events section of the dashboards.
event_resp = umami.new_event(
website_id=site.id,
event_name='Umami-Test',
title='Umami-Test',
hostname='somedomain.com',
url='/users/actions',
custom_data={'client': 'umami-tester-v1'},
referrer='https://some_url')
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
umami_analytics-0.1.7.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for umami_analytics-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fd2cd8eebbde59c1cd076f1ce389f866fd35d1486e2e3b7bb4f8cce456ecc89 |
|
MD5 | 79a63c8fa06315b276fd9f76308f57d6 |
|
BLAKE2b-256 | 6919590f657b4323dc65c189e950abf15813a458119fa06cc3ba5524213a857c |