pywikidata


Namepywikidata JSON
Version 0.1.9 PyPI version JSON
download
home_page
SummaryPython Wrapper for Wikidata KG
upload_time2024-03-01 14:24:01
maintainer
docs_urlNone
authorMikhail Salnikov
requires_python>=3.7,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
```
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pywikidata",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Mikhail Salnikov",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/4b/1b/e69068ee1d6b491afcbe0a25e919282e198ff3cc7afa4903488b8899533e/pywikidata-0.1.9.tar.gz",
    "platform": null,
    "description": "# pyWikiData\n\nPython wrapper for Wikidata Knowledge Graph\n\nSupported SPARQL backend\n\n## Install\n\n```bash\npip install pywikidata\n```\n\n#### Install from source by poetry\n```bash\npoetry build\n```\n\n## Usage\n```python\nfrom pywikidata import Entity\n\nentity = Entity('Q90')\nentity.label # >> Paris\n\nEntity.from_label('Paris') # >> [<Entity: Q116373885>, <Entity: Q116373939>, <Entity: Q90>, ...]\n\nentity.instance_of # >> [<Entity: Q174844>, <Entity: Q200250>, <Entity: Q208511>, ...]\n\nentity.forward_one_hop_neighbours # >> [(<Entity(Property): P6>, <Entity: Q2851133>), (<Entity(Property): P8138>, <Entity: Q108921672>), ...]\nentity.backward_one_hop_neighbours\n\nEntity(\"P81\").is_property # >> True\nEntity(\"Q90\").is_property # >> False\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python Wrapper for Wikidata KG",
    "version": "0.1.9",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d17cf087d0adf8d5d774fb7d7bd38e976fcd7117b1373450edfded0e4a24be6e",
                "md5": "82bd94291f3f9447dbdc2766e65e1e16",
                "sha256": "f9190910b62fa2d0942c79759438aeef9c43a004695601333e6f82e847eff4a8"
            },
            "downloads": -1,
            "filename": "pywikidata-0.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "82bd94291f3f9447dbdc2766e65e1e16",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 7732,
            "upload_time": "2024-03-01T14:23:59",
            "upload_time_iso_8601": "2024-03-01T14:23:59.219266Z",
            "url": "https://files.pythonhosted.org/packages/d1/7c/f087d0adf8d5d774fb7d7bd38e976fcd7117b1373450edfded0e4a24be6e/pywikidata-0.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b1be69068ee1d6b491afcbe0a25e919282e198ff3cc7afa4903488b8899533e",
                "md5": "4714d8782629ae7c4d0444a4f6e754a3",
                "sha256": "b5e7152a24c2274fc0a68a2778098c3b7e2f623652fd9598f306cd7596a37e4b"
            },
            "downloads": -1,
            "filename": "pywikidata-0.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "4714d8782629ae7c4d0444a4f6e754a3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 6839,
            "upload_time": "2024-03-01T14:24:01",
            "upload_time_iso_8601": "2024-03-01T14:24:01.905415Z",
            "url": "https://files.pythonhosted.org/packages/4b/1b/e69068ee1d6b491afcbe0a25e919282e198ff3cc7afa4903488b8899533e/pywikidata-0.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-01 14:24:01",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pywikidata"
}
        
Elapsed time: 0.66028s