mastercard-oauth1-signer
Mastercard OAuth1 Signer.
Decision gist · record as of 2026-08-14
Yes. Install this if you are building a Python application that needs to authenticate with Mastercard APIs. The library is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively. The only caveat is that Python 3.8/3.9 support will be dropped in v2.0.0, so plan upgrades accordingly if you depend on those versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a valid Mastercard Developer Portal account with consumer key and private signing key credentials.
- Low friction: pure Python wheel with four stable runtime dependencies (cryptography, urllib3, requests, Deprecated).
- Active maintenance with recent commits; current version targets Python 3.8–3.12 with deprecation warnings on 3.8/3.9 ahead of v2.0.0.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal attribution requirements.
last release 2026-04-13 (123 days) · last repo commit 2026-04-13 · 31 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 230,478 downloads/mo, #9,108 on PyPI
Alternatives
Verify before relying
pip install mastercard-oauth1-signer
import oauth1.authenticationutils as authenticationutils
from oauth1.oauth import OAuth, SignatureMethod
signing_key = authenticationutils.load_signing_key('path/to/key', '')
authHeader = OAuth.get_authorization_header(
'https://sandbox.api.mastercard.com/service',
'POST',
'Hello world!',
consumer_key,
signing_key
)- Whether the library supports custom HTTP clients beyond requests and the OAuthSigner class.
- Performance characteristics when signing high-volume requests or with large payloads.
- Specific error handling and exception types raised by the library.
What it is and what it does
This library implements OAuth 1.0a signature generation specifically for Mastercard API authentication. It handles the cryptographic signing of HTTP requests using either RSA-SHA256 (default) or RSA-PSS-SHA256 algorithms, producing properly formatted Authorization headers that comply with Mastercard's API requirements.
The package provides multiple integration patterns: direct header generation via `OAuth.get_authorization_header()`, signing of request objects through the `OAuthSigner` class, and seamless integration with the requests library via the `OAuth1RSA` authentication handler. It manages key loading, payload hashing (including body hash for non-form-encoded content), and OAuth parameter construction, abstracting away the complexity of manual signature computation.
Use it for
- Authenticate requests to Mastercard sandbox or production APIs when building payment or financial applications.
- Sign HTTP requests in backend services that need to call Mastercard endpoints with OAuth 1.0a credentials.
- Integrate OAuth signing into OpenAPI-generated client libraries targeting Mastercard services.
- Implement custom request signing logic for Mastercard API calls within larger Python applications.
- Switch between RSA-SHA256 and RSA-PSS-SHA256 signature methods based on Mastercard API endpoint requirements.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Install this if you are building a Python application that needs to authenticate with Mastercard APIs. The library is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively. The only caveat is that Python 3.8/3.9 support will be dropped in v2.0.0, so plan upgrades accordingly if you depend on those versions.
Install
mastercard-oauth1-signer on PyPI
Before you install
Low friction: pure Python wheel with four stable runtime dependencies (cryptography, urllib3, requests, Deprecated). Active maintenance with recent commits; current version targets Python 3.8–3.12 with deprecation warnings on 3.8/3.9 ahead of v2.0.0.
Requires a valid Mastercard Developer Portal account with consumer key and private signing key credentials.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal attribution requirements.
Quickstart
pip install mastercard-oauth1-signer
import oauth1.authenticationutils as authenticationutils
from oauth1.oauth import OAuth, SignatureMethod
signing_key = authenticationutils.load_signing_key('path/to/key', '')
authHeader = OAuth.get_authorization_header(
'https://sandbox.api.mastercard.com/service',
'POST',
'Hello world!',
consumer_key,
signing_key
)
Verify before relying
- Whether the library supports custom HTTP clients beyond requests and the OAuthSigner class.
- Performance characteristics when signing high-volume requests or with large payloads.
- Specific error handling and exception types raised by the library.
Package facts
| License | MIT permissive |
| Python support | Capped below the current Python release <3.13,>=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagescryptographyurllib3Deprecatedrequests |
| Maintenance | Actively maintained 123 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 230,478 / month, #9,108 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Libraries :: Python Modules |
Evidence: mastercard_oauth1_signer-1.9.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “oauth 1.0a signature generation”
- mastercard-oauth1-signerGenerates OAuth 1.0a-compliant signatures for Mastercard API requests…
- oauth2Implements OAuth 1.0 authentication for Python applications,…
- Flask-OAuthlibFlask-OAuthlib adds OAuth 1.0a and OAuth 2.0 client and provider…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also mohawk · requests-oauth · aws-request-signer · turnkey-api-key-stamper · py-order-utils · python-jwt · requests-oauthlib · requests-sigv4 · endesive · turnkey-http