pyWikiData
Python wrapper for Wikidata Knowledge Graph
Supported SPARQL backend
Install
pip install pywikidata
Install from source by poetry
poetry build
Usage
from pywikidata import Entity
entity = Entity('Q90')
entity.label # >> Paris
Entity.from_label('Paris') # >> [<Entity: Q116373885>, <Entity: Q116373939>, <Entity: Q90>, ...]
entity.instance_of # >> [<Entity: Q174844>, <Entity: Q200250>, <Entity: Q208511>, ...]
entity.forward_one_hop_neighbours # >> [(<Entity(Property): P6>, <Entity: Q2851133>), (<Entity(Property): P8138>, <Entity: Q108921672>), ...]
entity.backward_one_hop_neighbours
Entity("P81").is_property # >> True
Entity("Q90").is_property # >> False
Metadata
Release files for pywikidata 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pywikidata-0.1.9.tar.gz | 6.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pywikidata-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / pywikidata-0.1.9.tar.gz
| Download URL | pywikidata-0.1.9.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5e7152a24c2274fc0a68a2778098c3b7e2f623652fd9598f306cd7596a37e4b
|
|
BLAKE2b-256 checksum How to use checksums |
4b1be69068ee1d6b491afcbe0a25e919282e198ff3cc7afa4903488b8899533e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.9 Darwin/23.1.0
|
Release files / pywikidata-0.1.9-py3-none-any.whl
| Download URL | pywikidata-0.1.9-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9190910b62fa2d0942c79759438aeef9c43a004695601333e6f82e847eff4a8
|
|
BLAKE2b-256 checksum How to use checksums |
d17cf087d0adf8d5d774fb7d7bd38e976fcd7117b1373450edfded0e4a24be6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.9 Darwin/23.1.0
|