Skip to main content

A drop-in security layer for LLM applications (WAF for AI)

Project description

PiJector

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...")

Shipping & Deployment

For instructions on how to publish to PyPI or deploy as a Dockerized middleware, see DISTRIBUTION.md.

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

pijector-0.1.1.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pijector-0.1.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file pijector-0.1.1.tar.gz.

File metadata

  • Download URL: pijector-0.1.1.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pijector-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e4cb95e634e53d1f19bcd47966d65ac593525cd6f464f35c6282870111d5dab8
MD5 9272e5326168755dc1d5fad83e488cde
BLAKE2b-256 30b1caff237d5be2a82aba07be2b1395f613326cdab6b2277939b6fa3ee5418e

See more details on using hashes here.

File details

Details for the file pijector-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pijector-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pijector-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1c96b6897e97dd47b8602c6dd682981803c92b20f400fe8c59c2920bf3ab247
MD5 732a9c92a3c8850f5b1e0cf0c2464a84
BLAKE2b-256 c2de5ba2467858531dcd7ae7aaf4b29b5007ddfe343722924f396115d448517c

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