Metadata-Version: 2.1
Name: pywikidata
Version: 0.1.3
Summary: Python Wrapper for Wikidata KG
License: MIT
Author: Mikhail Salnikov
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: joblib (>=1.2.0,<2.0.0)
Requires-Dist: requests (>=2.28.2,<3.0.0)
Description-Content-Type: text/markdown

# pyWikiData

Python wrapper for Wikidata Knowledge Graph

Supported SPARQL backend

## Install

```bash
pip install pywikidata
```

#### Install from source by poetry
```bash
poetry build
```

## Usage
```python
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
```
