Skip to main content

MojoVerify Python SDK — per-instance Client for wallet, KYC, identity, and comply endpoints

Project description

mojowallet

Python SDK for MojoWallet — digital wallet operations, sessions, balance management, and financial ledger tools.

Installation

pip install mojowallet

Requirements: Python 3.10+ | Dependencies: requests, pyobjict

Quick Start

import mojowallet

mojowallet.configure("your-api-key", base_url="https://api.example.com")

wallet = mojowallet.Wallet.get(42)
wallet.add_funds(1000, "SC_REAL", source="CREDIT_CARD")
print(wallet.balance("SC_REAL"))

All responses support both dict-style (resp["id"]) and attribute-style (resp.id) access.

Core Concepts

Concept Description
Wallet OO wrapper — get a wallet, call actions on it
Sessions Concurrency control for withdrawals (context manager)
Error Handling Exception hierarchy with domain-specific errors

Usage Examples

# Funds
wallet.add_funds(1000, "SC_REAL", source="CREDIT_CARD", category="deposited")
wallet.purchase(500, "SC_REAL", merchant="Coffee Shop")
wallet.cashout(800, "SC_REAL", reference_id="cashout-001")

# Sessions (context manager for safety)
with wallet.session("game-xyz", expires_in_seconds=3600) as session:
    session.withdraw(500, "SC_REAL", reference_id="bet-001")
    session.extend(1800)

# Balances
balance = wallet.balance("SC_REAL")
summary = wallet.balance_summary()

# Reserve flow
wallet.reserve(2500, "SC_REAL", "SC_HOLD", reference_id="payout-001")
wallet.confirm_reservation("payout-001")

# Lock/unlock
wallet.lock(reason="Chargeback")
wallet.unlock(reason="Investigation cleared")

Error Handling

from mojowallet.exceptions import InsufficientBalanceError, SessionConflictError

try:
    wallet.cashout(10000, "SC_REAL", reference_id="cashout-002")
except InsufficientBalanceError as e:
    print(f"Not enough funds: {e.message}")
except SessionConflictError:
    print("Another session is already active")

Documentation

Development

pip install poetry
poetry install --with dev

# Run all tests (unit tests only — no API key needed)
pytest -v

# With sandbox credentials
cp .env.example .env
# Edit .env with your sandbox API key
pytest -v

License

MIT

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

mojowallet-2.2.1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mojowallet-2.2.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file mojowallet-2.2.1.tar.gz.

File metadata

  • Download URL: mojowallet-2.2.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mojowallet-2.2.1.tar.gz
Algorithm Hash digest
SHA256 acbf6415fe2dddbd1cf20699b517608a45ce42b6c478a906b3b44e4493ad54cc
MD5 749f863c0bf3120f179b89a8be7153ff
BLAKE2b-256 ee7089ee8344b393a664f5c688128a583f658d8f5258a2b23a467b85eea4d3a9

See more details on using hashes here.

File details

Details for the file mojowallet-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: mojowallet-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mojowallet-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 34052453c8cd16b8c84dce847d102b7737b0b37328f5592b0d01f9352f3f3e95
MD5 668720c990f3d7a686df831555394703
BLAKE2b-256 afdf1ae54201acf0c4b5fcc26e40e7eda0bad0dc9fa4f5b6b677469cbc5b7382

See more details on using hashes here.

Supported by

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