All comparisons

MagicLock vs PyInstaller — protection vs packaging, and using both

A factual comparison: PyInstaller solves distribution, not protection. MagicLock artifacts stay encrypted wherever they travel — and the two tools compose well.

PyInstaller is the standard way to turn a Python application into a single executable your users can run without installing Python. It is mature, free, and very good at that job. It also states plainly what it is not: a protection tool. This page exists because the two are often confused — and because they actually work well together.

What PyInstaller does well

  • One-file / one-folder distribution with the interpreter bundled — the classic "just send them an .exe" answer.
  • Broad ecosystem support, hooks for tricky packages, cross-platform maturity.
  • Free and open source.

Packaging is not protection

A PyInstaller bundle is an archive: the application's .pyc bytecode ships inside it, and freely available tools unpack it back to bytecode (and from there to quite readable source) in minutes. This is not a flaw — PyInstaller was never designed to keep secrets, and its documentation doesn't claim otherwise. But it means a bundled app offers approximately the same protection as shipping your .py files.

MagicLock artifacts are encrypted wherever the files travel: inside a PyInstaller bundle, on a USB stick, in a customer's backup. They become a running program only on devices you have authorized, verified fully offline at each run.

Side by side

CapabilityMagicLockPyInstaller
Single-file executable for end usersCompiled tier: standalone buildsYes — the design goal
Interpreter bundledCompiled tier: yesYes
Source/bytecode recoverable from the shipped fileNo — encrypted (.pya) or native code with a gate per moduleYes — archive unpacks to .pyc
Device-bound licensingBuilt in— (not a goal)
Model / asset encryptionPer-device envelopesBundled in plaintext
Expiry, trials, kill switchYes
PriceCommercialFree, open source

Based on public documentation as of the date below.

Better together

The two tools solve different layers, and they compose cleanly:

  1. magiclock protect your modules and magiclock protect-model your weights — the protection layer.
  2. Package the protected app with PyInstaller as usual — the distribution layer.

The bundle keeps PyInstaller's convenience; the code and models inside it keep MagicLock's encryption and device binding. Alternatively, magiclock build --standalone produces a self-contained native app directory in one step — protection and distribution from a single command.

When PyInstaller alone fits better

  • You need easy distribution and have no protection or licensing requirement — internal tools, free software, trusted environments.

When to add MagicLock

  • The moment "anyone can unpack it" becomes a business problem: paid software, licensed seats, proprietary models, expiring pilots.

See how protection works, or try the full flow free for 48 hours at pricing.

Facts last verified 2026-08

Product names and trademarks belong to their respective owners. Comparisons are based on public documentation; capabilities vary by version and edition — verify with each vendor for your use case.