Skip to main content

Payment gateway simulator for testing the python-getpaid ecosystem.

Project description

python-getpaid-simulator

Payment gateway simulator host for testing the python-getpaid ecosystem.

The simulator no longer owns provider implementations directly. It starts a generic Litestar host, discovers provider plugins from installed packages, and mounts each provider's API routes and UI flows through entry points.

Installation

pip install python-getpaid-simulator

The host only becomes useful when at least one provider package exposing the simulator plugin entry point is installed in the same environment.

Plugin Model

Provider packages must expose an entry point in the getpaid.simulator.providers group.

Example from a provider package:

[project.entry-points."getpaid.simulator.providers"]
payu = "getpaid_payu.simulator:get_plugin"

The entry point must resolve to a factory returning a getpaid_simulator.spi.SimulatorProviderPlugin.

The current stable plugin contract requires:

  • api_version
  • slug
  • display_name
  • api_handlers
  • ui_handlers
  • transitions
  • load_config(env)
  • optional authorize_path_template

The host validates the plugin slug against the entry point name and rejects plugins that do not match getpaid_simulator.spi.SIMULATOR_PLUGIN_API_VERSION.

Startup Failure Modes

Plugin loading is controlled by SIMULATOR_PLUGIN_FAILURE_MODE or the CLI flag --plugin-failure-mode.

  • warn (default): broken plugins are skipped, the simulator starts in degraded mode, and failed providers appear in logs, /, /sim/status, and the dashboard.
  • strict: the first plugin import, factory, compatibility, or config failure aborts startup with PluginLoadError.

Examples:

getpaid-simulator --plugin-failure-mode strict
SIMULATOR_PLUGIN_FAILURE_MODE=warn getpaid-simulator

Provider Packaging

Provider packages should keep simulator support in an optional dependency group such as simulator, rather than forcing simulator host and Litestar dependencies into normal runtime installs.

Example:

[project.optional-dependencies]
simulator = [
    "python-getpaid-simulator>=3.0.0a3",
    "litestar>=2.0",
]

Development Notes

  • Wave 1 storage remains in-memory behind the host storage interface.
  • Provider-local simulator code lives in provider repositories, not under getpaid_simulator.providers.

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

python_getpaid_simulator-3.0.0a3.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

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

python_getpaid_simulator-3.0.0a3-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file python_getpaid_simulator-3.0.0a3.tar.gz.

File metadata

  • Download URL: python_getpaid_simulator-3.0.0a3.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","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 python_getpaid_simulator-3.0.0a3.tar.gz
Algorithm Hash digest
SHA256 a7a6fb19bbb6773b9396c480024882b283526bf41319a509f5baa7616b5096d5
MD5 7bd56275dbfce5f8c3559ff070bd4b30
BLAKE2b-256 3387944555871f1147b0f4979e4bb58b493a5848c4768f04b9e41a017fddc6dc

See more details on using hashes here.

File details

Details for the file python_getpaid_simulator-3.0.0a3-py3-none-any.whl.

File metadata

  • Download URL: python_getpaid_simulator-3.0.0a3-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","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 python_getpaid_simulator-3.0.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 327a819330f1a0203687121fb0dc0c0a372631c39693b67cf6c71c54bc389aa2
MD5 f01fd6066b1b8cd509eafe617ad51bf4
BLAKE2b-256 396de6b3072867a91c6ddb364e3056e96418514b5fe15cde49a4c7e5e9688d5c

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