tyga-langchain
Safety shield for LangChain. Wrap any tool with safety_guard() to screen commands before execution.
Install
pip install tyga-langchain
Quick Start
from langchain_community.tools import ShellTool
from tyga_langchain import safety_guard
# One line — wrap any tool
safe_shell = safety_guard(ShellTool())
# Safe commands run normally
safe_shell.run("echo hello") # hello
# Dangerous commands are blocked
safe_shell.run("rm -rf /") # BlockedError: Safety Gate 1: matched [rm\s+-rf\s+/]
How it works
- Gate 1 (local): Regex denylist screens commands in <5ms. Free, no API key needed.
- Gate 2 (cloud): Set
A2A_API_KEYenv var to enable LLM judge evaluation via a2ainfrastructure.com.
Get an API key
Sign up free at a2ainfrastructure.com. 500 evaluations/month on the free tier.
Links
License
Proprietary — Tyga.Cloud Ltd. See LICENSE file.
Metadata
Release files for tyga-langchain 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tyga_langchain-0.1.2.tar.gz | 4.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tyga_langchain-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.7 kB
Release files / tyga_langchain-0.1.2.tar.gz
| Download URL | tyga_langchain-0.1.2.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ebdccbd4d19f68fbfe704c41453660d572c94093fddf161b4ab1427b62fe13ca
|
|
BLAKE2b-256 checksum How to use checksums |
b2c6967ed40115bd570feb6819f6e0d75dc32da77aea509ddaad819d7fa6c00d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / tyga_langchain-0.1.2-py3-none-any.whl
| Download URL | tyga_langchain-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1898aca232d9e10a3d8d0d50103e2dae3f725bbc026994eb31fc37aaaa705e7c
|
|
BLAKE2b-256 checksum How to use checksums |
d8945732d12b3f37e1443113ff4e4c90cf989b40d8edb1371e660cf7d1ec0e6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for tyga-langchain 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.