Skip to main content

Establishes a connection to a Wikibase instance and provides methods for interacting with it.

Project description

WBMaker

This alpha package helps establish an authenticated connection with a Wikibase instance and provides a number of functions for building items using the wikibaseintegrator package and working with Wikimedia pages (e.g., "item talk" pages) using the mwclient package. While it is simple enough to work with these packages separately, it is helpful to provide a lightweight layer of abstraction for many of the tasks needed in developing bot-based applications and data processing pipelines.

I am planning on building in additional functionality that I find most commonly used when developing bots that take action on Wikidata or another Wikibase instance.

Installation

pip install wbmaker

or install from source

git clone https://github.com/skybristol/wbmaker

Environment Variables

The WB class operates on a set of environment variables that set up and authorize interactions with a Wikibase instance, including Wikidata. These variables are required by one or both of the underlying packages, wikibaseintegrator and mwclient used in wbmaker. Instantiating the class will prompt for the following basic variables and set them if not supplied in the operating environment.

WBMaker

This alpha package helps establish an authenticated connection with a Wikibase instance and provides a number of functions for building items using the wikibaseintegrator package and working with Wikimedia pages (e.g., "item talk" pages) using the mwclient package. While it is simple enough to work with these packages separately, it is helpful to provide a lightweight layer of abstraction for many of the tasks needed in developing bot-based applications and data processing pipelines. I am planning on building in additional functionality that I find most commonly used when developing bots that take action on Wikidata or another Wikibase instance.

Installation

pip install wbmaker or install from source git clone https://github.com/skybristol/wbmaker

Environment Variables

The WB class operates on a set of environment variables that set up and authorize interactions with a Wikibase instance, including Wikidata. These variables are required by one or both of the underlying packages, wikibaseintegrator and mwclient used in wbmaker. Instantiating the class will prompt for the following basic variables and set them if not supplied in the operating environment.

If you will be making edits, the following are also required. If these are not provided, the login section of the class will not be invoked, and you will be limited to read-only operations.

  • WB_BOT_USER: bot user name authorized to operate on the Wikibase instance
  • WB_BOT_PASS: bot user's password

If you will be making edits, the following are also required. If these are not provided, the login section of the class will not be invoked, and you will be limited to read-only operations.

  • WB_BOT_USER: bot user name authorized to operate on the Wikibase instance
  • WB_BOT_PASS: bot user's password

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wbmaker-0.0.10.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

wbmaker-0.0.10-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file wbmaker-0.0.10.tar.gz.

File metadata

  • Download URL: wbmaker-0.0.10.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0

File hashes

Hashes for wbmaker-0.0.10.tar.gz
Algorithm Hash digest
SHA256 86b335e8a491158d0195969119d379c1c75d756785e3f71085c876f6e4c1017f
MD5 9b60c763fbf5aa5e712f6eee463079cc
BLAKE2b-256 da5cacbe5d99380ba24af5a98c3efc662de684d6a70d03204af3131cbc82bbaa

See more details on using hashes here.

File details

Details for the file wbmaker-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: wbmaker-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0

File hashes

Hashes for wbmaker-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 28118297d337d7be38c424a8f4d62d9e110f89ff84134babab576a270acdce91
MD5 c6a65ddc8d1917ef05d69e617e4979d7
BLAKE2b-256 c1b250afe65c82b99b199fba1a214dbc8bae8807cb7e5ed47375a6bc6b2cd2d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page