How To: Use the PyCharm Plugin¶
The PyLocket PyCharm plugin integrates protection directly into your IDE, letting you protect applications without leaving the editor.
Installation¶
- Open PyCharm → Settings (or Preferences on macOS)
- Navigate to Plugins → Marketplace
- Search for PyLocket
- Click Install
- Restart PyCharm when prompted
Setup¶
Login¶
- Open the PyLocket tool window (appears in the bottom panel after installation)
- Click Login
- Enter your PyLocket email and password
- If 2FA is enabled, enter your TOTP code
Your session persists until the token expires or you log out.
Configure API URL (optional)¶
By default, the plugin connects to https://api.pylocket.com. To use a custom endpoint:
- Go to Settings → Tools → PyLocket
- Enter your API URL
- Click Apply
Artifact Detection¶
The plugin automatically detects packaging configurations in your project:
| File | Packaging Tool |
|---|---|
*.spec |
PyInstaller |
setup.py with cx_Freeze |
cx_Freeze |
pyproject.toml with Briefcase |
BeeWare Briefcase |
Detected configurations appear in the PyLocket tool window under Artifacts.
Protecting an Application¶
- In the PyLocket tool window, select an artifact from the Artifacts list
- Click Protect
- Configure options in the dialog:
- App: Select your registered app (or create a new one)
- Platform: Target platform
- Python Version: Python version used for building
- Click Start Protection
The build status appears in the tool window with a progress indicator.
Monitoring Builds¶
The Builds tab shows:
- Build ID, status, and timestamp
- Platform
- Download button (available when status is
READY)
Click Refresh to update the status.
Downloading Protected Output¶
- Find the build with status
READYin the Builds tab - Click Download
- Choose the output directory
- The protected files are saved to the selected directory
Managing Apps and Licenses¶
The plugin provides tabs for:
- Apps: View and create registered applications
- Licenses: View license keys, activation counts, and statuses
- Settings: API URL, authentication, and preferences
Keyboard Shortcuts¶
| Action | Shortcut |
|---|---|
| Open PyLocket tool window | Alt+L (Windows/Linux) / Option+L (macOS) |
| Protect selected artifact | Ctrl+Shift+P (Windows/Linux) / Cmd+Shift+P (macOS) |
| Refresh build status | F5 |
Troubleshooting¶
| Problem | Solution |
|---|---|
| Plugin not visible | Check View → Tool Windows → PyLocket |
| Login fails | Verify credentials work with pylocket login in the terminal |
| No artifacts detected | Ensure your project contains a PyInstaller .spec file, setup.py, or Briefcase pyproject.toml |
| Build stuck at QUEUED | Check your internet connection. The protection queue may be under load. |
See Also¶
- Getting Started — CLI-based quickstart
- Basic Tutorial — Full protection walkthrough