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 provideswsdl_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 (defaultFalse).
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.pysrc/pragma_onkey/service_accessors.py
Distribution
Local build and validation:
- Ensure your tags follow
vX.Y.Z(the tag is the version source of truth). - Regenerate artifacts:
python tools/generate_from_wsdls.py. - Clean previous builds:
rm -rf dist build *.egg-info. - Install build tools:
uv pip install build twine. - Build the package:
python -m build. - Verify metadata:
python -m twine check dist/*. - (Optional) test install:
uv pip install dist/pragma_onkey-*.whl. - (Optional) publish:
python -m twine upload dist/*.
GitHub Actions publishing (tag-based):
- Configure a PyPI Trusted Publisher for this repo.
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pragma_onkey-0.0.3.tar.gz.
File metadata
- Download URL: pragma_onkey-0.0.3.tar.gz
- Upload date:
- Size: 675.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6409b6710b83fa4a6bc438cfec4fc2132b533ff74fc6ff74690b5856badbe23a
|
|
| MD5 |
f7988eee43fe98666a1b90ba2b4e772e
|
|
| BLAKE2b-256 |
5c3cd033c22f10d03e1fac644bb9be4f1aa89eac8aeab89716531dabe46ddc1f
|
Provenance
The following attestation bundles were made for pragma_onkey-0.0.3.tar.gz:
Publisher:
publish.yml on drakkentech-co-za/pragma-onkey-api-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pragma_onkey-0.0.3.tar.gz -
Subject digest:
6409b6710b83fa4a6bc438cfec4fc2132b533ff74fc6ff74690b5856badbe23a - Sigstore transparency entry: 844672524
- Sigstore integration time:
-
Permalink:
drakkentech-co-za/pragma-onkey-api-client@688196f4c6803f401451b8f665a5f84ec3b06901 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/drakkentech-co-za
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@688196f4c6803f401451b8f665a5f84ec3b06901 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pragma_onkey-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pragma_onkey-0.0.3-py3-none-any.whl
- Upload date:
- Size: 174.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5148234099730c7ce7249209ce76f1d261da2338d250fc3ddb9c1d897cb83e42
|
|
| MD5 |
10b7533e364b465dc85e6653238e0909
|
|
| BLAKE2b-256 |
d184ff89a484f7c9d4f116d7d0ccd2598a528934e10c36f46f3f96f5bd520845
|
Provenance
The following attestation bundles were made for pragma_onkey-0.0.3-py3-none-any.whl:
Publisher:
publish.yml on drakkentech-co-za/pragma-onkey-api-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pragma_onkey-0.0.3-py3-none-any.whl -
Subject digest:
5148234099730c7ce7249209ce76f1d261da2338d250fc3ddb9c1d897cb83e42 - Sigstore transparency entry: 844672525
- Sigstore integration time:
-
Permalink:
drakkentech-co-za/pragma-onkey-api-client@688196f4c6803f401451b8f665a5f84ec3b06901 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/drakkentech-co-za
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@688196f4c6803f401451b8f665a5f84ec3b06901 -
Trigger Event:
push
-
Statement type: