Skip to main content

TrigGuard Gateway Client

Project description

trigguard (PyPI)

Official Python 3.9+ client for the TrigGuard execution gatewayPOST /execute using only the standard library (urllib).

Install (from PyPI)

pip install trigguard

Editable (monorepo)

cd sdk/python && pip install -e .

Usage

import os
from trigguard import Client

client = Client(
    api_key=os.environ["TG_API_KEY"],
    base_url="http://127.0.0.1:8080",
)
r = client.execute(
    surface="spendCommit",
    signals={"riskScore": 0.9},
    context={"amount": 1000},
)
print(r["decision"], r.get("execution_id"))
  • Auth: Authorization: Bearer <api_key>
  • Errors: TrigGuardError on non-2xx

Build & publish (maintainers)

Run from the repository root (not from sdk/nodescripts/ is at the root).

cd /path/to/TrigGuard
python3 -m pip install build twine
bash scripts/publish-pypi.sh

On macOS, if pip is not found, use python3 -m pip as above. Configure twine (~/.pypirc or env) before upload.

See also

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

trigguard-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

trigguard-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file trigguard-0.1.0.tar.gz.

File metadata

  • Download URL: trigguard-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for trigguard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f0ad59f82afe661a01d699a91fdbc8832c666f8d7c1c6b59e1ad50ce7fad0c45
MD5 db06ffbe780232db2724bfc072ab228a
BLAKE2b-256 be61485490bf4f39bcda6e70af0d4110889cf775d34208863014252f6d014aec

See more details on using hashes here.

File details

Details for the file trigguard-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: trigguard-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for trigguard-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 302e18cc49b097242f5aefba8815adf6bba2b5f012186b84302524c04f440eb3
MD5 494e93461ad8ebca07c12a68fb1e09a2
BLAKE2b-256 88bf0883b228fd5a8e3f0cdf49d1bdef72d55b1f99d4069245dda88e89ae0ba4

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