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.
}
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8484c5e64696fa49e43ed56dfdf6d188c2b6336ea3a5291f589674d42e41fdc |
|
MD5 | 685651aaecd965136edb0754bd791cd5 |
|
BLAKE2b-256 | 6c1e351d7f8bb4d86cc48ed4e836e812ad1b8937046c632f69b4e512064b6d8e |
File details
Details for the file wikidata_dl-2023.7.27-py3-none-any.whl
.
File metadata
- Download URL: wikidata_dl-2023.7.27-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93ba452dabb2ba59f3a1b5586e5dae6e3e1a1c101efa9c18d92d1be32f2ad737 |
|
MD5 | d48d91ae5a0cf7de82ba5a2eb170fe90 |
|
BLAKE2b-256 | 931dbdbf872a500ef641473b956a00ad0f5f6356ac5b2687387ec9c883b2bd30 |