Skip to main content

WikipediaQL: querying structured data from Wikipedia

WikipediaQL is an experimental query language and, executable script, and Python library for querying structured data from Wikipedia. It looks like this:

$ wikipedia_ql --page "Guardians of the Galaxy (film)" \
    '{
      page@title as "title";
      section[heading="Cast"] as "cast" >> {
          li >> text:matches("^(.+?) as (.+?):") >> {
              text-group[group=1] as "actor";
              text-group[group=2] as "character"
          }
      };
      section[heading="Critical response"] >> {
          sentence:contains("Rotten Tomatoes") as "RT ratings" >> {
              text:matches("\d+%") as "percent";
              text:matches("(\d+) (critic|review)") >> text-group[group=1] as "reviews";
              text:matches("[\d.]+/10") as "overall"
          }
      }
    }'

title: Guardians of the Galaxy (film)
RT ratings:
  overall: 7.8/10
  percent: 92%
  reviews: '334'
cast:
- actor: Chris Pratt
  character: Peter Quill / Star-Lord
- actor: Zoe Saldaña
  character: Gamora
...

Read full README.md on GitHub

Metadata

Release files for wikipedia-ql 0.0.6

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-ql 0.0.6
File Size Uploaded Provenance Actions
wikipedia_ql-0.0.6.tar.gz 25.5 kB Without provenance Details for wikipedia_ql-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wikipedia-ql 0.0.6
File Interpreter ABI Platform Actions
wikipedia_ql-0.0.6-py3-none-any.whl Python 3 none any Details for wikipedia_ql-0.0.6-py3-none-any.whl

Total release size: 49.3 kB

Release files / wikipedia_ql-0.0.6.tar.gz

Download URL wikipedia_ql-0.0.6.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6f78987f526b6fe36b425c2b1d424bc6e078fd0ef436a46c431bc6af14cc82df
BLAKE2b-256 checksum
How to use checksums
fe2c7dc817dc213929d4a3c02555bd1b22536d64ac5e832c1e192d17a3301e2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.27.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.6

Release files / wikipedia_ql-0.0.6-py3-none-any.whl

Download URL wikipedia_ql-0.0.6-py3-none-any.whl
Size 23.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c3ee0f329ae1d633b70f4bd5f3bdea41003111540ce82be7dbb1c683edd6354
BLAKE2b-256 checksum
How to use checksums
4afb8f9cd3fe774e912d5cdaba6fbcacfe5ef80d7697ae527a19ce1d715b666e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.27.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.6

Security for wikipedia-ql 0.0.6

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.

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