Skip to main content

pageview-api

CI codecov Pypi License

Wikimedia Pageview API client for Python 3.10+

Installation

In order to install system wide on system using sudo you can use:

pip install git+https://github.com/Commonists/pageview-api.git

Examples

Number of view on English Wikipedia of article Paris from November 6th to November 20th 2015

import pageviewapi
pageviewapi.per_article('en.wikipedia', 'Paris', '20151106', '20151120',
                        access='all-access', agent='all-agents', granularity='daily')

Aggregation: Get a daily pageview count timeseries of all projects for the month of October 2015

import pageviewapi
pageviewapi.aggregate('fr.wikipedia', '2015100100', '2015103100', access='all-access',
                      agent='all-agents', granularity='daily')

Most viewed articles on French Wikipedia on November 14th, 2015

import pageviewapi
pageviewapi.top('fr.wikipedia', 2015, 11, 14, access='all-access')

Sum (resp. average) of view during last 30 days

import pageviewapi.period
pageviewapi.period.sum_last('fr.wikipedia', 'Paris', last=30,
                            access='all-access', agent='all-agents')

pageviewapi.period.avg_last('fr.wikipedia', 'Paris', last=30)

Monthly legacy pagecounts (2008 until end of 2016) on a project

import pageviewapi
pageviewapi.legacy_pagecounts('fr.wikipedia', '2010010100', '2011010100', granularity='monthly')

Metadata

Release files for pageviewapi 0.5.0

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

Source distribution (sdist)

Source distribution for pageviewapi 0.5.0
File Size Uploaded Provenance
pageviewapi-0.5.0.tar.gz 6.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pageviewapi 0.5.0
File Interpreter ABI Platform
pageviewapi-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / pageviewapi-0.5.0.tar.gz

Download URL pageviewapi-0.5.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dfc1cd8a2a146f83f80c8171bc59ff9aa533037ab8cc7d7aacf22d1b6a34c14e
BLAKE2b-256 checksum
How to use checksums
32613900f27c2dd4af28c7626cda9b0ca5bd1e82e3ba556a600c6750a0ce2668
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pageviewapi-0.5.0-py3-none-any.whl

Download URL pageviewapi-0.5.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0092d4f9e7fffea783688807d78aa2187c60e3fa843ebe5eb916f1aa709c10cd
BLAKE2b-256 checksum
How to use checksums
2f39afaae9fa8163fbf78fb14d190bfd15d9b0b6aef12e3607a0127d087aec55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for pageviewapi 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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