# Ragbits Guardrails
Ragbits Guardrails is a Python package that contains utilities for ensuring the safety and relevance of responses generated by Ragbits components.
## Installation
You can install the latest version of Ragbits Guardrails using pip:
```bash
pip install ragbits-guardrails
```
## Quickstart
Example of using the OpenAI Moderation Guardrail to verify a message:
```python
import asyncio
from ragbits.guardrails.base import GuardrailManager, GuardrailVerificationResult
from ragbits.guardrails.openai_moderation import OpenAIModerationGuardrail
async def verify_message(message: str) -> list[GuardrailVerificationResult]:
manager = GuardrailManager([OpenAIModerationGuardrail()])
return await manager.verify(message)
if __name__ == '__main__':
print(asyncio.run(verify_message("Test message")))
```
## Documentation
* [How-To Guides - Guardrails](https://ragbits.deepsense.ai/how-to/use_guardrails/)
<!--
TODO:
* Add link to API Reference once classes from the Guardrails package are added to the API Reference.
-->
Raw data
{
"_id": null,
"home_page": null,
"name": "ragbits-guardrails",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "Evaluation, GenAI, Generative AI, LLMs, Large Language Models, RAG, Retrieval Augmented Generation",
"author": null,
"author_email": "\"deepsense.ai\" <ragbits@deepsense.ai>",
"download_url": "https://files.pythonhosted.org/packages/cc/65/e72e58a9744a4a81ee20321c4a76ae8d75377ce797f2bb5a9dfd52148520/ragbits_guardrails-1.3.0.tar.gz",
"platform": null,
"description": "# Ragbits Guardrails\n\nRagbits Guardrails is a Python package that contains utilities for ensuring the safety and relevance of responses generated by Ragbits components.\n\n## Installation\n\nYou can install the latest version of Ragbits Guardrails using pip:\n\n```bash\npip install ragbits-guardrails\n```\n\n## Quickstart\nExample of using the OpenAI Moderation Guardrail to verify a message:\n\n```python\nimport asyncio\nfrom ragbits.guardrails.base import GuardrailManager, GuardrailVerificationResult\nfrom ragbits.guardrails.openai_moderation import OpenAIModerationGuardrail\n\n\nasync def verify_message(message: str) -> list[GuardrailVerificationResult]:\n manager = GuardrailManager([OpenAIModerationGuardrail()])\n return await manager.verify(message)\n\n\nif __name__ == '__main__':\n print(asyncio.run(verify_message(\"Test message\")))\n```\n\n## Documentation\n* [How-To Guides - Guardrails](https://ragbits.deepsense.ai/how-to/use_guardrails/)\n<!--\nTODO:\n* Add link to API Reference once classes from the Guardrails package are added to the API Reference.\n-->\n",
"bugtrack_url": null,
"license": null,
"summary": "Guardrails module for Ragbits components",
"version": "1.3.0",
"project_urls": {
"Bug Reports": "https://github.com/deepsense-ai/ragbits/issues",
"Documentation": "https://ragbits.deepsense.ai/",
"Homepage": "https://github.com/deepsense-ai/ragbits",
"Source": "https://github.com/deepsense-ai/ragbits"
},
"split_keywords": [
"evaluation",
" genai",
" generative ai",
" llms",
" large language models",
" rag",
" retrieval augmented generation"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5fbb8450d3f0379ff858c3d4b0ade9691e14ebf5730177d1405238bb76b1e524",
"md5": "bfb73224928ac2da8688df99a12efd72",
"sha256": "0dd09a9a3494099b64ae525e46fd8f95b34b3bce59b1903b2d9a1b5d5e267cb3"
},
"downloads": -1,
"filename": "ragbits_guardrails-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bfb73224928ac2da8688df99a12efd72",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 3583,
"upload_time": "2025-09-11T13:58:48",
"upload_time_iso_8601": "2025-09-11T13:58:48.171438Z",
"url": "https://files.pythonhosted.org/packages/5f/bb/8450d3f0379ff858c3d4b0ade9691e14ebf5730177d1405238bb76b1e524/ragbits_guardrails-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cc65e72e58a9744a4a81ee20321c4a76ae8d75377ce797f2bb5a9dfd52148520",
"md5": "7338cb82a4e3a5b1b13e120223990b98",
"sha256": "3910715cd19678a9fbf1d6a0825c7a9717b28789b673e059f3721746b63c8541"
},
"downloads": -1,
"filename": "ragbits_guardrails-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "7338cb82a4e3a5b1b13e120223990b98",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 4054,
"upload_time": "2025-09-11T13:58:54",
"upload_time_iso_8601": "2025-09-11T13:58:54.839738Z",
"url": "https://files.pythonhosted.org/packages/cc/65/e72e58a9744a4a81ee20321c4a76ae8d75377ce797f2bb5a9dfd52148520/ragbits_guardrails-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-11 13:58:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "deepsense-ai",
"github_project": "ragbits",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ragbits-guardrails"
}