Metadata-Version: 2.4
Name: WikibaseIntegrator
Version: 0.14.1
Summary: Python package for reading from and writing to a Wikibase instance
License: MIT
License-File: LICENSE
Keywords: wikibase,wikidata,mediawiki,sparql
Author: Myst
Requires-Python: >=3.11,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Dist: oauthlib (>=3.2.2,<5.0.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Requires-Dist: requests-oauthlib (>=2.0.0,<3.0.0)
Requires-Dist: ujson (>=5.10,<7.0)
Project-URL: Bug Tracker, https://github.com/LeMyst/WikibaseIntegrator/issues
Project-URL: Changelog, https://github.com/LeMyst/WikibaseIntegrator/releases
Project-URL: Documentation, https://lemyst.github.io/WikibaseIntegrator/
Project-URL: Homepage, https://github.com/LeMyst/WikibaseIntegrator
Project-URL: Repository, https://github.com/LeMyst/WikibaseIntegrator
Description-Content-Type: text/markdown

# Wikibase Integrator #

[![PyPi](https://img.shields.io/pypi/v/wikibaseintegrator.svg)](https://pypi.python.org/pypi/wikibaseintegrator)
[![Python pytest](https://github.com/LeMyst/WikibaseIntegrator/actions/workflows/python-pytest.yaml/badge.svg)](https://github.com/LeMyst/WikibaseIntegrator/actions/workflows/python-pytest.yaml)
[![Coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/LeMyst/WikibaseIntegrator/badges/coverage.json)](https://github.com/LeMyst/WikibaseIntegrator/actions/workflows/python-pytest.yaml)
[![Python Code Quality and Lint](https://github.com/LeMyst/WikibaseIntegrator/actions/workflows/python-lint.yaml/badge.svg)](https://github.com/LeMyst/WikibaseIntegrator/actions/workflows/python-lint.yaml)
[![CodeQL](https://github.com/LeMyst/WikibaseIntegrator/actions/workflows/codeql.yml/badge.svg)](https://github.com/LeMyst/WikibaseIntegrator/actions/workflows/codeql.yml)
[![Pyversions](https://img.shields.io/pypi/implementation/wikibaseintegrator.svg)](https://pypi.python.org/pypi/wikibaseintegrator)
[![Documentation](https://github.com/LeMyst/WikibaseIntegrator/actions/workflows/docs.yaml/badge.svg)](https://lemyst.github.io/WikibaseIntegrator/)

WikibaseIntegrator is a Python library to read and write the data of a Wikibase instance, like
[Wikidata](https://www.wikidata.org/): items, properties, lexemes and MediaInfo entities, with their labels, claims,
qualifiers and references, through the MediaWiki API and the SPARQL endpoint. Its "fast run" mode compares your data
with the SPARQL endpoint and only writes what actually changed.

## Installation

```bash
python -m pip install wikibaseintegrator
```

Python 3.11 or newer is required.

## Quick example

```python
from wikibaseintegrator import WikibaseIntegrator
from wikibaseintegrator.wbi_config import config

# Wikimedia asks every tool to identify itself: https://foundation.wikimedia.org/wiki/Policy:User-Agent_policy
config['USER_AGENT'] = 'MyTool/1.0 (https://www.wikidata.org/wiki/User:MyUsername)'

wbi = WikibaseIntegrator()
item = wbi.item.get('Q582')
print(item.labels.get('en'))  # Villeurbanne
```

To log in and write, see [Login](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/login.html) and [Entities](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/entities.html).

## Documentation

The documentation is on **[GitHub Pages](https://lemyst.github.io/WikibaseIntegrator/)**, for the latest release and for the
development version:

- [Installation and configuration](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/installation.html): using another Wikibase instance, the User-Agent
  policy, debugging
- [Entities](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/entities.html): read, create and edit items, properties, lexemes, labels, claims, qualifiers
  and references
- [Login](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/login.html): OAuth 2.0, OAuth 1.0a, bot passwords
- [Data types](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/datatypes.html), [Structured Data on Commons](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/mediainfo.html)
- [Helpers](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/helpers.html): SPARQL queries, search, merges, the MediaWiki API, EditGroups
- [Fast run](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/fastrun.html) and [examples](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/examples.html), including a bot for mass import
- [API reference](https://lemyst.github.io/WikibaseIntegrator/en/stable/api/index.html)

Upgrading from an older version (v0.13, v0.12, v0.11)? See the [breaking changes](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/upgrading.html).

## Contributing

See [Contributing](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/contributing.html) to set up the development environment and run the tests.

WikibaseIntegrator is a fork of [WikidataIntegrator](https://github.com/SuLab/WikidataIntegrator), see
[About](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/about.html). To port a WikidataIntegrator script, see
the [migration guide](https://lemyst.github.io/WikibaseIntegrator/en/stable/guide/wikidataintegrator.html).

