Skip to main content
File added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

MediaWiki OAuth Library

mwoauth is an open licensed (MIT) library designed to provide a simple means to performing an OAuth handshake with a MediaWiki installation with the OAuth Extension installed.

Compatible with python 3.x

Install with pip: pip install mwoauth

Documentation: http://pythonhosted.org/mwoauth

Usage

from mwoauth import ConsumerToken, Handshaker

# Construct a "consumer" from the key/secret provided by MediaWiki
import config
consumer_token = ConsumerToken(config.consumer_key, config.consumer_secret)

# Construct handshaker with wiki URI and consumer
handshaker = Handshaker("https://en.wikipedia.org/w/index.php",
                        consumer_token)

# Step 1: Initialize -- ask MediaWiki for a temporary key/secret for user
redirect, request_token = handshaker.initiate()

# Step 2: Authorize -- send user to MediaWiki to confirm authorization
print("Point your browser to: %s" % redirect) #
response_qs = input("Response query string: ")

# Step 3: Complete -- obtain authorized key/secret for "resource owner"
access_token = handshaker.complete(request_token, response_qs)
print(str(access_token))

# Step 4: Identify -- (optional) get identifying information about the user
identity = handshaker.identify(access_token)
print("Identified as {username}.".format(**identity))

Metadata

Release files for mwoauth 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for mwoauth 0.4.0
File Size Uploaded
mwoauth-0.4.0.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mwoauth 0.4.0
File Interpreter ABI Platform
mwoauth-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 kB

Release files / mwoauth-0.4.0.tar.gz

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL mwoauth-0.4.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
22e3403e748e70146f8eccc1430fe542c9f9c4ff677eff424a52e644f6d8f7c5
BLAKE2b-256 checksum
How to use checksums
19b4702647c01cbf430814a66bdba11084eafcc7e8eac02bfd0bdd743db29fb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / mwoauth-0.4.0-py3-none-any.whl

Download URL mwoauth-0.4.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fed9bc7d6bbabb5f691b918af0ac844e13c9b75d5fa51a898f36d54d798b5fe1
BLAKE2b-256 checksum
How to use checksums
255d40c62f5f81181f454ad9dcd664c8e227842828b8e653f701f8237520dfa9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.15

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.8

2 release files

0.3.7

3 release files

0.3.6

5 release files

0.3.5

4 release files

0.3.3

4 release files

0.3.2

3 release files

0.3.1

2 release files

0.3.0

3 release files

0.2.10

3 release files

0.2.9

3 release files

0.2.8

3 release files

0.2.7

2 release files

0.2.6

3 release files

0.2.5

3 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page