Python SDK scaffold for the ActionGate API and payment proxy.
Project description
actiongate-sdk
Python SDK for the ActionGate API.
Install
pip install actiongate-sdk
Custom Proxy Usage
Use proxy_call(tool_name, payload=None, method="POST", headers=None) to call a configured /proxy/:toolName route.
GETandDELETEencodepayloadas query parameters.POST,PUT, andPATCHsendpayloadas a JSON body.headerslets you pass custom upstream headers for the proxy call.
from actiongate_sdk import ActionGateClient
client = ActionGateClient(base_url="https://api.actiongate.xyz")
result = client.proxy_call(
"search_status",
{"q": "hello world"},
method="GET",
headers={"Authorization": "Bearer upstream-secret"},
)
Methods
proxy_call(tool_name, payload=None, method="POST", headers=None)risk_score(payload)simulate(payload)policy_gate(payload)
Example
from actiongate_sdk import ActionGateClient
client = ActionGateClient(base_url="https://api.actiongate.xyz")
result = client.risk_score({
"actor": {"actor_id": "treasury-bot"},
"action": {"action_type": "transfer", "network": "base", "asset_symbol": "USDC", "amount": "2500"},
})
x402 V2 Support
- Sends
PAYMENT-SIGNATUREwhenpayment_signatureis configured. - Parses
PAYMENT-REQUIREDandPAYMENT-RESPONSE. - Exposes parsed metadata via
ActionGateErrorandclient.last_payment_response.
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
actiongate_sdk-0.2.0.tar.gz
(6.7 kB
view details)
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 actiongate_sdk-0.2.0.tar.gz.
File metadata
- Download URL: actiongate_sdk-0.2.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de8a888962ed363fbe377864593195a865c64d18bc926de35b585738d337b247
|
|
| MD5 |
0c777b3fe091c6b5a354336067bf2b98
|
|
| BLAKE2b-256 |
dae10ce9528216f5b04570d6cd87902e33fd56f1cae91916ff5b0515ad101624
|
File details
Details for the file actiongate_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: actiongate_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4e20c3974a0880c0f37cdd624b6b032c54b6ab5331d301c3915f8092fa53a7b
|
|
| MD5 |
f79c2762ab022d6c774a9ae28285e5a2
|
|
| BLAKE2b-256 |
69ea35bf149f5762e045f4def60f605d7dd13f98fc7acaabc32afeac04601da7
|