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 | (required) |
| Python version | --python |
python_version |
Bytecode version | (required) |
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 | --offline-grace-hours |
offline_grace_hours |
Hours of offline use after activation | Configurable |
| License expiration | --expires |
expires_at |
License expiry date | None (perpetual) |
| License type | --type |
license_type |
standard or demo |
standard |
See Also¶
- Getting Started — Initial setup
- CLI Reference — Command-line options
- REST API Reference — API endpoints