English · 简体中文

pyobfus

pyobfus

Obfuscate Python before you ship it, and still be able to debug what you shipped.

pyobfus handles multi-file projects: names are renamed consistently across modules, imports are rewritten to match, and Community output is ordinary .py. Keep the mapping file private, and pyobfus --unmap turns a production traceback back into your original names.

Install Community Try Professional Read the docs GitHub

Community Edition is free and has no file or line limits. pip install pyobfus

Why pyobfus

Protection is useful only when the resulting software can still be shipped, checked and supported.

A complete free edition

Community handles real multi-file projects, renaming consistently across modules and rewriting imports, with no file or line cap and no trial clock. Optional project limits are your CI safety rails, not an upgrade gate.

Protection that stays diagnosable

Obfuscation normally makes production reports useless: a customer sends you a stack trace full of I0 and I7. pyobfus keeps a mapping, so --unmap turns that trace back into your original names. The mapping stays with you; the customer only ever gets the obfuscated build.

Evidence before and after a build

Preview selection and artifacts, scan compatibility risks, verify generated syntax, and retain reproducible build reports and provenance instead of trusting an opaque one-way command.

Portable, local-first delivery

Your source stays local and Community emits ordinary cross-platform .py. Runtime-backed Pro artifacts ship the separate pure-Python pyobfus-runtime, never the proprietary builder or a native build matrix. No telemetry; every network request is listed.

Claims you can inspect

Threat-model limits, advisory-only compatibility and non-cryptographic deterrents are labelled honestly. Tested claims link to evidence rather than being presented as guarantees.

Start in two commands

Nothing to sign up for.

# Free, no limits on files or lines
pip install pyobfus
pyobfus src/ -o dist/ --save-mapping mapping.json

# Later, when a customer sends you an obfuscated traceback
pyobfus --unmap --trace trace.txt --mapping mapping.json

Choose your workflow

Start with the task you need to complete; the detailed reference stays in the docs.

Protect

Obfuscate a file or a complete project with framework-aware presets.

See the canonical example →

Check

Find reflection, dynamic-code and dependency risks before transforming code.

Scan and SARIF →

Verify

Keep syntax evidence, hashes, provenance and a deterministic build report.

Verify a build →

Debug

Restore original identifiers in a shipped traceback while keeping the mapping private.

Debug a traceback →

Automate

Use the JSON CLI, GitHub Action, MCP server, skills or VS Code extension.

Integrations →

Community and Professional

The free edition is a complete tool, not a demo.

Community: free, Apache-2.0

  • Name obfuscation across a whole project, imports included (module-level names and function locals in directory builds)
  • Reverse stack-trace mapping (--unmap)
  • Pre-flight risk check with SARIF export
  • Reproducible builds and a verifiable build report
  • Framework-aware presets and YAML configuration
  • MCP server, VS Code extension, GitHub Action
  • No file or line limits

Professional: $45 one-time

  • Protection strength: encryption, flattening, anti-debugging, opacity and sealing
  • Protected assets: import strings, embedded data, vault secrets and tracebacks
  • Distribution control: device, expiry, run, platform and supplied-key policies
  • Accountability: forensic watermarking and buyer-specific builds
  • Lifetime updates, up to 3 devices
  • Email support

Purchase Professional Edition

One payment. No subscription, no renewal.

$45 USD, one time

Card, Apple Pay, or WeChat Pay (微信支付) for buyers in China. Stripe shows the methods available in your region at checkout. WeChat Pay shows a QR code: open checkout on a computer and scan it with WeChat on your phone before it expires. 微信支付:请在电脑上打开付款页,用手机微信扫码并在二维码有效期内完成付款。

Secure checkout via Stripe. Your licence key arrives by email. 30-day money-back guarantee.

Try it first

# 5 days, no registration, no credit card
pyobfus-trial start

# After you buy
pyobfus-license register PYOB-XXXX-XXXX-XXXX-XXXX

Why you can check our claims

Every item here is verifiable without taking our word for it.

What obfuscation is not. It raises the cost of reading your code; it is not encryption and it does not make reverse engineering impossible. Anything that must stay secret (keys, licensing decisions, the algorithm itself) belongs behind a server boundary. Our comparison pages say the same thing about the alternatives, including where they beat us.