Skip to main content
Start With Integrations For Faster SetupIf you want a recipe-backed path for a specific platform, start with the Integrations guides. The SDK is best when you want direct control inside your own framework or service boundary.

Installation

For development:

Basic Usage

Async Support

Configuration

API Methods

check_mitigation(request)

Check if a request should be mitigated.

verify_challenge(token, response)

Verify a user’s challenge response.

send_beacon_event(event)

Send request traffic to the beacon server so Esper can analyze it and update state for later mitigation checks.

get_usage()

Get API usage statistics.

Framework Integration

Django Middleware

FastAPI Middleware

Flask Extension

Error Handling

Type Hints

The SDK includes full type hints for better IDE support:

Testing

Advanced Usage

Custom Retry Logic

Batch Processing

Examples

Full examples are available in the GitHub repository.