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.0.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.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pijector-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 cb331c6193fd7df63501f21862fd47da81f39fb9fb515e74eba8a6c8a2a1bad6
MD5 96882cfa7e6c0c92d388d9a68b08244c
BLAKE2b-256 17e22d89e7c1f07cb57717b13bba674b8787e01af6fefbe224ea0ac49aea7188

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pijector-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7f924bad622dee74e1bf5d1221bd97852e654c40b667825a95760379e9d8fd7
MD5 9a8366b3ad64377ae65988c81cf6e91a
BLAKE2b-256 18cf457a08fd76b479ba4041c63526a849bfb111f1470d04d63a4e1ac471aaa2

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