Skip to main content

Pragma/OnKey SOAP client library.

Project description

pragma-onkey

Standalone Pragma/OnKey SOAP client library with generated schemas and services. The client is tenant-neutral and configured at runtime with your OnKey base URL.

Installation

If you are consuming a published build:

pip install pragma-onkey

For local development:

uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

Configuration

The client resolves WSDL endpoints using a base URL and an optional query suffix.

  • wsdl_base_url: your tenant base URL (required unless a service provides wsdl_url).
  • wsdl_query: appended when building the WSDL URL (default ?singleWsdl).
  • use_soap11: force SOAP 1.1 Basic bindings instead of SOAP 1.2 Custom (default False).

Example base URL format:

https://your.domain/tenant

Usage

Sync client with typed, snake_case accessors:

from pragma_onkey import PragmaOnkeyClient

client = PragmaOnkeyClient(
    wsdl_base_url="https://your.domain/tenant",
    wsdl_query="?singleWsdl",
    use_soap11=False,
)

alarm_service = client.alarm_import_service
response = alarm_service.import_alarms(payload)

Async client:

from pragma_onkey import PragmaOnkeyAsyncClient

client = PragmaOnkeyAsyncClient(wsdl_base_url="https://your.domain/tenant")
response = await client.alarm_import_service.import_alarms(payload)

Server-side async operations (not Python async):

# "import_alarms_async" starts an async job on the server and returns a job response.
job = client.alarm_import_service.import_alarms_async(payload)
progress = client.alarm_import_service.fetch_async_import_progress(progress_payload)

Dynamic access (less type-friendly):

service = client.get_service("AlarmImportService")

Development

This module is managed with uv and targets Python 3.12.

uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

Run linting and formatting:

ruff check .
ruff format .

Regenerating from WSDLs

Generated outputs include schemas, services, the service registry, and typed accessors.

python tools/generate_from_wsdls.py

Generated files:

  • src/pragma_onkey/schemas/*
  • src/pragma_onkey/services/*
  • src/pragma_onkey/service_registry.py
  • src/pragma_onkey/service_accessors.py

Distribution

Local build and validation:

  1. Ensure your tags follow vX.Y.Z (the tag is the version source of truth).
  2. Regenerate artifacts: python tools/generate_from_wsdls.py.
  3. Clean previous builds: rm -rf dist build *.egg-info.
  4. Install build tools: uv pip install build twine.
  5. Build the package: python -m build.
  6. Verify metadata: python -m twine check dist/*.
  7. (Optional) test install: uv pip install dist/pragma_onkey-*.whl.
  8. (Optional) publish: python -m twine upload dist/*.

GitHub Actions publishing (tag-based):

  1. Configure a PyPI Trusted Publisher for this repo.
  2. Tag and push a release (the tag sets the package version):
git tag v1.0.0
git push origin v1.0.0

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

pragma_onkey-0.0.5.tar.gz (705.8 kB view details)

Uploaded Source

Built Distribution

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

pragma_onkey-0.0.5-py3-none-any.whl (246.4 kB view details)

Uploaded Python 3

File details

Details for the file pragma_onkey-0.0.5.tar.gz.

File metadata

  • Download URL: pragma_onkey-0.0.5.tar.gz
  • Upload date:
  • Size: 705.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pragma_onkey-0.0.5.tar.gz
Algorithm Hash digest
SHA256 552492dda05fa0142e312ad4a41fb647100254e0aa7ae78313c7b554ec1a3cd4
MD5 3693a97f6a2f71c7caa8c926a8f430cc
BLAKE2b-256 d31884fbf994707e95ad8f0f6d0340a308ff8fd34706914c15fb88b64de36214

See more details on using hashes here.

Provenance

The following attestation bundles were made for pragma_onkey-0.0.5.tar.gz:

Publisher: publish.yml on drakkentech-co-za/pragma-onkey-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pragma_onkey-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pragma_onkey-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 246.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pragma_onkey-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 66bf21871edfb6f84578400296ab75a9a272a5ca7cbb63557d2b2e83e710c443
MD5 b46b27fc9d3664f0b22ca3f805e4e6a4
BLAKE2b-256 8b024d7af5d6f2200120956470cbbf3c8ae9b98335e08692bc880e6f292a8af2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pragma_onkey-0.0.5-py3-none-any.whl:

Publisher: publish.yml on drakkentech-co-za/pragma-onkey-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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