For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HUMAN DashboardHUMAN WebsiteRequest a Demo
Product GuidesEnforcer GuidesMobile SDKAPI ReferenceCustomer support
Product GuidesEnforcer GuidesMobile SDKAPI ReferenceCustomer support
  • General
    • About Enforcers
    • Support first-party HUMAN calls
    • Troubleshoot Enforcer configurations
  • Enforcer frameworks
    • Akamai ESI
    • Apache - C Module
    • ASP.NET
    • Callout Enforcer
    • Envoy Proxy
    • F5 BIGIP
    • Fastly JavaScript Compute@Edge
    • Google Cloud Platform (GCP) Callout Enforcer
    • Kong Plugin
    • NGINX - C Module
    • NGINX - LUA Module
    • PHP
    • Python
      • What's New
      • Installation
      • Required Configuration
      • Configuration Options
      • Upgrading
      • First Party Configuration
    • Ruby
    • Salesforce Commerce Cloud Cartridge
LogoLogo
Login
Login
HUMAN DashboardHUMAN WebsiteRequest a Demo
Enforcer frameworksPython

Required Configuration

Was this page helpful?
Previous

Configuration Options

Next
Built with

To use the middleware on a specific route follow this example:

1from perimeterx.middleware import PerimeterX
2
3px_config = {
4 'px_app_id': 'PX_APP_ID',
5 'px_cookie_secret': 'PX_COOKIE_KEY',
6 'px_auth_token': 'PX_AUTH_TOKEN',
7}
8application = get_wsgi_application()
9application = PerimeterX(application, px_config)
  • The Application ID / AppId and Token / Auth Token can be found in the Portal, in Applications.
  • HUMAN Risk Cookie / Cookie Secret can be found in the portal, in Policies.
    The Policy from where the Risk Cookie / Cookie Secret is taken must correspond with the Application from where the Application ID / AppId and Token / Auth Token.
    For details on how to create a custom Captcha page, refer to the documentation