This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Wikimedia Pageview API client

Project Description

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)

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

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

Release History

This version
History Node

0.4.0

History Node

0.2.3

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pageviewapi-0.4.0-py2.py3-none-any.whl (6.9 kB) Copy SHA256 Checksum SHA256 2.7 Wheel May 19, 2017
pageviewapi-0.4.0.tar.gz (3.7 kB) Copy SHA256 Checksum SHA256 Source May 19, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting