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("https://umami.hostedbyyouorthem.com")
login = umami.login(username, password)
# Skip the need to pass the target website in subsequent calls.
umami.set_website_id('cc726914-8e68-4d1a-4be0-af4ca8933456')
umami.set_hostname('somedomain.com')
# List your websites
websites = umami.websites()
# Create a new event in the events section of the dashboards.
event_resp = umami.new_event(
website_id=sit'a7cd-5d1a-2b33', # Only send if overriding default above
event_name='Umami-Test',
title='Umami-Test', # Defaults to event_name if omitted.
hostname='somedomain.com', # Only send if overriding default above.
url='/users/actions',
custom_data={'client': 'umami-tester-v1'},
referrer='https://some_url')
# Call after logging in to make sure the auth token is still valid.
umami.verify_token()
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.9.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file umami_analytics-0.1.9.tar.gz
.
File metadata
- Download URL: umami_analytics-0.1.9.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5b80a4bbb8d152471c14c9aae08241a983f18c623127a192d390277673abffb |
|
MD5 | b4d3a8db160ccf58e6ae5c472fa23d29 |
|
BLAKE2b-256 | f95b642a9092155ee6cb15a220f08824a0bee6d1059d8e6cab2e6f9bfe73d9cb |
File details
Details for the file umami_analytics-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: umami_analytics-0.1.9-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf5f2dfb8ac012e40d56d906f376771cecbe4c990a83e6789f7ff2101153284d |
|
MD5 | 2f6662072c0ad3297733d8ea2d1bde2e |
|
BLAKE2b-256 | 05c03bf6b2e8eb127c353ef4ac634167a79624a97d93337b84fcc2dc56c06f06 |