Python SDK

Overview

The LockLLM Python SDK is currently in development. This native Python library will provide idiomatic integration for Python applications with zero-configuration prompt security. Built specifically for Python developers, the SDK will offer Pythonic APIs and seamless integration with popular Python frameworks.

Coming Soon

The Python SDK is under active development. We are building a library that feels natural to Python developers while providing comprehensive prompt injection protection without compromising on ease of use.

Planned Features

  • Pythonic API: Idiomatic Python interfaces following PEP 8 conventions
  • Zero Configuration: Works out of the box with sensible defaults
  • Framework Integration: Native support for Django, Flask, FastAPI
  • Async Support: Full async/await compatibility with asyncio
  • Type Hints: Complete type annotations for IDE autocompletion
  • Context Managers: Pythonic resource management patterns
  • Decorator Support: Function decorators for automatic scanning
  • Middleware: Framework-specific middleware components

Planned Usage

The SDK will offer simple, intuitive APIs for prompt security:

from lockllm import LockLLM

# Initialize client
client = LockLLM(api_key='your-api-key')

# Scan a prompt
result = client.scan(user_input)
if result.is_safe:
    # Safe to use with LLM
    response = llm.generate(user_input)

# Or use decorator for automatic scanning
@client.secure
def generate_response(prompt):
    return llm.generate(prompt)

Use Cases

Once available, the Python SDK will be ideal for:

  • Django web applications with LLM features
  • Flask microservices using AI models
  • FastAPI endpoints with prompt processing
  • Data science notebooks with user-generated prompts
  • CLI tools with LLM integration
  • Backend services processing AI requests

Current Alternative

While the Python SDK is in development, Python developers can use the REST API or proxy integration for immediate prompt security needs. The REST API provides language-agnostic access to all LockLLM features.

Get Notified

Sign up in the dashboard to receive notifications when the Python SDK launches. Documentation for the Python SDK is coming soon with updates on development progress and planned release timeline.