Skip to main content

PMMatomo

A Python wrapper for the Matomo HTTP reporting API.

Run the test suite

python3 -m unittest

Installation

pip3 install PMMatomo

Usage

import datetime
from PMMatomo import Matomo, MatomoReportPeriod

m = Matomo(url=YOUR_MATOMO_API_URL,
           token=YOUR_MATOMO_AUTHENTICATION_TOKEN,
           siteId=YOUR_SITE_ID)


m.enableFilterLimit(False)
m.setReportPeriod(MatomoReportPeriod.month)

# since we set the report period to .month we get a report of the mont that this date is in
date = datetime.datetime.strptime("2019-01-26", '%Y-%m-%d')
m.setReportDateFromDatetime(date)


visitorDetails = m.genReportLiveGetLastVisistsDetails()
print(visitorDetails)

Upload to PIP

python3 -m venv venv
source venv/bin/activate
pip3 install twine
python3 setup.py sdist
twine upload dist/*

Metadata

Release files for PMMatomo 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PMMatomo 0.0.5
File Size Uploaded
PMMatomo-0.0.5.tar.gz 2.7 kB Details

Release files / PMMatomo-0.0.5.tar.gz

Download URL PMMatomo-0.0.5.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9d6af5270166e844426aa5cd90c618051cb706c86af8b3c4ede8f91e23faaeda
BLAKE2b-256 checksum
How to use checksums
d764486c9cadbf77728cee157d9a2a182508b73192512722ede0b5a92155c589
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page