Skip to main content

Download data from Wikidata based on input SPARQL query.

Project description

wikidata-dl

Description

wikidata-dl is a command line program for downloading data from Wikidata based on SPARQL queries.

Installation

pip install wikidata-dl

Usage

Download result returned from the query and save it in the directory ./wikidata:

wikidata-dl /path/to/my-query.sparql

For a complete reference of the command line options run:

wikidata-dl --help

Sample Query

The following query returns IDs for all Wikidata entities that are an instance of (P31) a continent (Q5107).

SELECT ?item WHERE {
    ?item wdt:P31 wd:Q5107.
}

Try the query

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

wikidata_dl-2023.7.27.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

wikidata_dl-2023.7.27-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file wikidata_dl-2023.7.27.tar.gz.

File metadata

  • Download URL: wikidata_dl-2023.7.27.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.0

File hashes

Hashes for wikidata_dl-2023.7.27.tar.gz
Algorithm Hash digest
SHA256 b8484c5e64696fa49e43ed56dfdf6d188c2b6336ea3a5291f589674d42e41fdc
MD5 685651aaecd965136edb0754bd791cd5
BLAKE2b-256 6c1e351d7f8bb4d86cc48ed4e836e812ad1b8937046c632f69b4e512064b6d8e

See more details on using hashes here.

File details

Details for the file wikidata_dl-2023.7.27-py3-none-any.whl.

File metadata

File hashes

Hashes for wikidata_dl-2023.7.27-py3-none-any.whl
Algorithm Hash digest
SHA256 93ba452dabb2ba59f3a1b5586e5dae6e3e1a1c101efa9c18d92d1be32f2ad737
MD5 d48d91ae5a0cf7de82ba5a2eb170fe90
BLAKE2b-256 931dbdbf872a500ef641473b956a00ad0f5f6356ac5b2687387ec9c883b2bd30

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