Skip to main content

PyLocket

Protect, license, and sell your Python apps, without ever shipping your source or your keys.

PyPI version Python versions License: Proprietary Downloads

PyLocket is the developer platform for shipping commercial Python desktop apps. It wraps your build in strong anti-reverse-engineering protection, issues and enforces per-device license keys, and delivers your app to your customers. No source rewrites. No percentage fees.

Protect a build in three lines:

pip install pylocket
pylocket login --sso
pylocket protect --app <APP_ID> --artifact dist/myapp.exe --out ./protected/

Why PyLocket

Most "protection" tools encrypt your .py files and decrypt them back to your original source at import time. That means the key ships inside your app, and the original code is recoverable. Public one-click decryptors exist for that entire category.

PyLocket is built differently.

1. Keys issued per device, never shipped

Every function body, method body, class body and module-level code block in your application is encrypted, with a small number of documented exceptions, each listed in the build's coverage summary. The keys are issued to each licensed device at activation and are never embedded in your app. Decrypted code runs inside a hardened native runtime and is never written back to disk as source.

Without a valid license, the encrypted code cannot be decrypted from the files you ship. Someone holding a valid license runs your app, so the values your app uses are readable to them at runtime: against them, PyLocket is a substantial cost increase, not secrecy (why). Anything a customer must never learn belongs on your server, not in the binary.

2. A platform, not a file utility

Protection is step one. PyLocket also gives you license keys with per-device activation limits and revocation, and branded one-time download links from the CLI, plus free-trial links, one-click push updates to your users, and hosted checkout in the Developer Portal. One platform replaces your obfuscator, your license server, and your storefront.

3. You sign it, PyLocket delivers it

PyLocket does not code-sign your app. On Windows and macOS, PyLocket's own runtime files inside your app (_pylocket_rt and _pylocket_prompt) are already code-signed by Lamaute Labs. Leave those files as they are and sign everything else (the code-signing guide shows how). You sign your protected app with your own certificates (Authenticode on Windows; an Apple Developer ID signature and notarization on macOS) and upload the signed copy with pylocket replace-signed. PyLocket stores it byte for byte and delivers it to your customers with your signature intact. An app you have not signed meets Windows SmartScreen and macOS Gatekeeper warnings or blocks, and the PyLocket Installer and Hub will not install it on those platforms.

replace-signed takes a macOS .app or a single-file Windows .exe; Windows builds made as a folder (PyInstaller onedir, cx_Freeze) cannot be replaced with a signed copy yet. By default your customers get your newest Ready build as soon as protection finishes, signed or not. To make sure they only ever get the copy you signed, set the app to serve released builds only in the Developer Portal and use pylocket replace-signed --release.

Developers verify their identity before they can download a protected build, and uploads are checked for malware before protection (PyLocket can switch that check off for an app).

PyLocket does not claim to be unbreakable. Nothing is. The goal is to make reverse-engineering economically impractical: months of expert effort, not an afternoon.


Licensing and distribution

pylocket is a full license and delivery client, not just an obfuscator:

  • List, revoke, and reset license keys (pylocket licenses ...)
  • Issue license keys (pylocket licenses create) — each license records the per-license fee on your next invoice, so the command confirms first; --yes skips the prompt in CI. Extending an expiry (pylocket licenses extend) requires an active Pro subscription
  • Bind each license to a device limit you control
  • Generate one-time, branded download links (pylocket distribute)
  • Upload the copy you signed with your own certificate, for PyLocket to deliver (pylocket replace-signed). PyLocket stores it byte for byte, so your signature (and your notarization, if you notarized it) stays intact. Add --release to release it once the replacement succeeds
  • Choose which builds your customers get on an app set to serve released builds only: release a READY build, or undo a release (pylocket release). On Windows and macOS, upload your signed copy before you release, or use replace-signed --release
  • Wire build events into your own systems with webhooks (pylocket webhook ...)

Quick start

# Authenticate via browser (recommended for 2FA and password-manager users)
pylocket login --sso

# Or authenticate with email and password
pylocket login

# List your apps
pylocket apps list

# Protect a build (PyInstaller, cx_Freeze, Briefcase, wheel, .app, and more)
pylocket protect --app <APP_ID> --artifact dist/myapp.exe --out ./protected/

# Check build status
pylocket status --build <BUILD_ID>

# Download the protected artifact
pylocket fetch --build <BUILD_ID> --out ./protected/

# Windows and macOS: sign the protected build with your own certificate
# (and notarize it on macOS), then upload the signed copy for delivery
pylocket replace-signed <BUILD_ID> <SIGNED_PATH>

Commands

Command What it does
pylocket login Authenticate (--sso for browser OAuth2, recommended for 2FA)
pylocket apps Manage applications (list, create, update, delete)
pylocket protect Upload and protect a build (add --out <DIR> to download the result)
pylocket status Show a build's protection status
pylocket fetch Download a completed protected artifact
pylocket replace-signed Upload your signed copy of a protected build for delivery, stored byte for byte so your signature stays intact (--release releases it once the swap succeeds)
pylocket release Release a READY build, or undo a release (--undo)
pylocket licenses Manage licenses (list, create, get, revoke, reset-devices, extend)
pylocket distribute Generate a one-time branded download link
pylocket webhook Configure build-event webhooks (set, remove, test, status)
pylocket auth Manage authentication and 2FA settings

Run pylocket <command> --help for full options.


Supported builds

Packaging: PyInstaller (onefile and onedir), cx_Freeze, BeeWare Briefcase, Python wheels (.whl), raw scripts, ZIP archives, and macOS .app bundles.

Platforms: Windows x64, Linux x64, Linux arm64, macOS Intel, macOS Apple Silicon.

Python: 3.12, 3.13, and 3.14. PyLocket targets modern Python; the hardened runtime requires a current CPython.


PyLocket vs source encryptors

Source encryptors (.pye) PyLocket
Decryption key ships with the app Yes No, issued per device at activation
Recovers to your original source Yes Not from the files you ship without a license, apart from the documented exceptions
Built-in licensing, device binding, revocation No Yes
Sell, deliver, and push updates No Yes
Identity-verified developers No Yes
Delivers your signed copy unchanged No Yes
Pricing Per developer seat Flat, per account, no percentage fees

See the full comparison at pylocket.com.


Documentation and support

Metadata

Release files for pylocket 1.1.21

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylocket 1.1.21
File Size Uploaded Provenance Actions
pylocket-1.1.21.tar.gz 46.8 kB Without provenance Details for pylocket-1.1.21.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pylocket 1.1.21
File Interpreter ABI Platform Actions
pylocket-1.1.21-py3-none-any.whl Python 3 none any Details for pylocket-1.1.21-py3-none-any.whl

Total release size: 100.9 kB

Release files / pylocket-1.1.21.tar.gz

Download URL pylocket-1.1.21.tar.gz
Size 46.8 kB
Tags Source
SHA-256 checksum
How to use checksums
58e3f4f6d1adfc38cd108d1aaa06d13f9acbae5e59efafb99d81684db703c897
BLAKE2b-256 checksum
How to use checksums
087e47d98cfcbe452f2f0c356cf904320d1e667640e8e226a150c011feb27939
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / pylocket-1.1.21-py3-none-any.whl

Download URL pylocket-1.1.21-py3-none-any.whl
Size 54.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3819b1dc9368df057b7ed9e7931cf1d126d399b749642b72f18345bee0b6eaed
BLAKE2b-256 checksum
How to use checksums
219af783373356d4f5e8404caa524d60e025a7d0797ea26b17e5dcc34f89fe13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Security for pylocket 1.1.21

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page