Skip to main content

Janus Sentinel Python SDK - Compliance & Policy Checks for AI Agents

Project description

Janus Sentinel SDK

PyPI

Compliance & policy checks for AI agents. Perform pre-action checks, approvals, and post-action reporting with minimal code.

Installation

pip install janus-sdk

Quickstart (sync)

from janus import JanusClient

client = JanusClient(tenant_id="your_tenant_id", api_key="janus_xyz", fail_open=False)

decision = client.check(
    action="payment.process",
    params={"amount": 5000, "currency": "USD"},
    agent_id="payment-bot-01",
)

if decision.allowed:
    process_payment(...)
    client.report(decision, status="success", result={"transaction_id": "tx_123"}, action="payment.process", agent_id="payment-bot-01")
elif decision.requires_approval:
    print(f"Approval required: {decision.reason}")
else:
    print(f"Action denied: {decision.reason}")

Decorators

from janus import JanusClient, janus_guard

client = JanusClient(tenant_id="acme", api_key="janus_xxx")

@janus_guard(client, action="email.send", agent_id="email-bot")
def send_email(to, subject, body):
    return mailer.send(to, subject, body)

Async

from janus import AsyncJanusClient

async def main():
    async with AsyncJanusClient(tenant_id="acme", api_key="janus_xxx") as client:
        res = await client.check("database.drop", params={"table": "users"})
        if res.allowed:
            await client.report(res, status="success", action="database.drop", agent_id="ops-bot")

Docs

  • Quickstart & SDK reference live in docs/janus/ (quickstart, sdk/, policies/, compliance/, operations/, api/*).\n- Start with docs/janus/quickstart.md for a 5-minute setup.\n

License

MIT

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

janus_sdk-0.4.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

janus_sdk-0.4.1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file janus_sdk-0.4.1.tar.gz.

File metadata

  • Download URL: janus_sdk-0.4.1.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for janus_sdk-0.4.1.tar.gz
Algorithm Hash digest
SHA256 46cf38366ad475261679551e80c50e8235513955f1c6dffba926c28dd23a57e2
MD5 31899679211648b6d6a04cd44e869c78
BLAKE2b-256 ca172e6b95dda72265cd41707802b1271a91f380e341083224386c5ee92eb7d7

See more details on using hashes here.

File details

Details for the file janus_sdk-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: janus_sdk-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for janus_sdk-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41d499965658ffc65f34ae9e0414cf72d97fd8a57dc39a00289d939d534a7261
MD5 941fd9b91383af89c2d4a2169631b78d
BLAKE2b-256 67da9aa616c7794cf3dc072751c48a1c4276b17fe6d20221229ec7ed608977d0

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