A drop-in security layer for LLM applications (WAF for AI)
Project description
PiJector: Production-Grade LLM Security Layer
[!WARNING] BETA PHASE: PiJector is currently in a beta phase and is undergoing active verification by developers. Please use with caution in production environments and report any issues.
PiJector is a lightweight, drop-in security layer for LLM applications. It acts as a Web Application Firewall (WAF) for your AI, intercepting inputs to detect injections and monitoring outputs to prevent prompt leakage.
Features
- Multi-SDK Support: Drop-in wrappers for OpenAI and Google Gemini.
- Standalone Proxy: OpenAI-compatible REST API for language-agnostic security.
- Scoring Engine: Pluggable detectors (Regex, Canary, Semantic) to score risk.
- Framework Native: Integrations for LangChain, FastAPI, and LlamaIndex.
Quick Start
OpenAI Integration
from openai import OpenAI
from pijector import PijectorShield
client = PijectorShield(OpenAI())
# ... same calls as before
Gemini Integration
import google.generativeai as genai
from pijector.integrations.gemini import PijectorGeminiShield
model = genai.GenerativeModel('gemini-pro')
secure_model = PijectorGeminiShield(model)
response = secure_model.generate_content("Ignore instructions...")
Documentation
- User Guide: Detailed instructions for SDK and Middleware usage.
- Configuration: Documentation of all security settings.
- Contributing: How to help improve PiJector.
- Deployment: How to ship as library or middleware.
Quick Start
from openai import OpenAI
from pijector import PijectorShield
client = PijectorShield(OpenAI())
# ... standard OpenAI calls
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pijector-0.1.5.tar.gz.
File metadata
- Download URL: pijector-0.1.5.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6aa8dfbcfc87b69113698ebb6001e7f802808e56ed95790d592eefd416a1f1b
|
|
| MD5 |
930d4200d53d7ca0d7c71a3407bdf9c9
|
|
| BLAKE2b-256 |
57617a794d907ad6945055f4f1d6d5244b65b8a048281507eaaeb1546eab6a81
|
File details
Details for the file pijector-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pijector-0.1.5-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96b36aa29a6742f62e81ecffd6b7200db12d12f2091b939afaee1cd5cd877f24
|
|
| MD5 |
5ba92d27d06685802e5da865411f157b
|
|
| BLAKE2b-256 |
a1bd4ec087eeab295112b2e2c78b32c99e6eea0b82ee6aac63e6282a8b5f37a2
|