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

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/*

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.5.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file PMMatomo-0.0.5.tar.gz.

File metadata

  • Download URL: PMMatomo-0.0.5.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for PMMatomo-0.0.5.tar.gz
Algorithm Hash digest
SHA256 9d6af5270166e844426aa5cd90c618051cb706c86af8b3c4ede8f91e23faaeda
MD5 0c824e509916b3d3d18731cdd2ad075e
BLAKE2b-256 d764486c9cadbf77728cee157d9a2a182508b73192512722ede0b5a92155c589

See more details on using hashes here.

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