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.12.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

wbmaker-0.0.12-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wbmaker-0.0.12.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.10.9 Darwin/24.0.0

File hashes

Hashes for wbmaker-0.0.12.tar.gz
Algorithm Hash digest
SHA256 36e442857b5e4bcaf8712938327a0e43aa4ba88aba3e3b98f6d93a71fed89a25
MD5 0f0eb62575493586820d2d583502cb0d
BLAKE2b-256 254cb3c1de7f077e276a85f3c2e8554c5461096d3d33002297a3337570dd3487

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wbmaker-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.10.9 Darwin/24.0.0

File hashes

Hashes for wbmaker-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 e63e4b5f6d8600b8e34cd3d27dd827a5f4d0b8e75848c3b610b043af55b0a14f
MD5 06f3f4b34c0d4d335a3e26f37feed48d
BLAKE2b-256 f744cb6384d5c60b5b2c10f61dfb5b1b9e9e930a8c1ce4482c06f64a447fcd96

See more details on using hashes here.

Supported by

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