Skip to main content

A simple package designed to collect the edit histories of Wikipedia pages

Project description

Wikipedia Histories

A simple tool to pull the complete edit history of a Wikipedia page in a variety of formats, including JSON, DataFrame, or directly as an object.

  >>> import wikipedia_histories as wh

  # Generate a list of revisions for a specified page
  >>> golden_swallow = wh.get_history('Golden swallow')

  # Show the revision IDs for every edit
  >>> golden_swallow
  # [130805848, 162259515, 167233740, 195388442, ...

  # Show the user who made a specific edit
  >>> golden_swallow[16].user
  # u'Snowmanradio'

  # Show the text of at the time of a specific edit
  >>> golden_swallow[16].text
  # u'The Golden Swallow (Tachycineta euchrysea) is a swallow.  The Golden Swallow formerly'...
  >>> golden_swallow[200].text
  # u'The golden swallow (Tachycineta euchrysea) is a passerine in the swallow family'...

  # Generate a dataframe with text and metadata from a the list of revisions
  >>> wh.build_df(golden_swallow)

  # Generate a JSON with text and metadata from the list of versions
  >>> wh.build_json(golden_swallow)

Installation

To install Wikipedia Histories, simply run:

$ pip install wikipedia-histories

Wikipedia Histories is compatible with Python 3.6+.

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

wikipedia_histories-0.0.6.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

wikipedia_histories-0.0.6-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file wikipedia_histories-0.0.6.tar.gz.

File metadata

  • Download URL: wikipedia_histories-0.0.6.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for wikipedia_histories-0.0.6.tar.gz
Algorithm Hash digest
SHA256 7aca495e6fc08aa1d80bb9f5fd0d9a2cae3ec76af49c01e5f2d8040350cf07c7
MD5 df78c421fccb3d974e1b73c89e1c7bdb
BLAKE2b-256 0278037b76a7daf7090fa0c0e7ad09f2b501f352ed52999b2df7fc6f17409c29

See more details on using hashes here.

File details

Details for the file wikipedia_histories-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: wikipedia_histories-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for wikipedia_histories-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9402db511c8a334003e6f04c9f81231acb17d9f74519ed59d6ac399f7699d5b0
MD5 9b671ffbe8d09d062f292589c867cfc8
BLAKE2b-256 64434dfa7bd8380a56cde04d8d70a1b980cfd45304c568147b66fe7d1c7dcc4b

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