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.2.0.tar.gz (10.2 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.2.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: janus_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 10.2 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.2.0.tar.gz
Algorithm Hash digest
SHA256 02875a97131fb0b8c31e111eed41602fe305b105df853fca43802c69034ae950
MD5 12c6a9c65fcc8c829f5acf022d4ff85c
BLAKE2b-256 bf019a27392d551e348147e92af68a2c91c5fbeecde187a2826956b82cc3215e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: janus_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 536f853a4f874682cb1ec7b2a3302096e2e7eaa1b593bb66ea025db77b501e9e
MD5 ec3e50e53ec1066b0ebd8b4ea3c4f61c
BLAKE2b-256 7e4654b3025d7acf84d5e6e1a6c1c08a15e4ad41400525d9c0607fc482f4f777

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