Skip to main content

rakshak

Python SDK for the Rakshak LLM security guard API.

Install

pip install rakshak

Quick start

import rakshak

client = rakshak.Client(api_key="rsk_...")

# Block malicious input
result = client.guard(user_input)
if result.blocked:
    return "I can't help with that."

# Sanitize LLM output (redacts PII, blocks policy violations)
result = client.sanitize(llm_response)
reply = result.safe_text or "[Response blocked]"

# Multi-turn conversation guard
session = client.conversation("user-session-id")
result = session.send(user_message)
if result.flagged:
    print("Rising risk score:", result.risk_score)

Async

async_client = rakshak.AsyncClient(api_key="rsk_...")
result = await async_client.guard(user_input)

Release files for rakshak 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rakshak 0.1.2
File Size Uploaded
rakshak-0.1.2.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rakshak 0.1.2
File Interpreter ABI Platform
rakshak-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.2 kB

Release files / rakshak-0.1.2.tar.gz

Download URL rakshak-0.1.2.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d2a6078efb93356f329735fb1b17ca66af512af2e0a4444f744296e52eae335f
BLAKE2b-256 checksum
How to use checksums
89e8701c4dfab2a7223bfc3a625d494c3124917ebc9ff5711e07d0a41c8b661b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / rakshak-0.1.2-py3-none-any.whl

Download URL rakshak-0.1.2-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
533daad3ce49c1398fabe41e3a0b1830ef2d413367c23af9e1c4af7082e40f0e
BLAKE2b-256 checksum
How to use checksums
a70337432ced2efa1ddc89416aa829f5978a957895c54b5a1872d3d2a0851687
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page