Skip to main content

A Python wrapper for the Matomo HTTP reporting API.

Project description

PMMatomo

A Python wrapper for the Matomo HTTP reporting API.

Run the test suite

python3 -m unittest

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PMMatomo-0.0.2.tar.gz (2.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page