Configuration Reference¶
PyLocket is configured through environment variables. This reference covers all configuration options available to developers using the PyLocket platform.
Client Configuration¶
CLI Credentials¶
| File | Path | Description |
|---|---|---|
| Credentials | ~/.pylocket/credentials |
Stored auth tokens (auto-managed by pylocket login) |
Environment Variables¶
| Variable | Description | Default |
|---|---|---|
PYLOCKET_TOKEN |
API authentication token | — |
PYLOCKET_API_URL |
API base URL | https://api.pylocket.com |
PYLOCKET_FORCE_INCLUDE |
Comma-separated module names to always protect | — |
PYLOCKET_FORCE_EXCLUDE |
Comma-separated module names to never protect | — |
See Module Selection for details on controlling which modules are protected.
End-User Runtime Environment Variables¶
These variables are read by protected applications at runtime on the end user's machine.
| Variable | Description | Default |
|---|---|---|
PYLOCKET_LICENSE_KEY |
License key for automatic activation (skips the interactive prompt) | — |
Set PYLOCKET_LICENSE_KEY to activate silently — useful for server deployments, Docker containers, and CI/CD environments where interactive prompts are not practical.
Application-Level Configuration¶
These settings are configured per-app through the CLI, API, or Developer Portal.
Protection Settings¶
| Setting | CLI Flag | API Field | Description | Default |
|---|---|---|---|---|
| Target platform | --platform |
platform |
OS + architecture | CLI: auto-detected from your OS. API: required |
| Python version | --python |
python_version |
Bytecode version | Engine-detected from the artifact (API: optional since v1.2.218) |
Every build receives maximum protection automatically. No protection level configuration is needed.
Licensing Settings¶
| Setting | CLI Flag | API Field | Description | Default |
|---|---|---|---|---|
| Device limit | --device-limit |
device_limit |
Max devices per license | 2 |
| Offline grace | Portal only | offline_grace_hours |
Hours of offline use after activation | Configurable |
| License expiration | --expires (YYYY-MM-DD) |
create: license_config.expiry_days (integer days); update: expiry_date (datetime) |
License expiry date | None (perpetual); free tier forces 30 days when --expires is omitted |
| License type | --type (standard/demo) |
license_config.license_type (perpetual/subscription/trial) |
CLI standard maps to API perpetual; CLI demo maps to API trial |
standard |
See Also¶
- Getting Started — Initial setup
- CLI Reference — Command-line options
- REST API Reference — API endpoints