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.6.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file umami_analytics-0.1.6.tar.gz
.
File metadata
- Download URL: umami_analytics-0.1.6.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ffc22f21e6fee2818b43c147e3f52c27a2f6e3f1c699188e6b1d1067ae86e91 |
|
MD5 | 83362e4b8e58470c8145d9cbbc5d379d |
|
BLAKE2b-256 | 230b1b33c35fe9d45d2f873d6ecae976737a105acf1aecd18c46eb19a9b29d10 |
File details
Details for the file umami_analytics-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: umami_analytics-0.1.6-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb8620785e9ead214356e7a23c8ec36448945a7f18e9a15619f594661dd9db50 |
|
MD5 | f97b0ea818731c3e8e7a59bbfcf8d331 |
|
BLAKE2b-256 | 30a9241f57183f6887808b259ab76cbbdeaa30366af4289059c63d63dfcc7c37 |