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

Uploaded Source

Built Distribution

wikipedia_histories-0.0.11-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wikipedia_histories-0.0.11.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.11.tar.gz
Algorithm Hash digest
SHA256 d444a0bd2bfb96b856193cf923b0c4444e46aeee4ea141ab06cd95531fe9c7a5
MD5 275778a9bb9f0d0c1c3d159c0a779fba
BLAKE2b-256 77a407f11f32c9833c15f81c1b26ab6bae20fd2ed4a03f1779c51fa23182d448

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wikipedia_histories-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 5.7 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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 4e51f9819a3edf3e96dd9ac0d7c8d837d72133f464372b02a0ecb6d10cbfbdaa
MD5 54b2b6e4f30511b2774850ab4796c4be
BLAKE2b-256 42a57b3950a1291d6a49f9c1f462abb64b044e51ec3da4494f84b56ad7bf1ead

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