Skip to main content

Python SDK for SatGate Gateway and SatGate Cloud private-beta APIs

Project description

satgate

Official Python SDK for SatGate: the Economic Firewall for AI agents.

Install

pip install satgate

Build agents with issue/pay/verify

The public package installs today. The issue/pay/verify API namespace is in private beta, so calls without beta access raise a structured error instead of returning mocked receipts.

import os
from satgate import SatGate

satgate = SatGate(api_key=os.getenv("SATGATE_API_KEY"))

capability = satgate.issue(
    task="research market prices",
    agent="research-agent",
    allow=["mcp:web.search", "api:prices.read"],
    budget_usd=25,
    expires_in="1h",
)

receipt = satgate.pay(
    upstream="https://api.example.com/search",
    capability=capability,
    max_usd=4.20,
)

verified = satgate.verify(receipt)
print(verified.decision, verified.evidence_pack_id)

Without private-beta access:

SatGateAuthError: This API namespace requires private beta access. Visit cloud.satgate.io/docs to request access.

Works with: MCP · OpenAI tools · Anthropic tools · LangChain · CrewAI · Raw HTTP

OSS Gateway client

The package also includes lower-level OSS gateway clients:

from satgate import SatGateClient, SatGateAgentClient

admin = SatGateClient(
    base_url="http://localhost:8080",
    admin_token="your-admin-token",
)

token = admin.tokens.mint(scope="api:read", duration="1h")
valid = admin.tokens.validate(token.token)

agent = SatGateAgentClient(
    gateway_url="http://localhost:8080",
    token=token.token,
)

response = agent.get("/api/data")
print(valid["valid"], response.status_code)

Docs

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

satgate-0.3.2.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

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

satgate-0.3.2-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file satgate-0.3.2.tar.gz.

File metadata

  • Download URL: satgate-0.3.2.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for satgate-0.3.2.tar.gz
Algorithm Hash digest
SHA256 7dd5330f6b62978ac88f7d85663a32473fb767e1014980a52f503b0fb6396512
MD5 ce5b7a0eefeb10d53e611b8b41405207
BLAKE2b-256 2dfe39ee3443a3d39a0ab1befc20ef4653ddf0d1da7226fbbae0bdb76989d9d9

See more details on using hashes here.

File details

Details for the file satgate-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: satgate-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for satgate-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f8dba81eab78147f31d9fe2a42fb061b15785540e6112760d3ebb289001ca5b4
MD5 51e0a9820a588f4389be4155809c1d51
BLAKE2b-256 c0ea803e38b2d44a38f2477573e2c6c3ec6d3abaf908fae6d7098c72255469f3

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