Skip to main content

Wikimedia Pageview API client

Project description

Build Status Code Health License

Wikimedia Pageview API client

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)

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

pageviewapi-0.2.3.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

pageviewapi-0.2.3-py2-none-any.whl (12.2 kB view details)

Uploaded Python 2

File details

Details for the file pageviewapi-0.2.3.tar.gz.

File metadata

File hashes

Hashes for pageviewapi-0.2.3.tar.gz
Algorithm Hash digest
SHA256 8e9a2c8bde4d37163409188d0655d60b32887729820eb7c36a1688b6c3b4ae52
MD5 466f1ab04c0432a972eb219bda29d0d4
BLAKE2b-256 137281f4fdf49b8cb425b38248943d8ece01675082dd9fa6eb96b7be5cb50a3c

See more details on using hashes here.

File details

Details for the file pageviewapi-0.2.3-py2-none-any.whl.

File metadata

File hashes

Hashes for pageviewapi-0.2.3-py2-none-any.whl
Algorithm Hash digest
SHA256 df126e95a147ad379dc9eaba179cfd32086dddf885f34a99bb7a780d4cadcdb9
MD5 cddf35e290fe3e37bd71676caa8ac36c
BLAKE2b-256 d2e3e136a0311a72a4dd407176c23be07fafbb2606d348031932a4cb68639183

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