Python Mopé
Client library for Mopé by Hakrinbank
Token acquisition and API Docs
- API Docs
- Instructions for acquiring a token
Requirements
- Python 3.11 or newer
- Mopé API Token
Getting Started
First, install from PyPi by running pip install python-mope
Example usage:
from mope import Mope
mope = Mope(token="test_123")
mope.shop.get_payment_request(payment_id="123")
Development
Install uv, then run:
uv sync --locked
uv run --locked ruff check .
uv run --locked ruff format --check .
uv run --locked ty check
uv run --locked pytest
uv build --no-sources
Development uses Python 3.15.2 from .python-version; uv installs it when needed.
The library supports Python 3.11+, and CI tests the built wheel on Python 3.11,
3.12, 3.13, 3.14, and 3.15. Ruff and ty target Python 3.11 compatibility.
Run uv run ruff format . to format code. Commit uv.lock after changing
dependencies; use uv lock --upgrade to refresh their locked versions.
The package includes inline types and a py.typed marker. API responses are
validated before creating models: invalid field types raise TypeError, invalid
status values raise ValueError, and missing required fields raise KeyError.
Values are not coerced. Payment metadata remains a list of dictionaries with
string key and value fields, as defined by the
Mopé API schema.
Publishing
To release, update mope/__version__.py, run uv lock, and commit the changes.
Publish a GitHub release whose tag is the package version or v followed by that
version. The workflow checks the tag, runs lint, formatting and type checks,
builds the source distribution and wheel, and tests the installed wheel across
all supported Python versions before uploading those same artifacts to PyPI.
Resources
shop
Methods
shop.create_payment_request
| Argument | Type | Required |
|---|---|---|
| amount | int | yes |
| description | string | yes |
| order_id | string | yes |
| currency | enum (USD, SRD, EUR) | yes |
| redirect_url | string | yes |
return type: mope.models.payments.CreatePaymentResponse
shop.get_payment_request
| Argument | Type | Required |
|---|---|---|
| payment_id | string | yes |
return type: mope.models.payments.PaymentRequest
Metadata
Release files for python-mope 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_mope-0.3.0.tar.gz | 10.8 kB | Without provenance | Details for python_mope-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_mope-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for python_mope-0.3.0-py3-none-any.whl |
Total release size: 18.7 kB
Release files / python_mope-0.3.0.tar.gz
| Download URL | python_mope-0.3.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2a4084ae544ceac3809d18318da02759544aca1249a64efd0a719f93a7fe861
|
|
BLAKE2b-256 checksum How to use checksums |
a5adaabc6b4398018c412e5fe77b4bdda65af12d2383e6c1a054053e46f38a8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / python_mope-0.3.0-py3-none-any.whl
| Download URL | python_mope-0.3.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6d5b0ae5da3224f119fa848bacc29636f052b20c353059727c548c93a3c8fa0
|
|
BLAKE2b-256 checksum How to use checksums |
a93c096844bfdccbc1fb2a13e186ffeab3dcb697c1bf78e5e5775e9974c9af86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for python-mope 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.