Skip to main content

Wikipedia downloader

wikipedia_downloader is a Python module that makes it easy to download Wikipedia data dumps.

Installation

To install wikipedia_downloader, simply run:

pip install wikipedia_downloader

Documentation

Functions

  • wikipedia_downloader.download_sql_dump(language, file, dump="latest", target_dir=".")

    Downloads and decompresses a Wikipedia SQL dump.

    Arguments:

    • language: Wikipedia name (language code).
    • file: File name.
    • dump: Dump version.
    • target_dir: Target directory.

    Example

    import wikipedia_downloader as wpd
    wpd.download_sql_dump("en", "pagelinks", dump="20190101", target_dir="./dumps")
    
  • wikipedia_downloader.get_dataframe(language, file, dump="latest", select=None, where=None)

    Builds a pandas.DataFrame from a Wikipedia SQL dump.

    Arguments:

    • language: Wikipedia name (language code).
    • file: File name.
    • dump: Dump version.
    • select: Columns to be kept.
    • where: Functions used to filter records.

    Returns: pandas.DataFrame

    Example

    import wikipedia_downloader as wpd
    select = ["page_id", "page_namespace", "page_title"]
    where = {"page_namespace": lambda x: x == 0 or x == 14}
    df = wpd.get_dataframe("en", "page", dump="20190101", select=select, where=where)
    

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Metadata

Release files for wikipedia-downloader 0.2

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

Source distribution (sdist)

Source distribution for wikipedia-downloader 0.2
File Size Uploaded Provenance Actions
wikipedia_downloader-0.2.tar.gz 2.9 kB Without provenance Details for wikipedia_downloader-0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wikipedia-downloader 0.2
File Interpreter ABI Platform Actions
wikipedia_downloader-0.2-py3-none-any.whl Python 3 none any Details for wikipedia_downloader-0.2-py3-none-any.whl

Total release size: 6.9 kB

Release files / wikipedia_downloader-0.2.tar.gz

Download URL wikipedia_downloader-0.2.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
71d881e37337bb4b89dc3efd7740064ad9bbabacd8775af7c3a388fa75b7185d
BLAKE2b-256 checksum
How to use checksums
c2a63dfe3d1a1715373f6a7f8171b51820440489e6ddea694ae44b0eee0abd10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

Release files / wikipedia_downloader-0.2-py3-none-any.whl

Download URL wikipedia_downloader-0.2-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed4b68aa983e631385367a9553d37bff02c04617fae2f244755ce7d0402b97be
BLAKE2b-256 checksum
How to use checksums
b337cbf8b1e1f85dec357cd61064bd8e71e96d58d0e8cf249f5e8de5d8a2660a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

Security for wikipedia-downloader 0.2

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files No provenance

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