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.0a4",
    "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.0a4.tar.gz (35.7 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.0a4-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_getpaid_simulator-3.0.0a4.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","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.0a4.tar.gz
Algorithm Hash digest
SHA256 03f52fe29cde7613de8be76ed51c4c8405d77b348f936e423605ee76f9095e40
MD5 d124e00cfef79dfb1efc78b644760d4c
BLAKE2b-256 7402ab0ae27d6af243803f4ec2fcf041a25fe780ba8532a3484b33a6e54af40d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_getpaid_simulator-3.0.0a4-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","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.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 8d015d3372183386f0334358ba05f64d5e01215741d20a087260841feed9918c
MD5 fe31f0fbe3d363b81c19f8c79ec33342
BLAKE2b-256 bd21f294b3e5b1a261586bf138bcbc81c462ddd525e36e112e50fb8196c84da7

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