Skip to main content

Obfy

PyPI version Python versions License: Source-Available CI Docs

A clean-room Python code-protection tool written in Rust: AST obfuscation plus bytecode encryption with a native loader — and a fully auditable supply chain.

The deliverable is not just "an obfuscator." It is an obfuscator whose entire provenance we can show a customer.

What it does

  • AST obfuscation — --level 0–5: strip docstrings/comments, mangle string literals, inject dead code, rename identifiers (function-local and cross-module), and natively compile eligible functions to a clean-room bytecode VM so their CPython bytecode never ships. The --level flag is the sophistication dial — higher levels do strictly more:

    --level Adds (each level includes the ones below it)
    0 none — compiled, marshalled, encrypted as-is
    1 strip docstrings
    2 + string mangling + dead code
    3 + local (function-scope) rename
    4 + cross-module public-name rename
    5 + native function compilation (CPython bytecode never ships)
  • Bytecode encryption + native loader: compile → marshal → AES-256-GCM encrypt; a PyO3 import hook decrypts in memory at import time. This is the core of the product.

  • Licensing: expiry dates and machine/MAC binding, enforced by the loader.

  • Supply chain: vendored + audited deps, reproducible builds, and an SBOM shipped with every release.

Honest posture — read this

Python obfuscation is deterrence, not encryption-grade security. CPython must eventually execute real bytecode, so a skilled attacker who controls the runtime can recover code objects. Obfy stops casual copying and raises the cost for everyone else; it does not replace legal protection for sensitive IP. More on what each level does and what it does not guarantee: Obfuscation levels — honest posture.

Install

pip install obfy

Requires CPython 3.10–3.13 on macOS (Apple Silicon or Intel), Linux (x86_64 / aarch64), or Windows (x64). Build with the same Python version you ship for — the marshal/bytecode format is version-specific. pip install obfy gives you the obfy CLI and bundles the native runtime that gets packaged into your protected output; there is nothing else to install.

Quick start

Protect a project — one command in, a drop-in replacement out:

obfy build --src ./myproject --out ./dist --python python3

This protects the whole tree — every .py under --src is discovered recursively, obfuscated, compiled, marshalled, and AES-256-GCM encrypted. ./dist is a 1:1 mirror of ./myproject where each .py is a tiny self-activating stub, the real code lives encrypted in ./dist/__obfy__/*.obfy, non-.py files are copied across, and the native runtime is bundled in — nothing extra to install.

Heads-up — secrets: every non-.py file under --src is copied into the dist so the output runs in place. If --src is a repo root, files like .env or keys get copied too. Point --src at your code package (e.g. ./app), or build from a code-only staging tree.

Run it exactly as you ran the original — no sys.path edits, no manual bootstrap:

python ./dist/run.py

See the tutorial for a full walkthrough, and packaging for PyInstaller.

Documentation

Full documentation lives at docs.camouflage.network/obfy:

Building from source

Contributors and anyone building the toolchain themselves (the published wheels already contain everything an end user needs):

# The CLI:
cargo build --release                  # -> target/release/obfy

# The native runtime, into the interpreter you ship for:
pip install maturin
maturin develop --release              # installs obfy_runtime into the active venv

Build the runtime with the same Python version you will run the protected code on. Project provenance, dependency vetting, and the PyArmor comparison live under docs/.

License

Proprietary, source-available — see LICENSE.md. © 2026 Camouflage Networks Inc.

Metadata

Release files for obfy 0.1.0

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

Built distributions (wheels)

Table of built distributions (wheels) for obfy 0.1.0
File Actions
obfy-0.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for obfy-0.1.0-cp313-cp313-win_amd64.whl
obfy-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details for obfy-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
obfy-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64 Details for obfy-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
obfy-0.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for obfy-0.1.0-cp312-cp312-win_amd64.whl
obfy-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for obfy-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
obfy-0.1.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.12 CPython 3.12 macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64 Details for obfy-0.1.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
obfy-0.1.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for obfy-0.1.0-cp311-cp311-win_amd64.whl
obfy-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for obfy-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
obfy-0.1.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64 Details for obfy-0.1.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
obfy-0.1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for obfy-0.1.0-cp310-cp310-win_amd64.whl
obfy-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for obfy-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
obfy-0.1.0-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) Details for obfy-0.1.0-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Total release size: 59.5 MB

Release files / obfy-0.1.0-cp313-cp313-win_amd64.whl

Download URL obfy-0.1.0-cp313-cp313-win_amd64.whl
Size 3.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
3c8e90fcc41a96094cfbf4e80ded87db602ea751a8bef347f5e8f8d32b0e1f72
BLAKE2b-256 checksum
How to use checksums
7a54045f7dff10a389dbff897982ee6af4b4908434ab1cf4aa39cbb927da5421
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / obfy-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL obfy-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.1 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
61362de8eb8a675e7406a3aff076396e9303e61ae7c3ced7f6c4de5519cd76b0
BLAKE2b-256 checksum
How to use checksums
178bf6a0bb5a5af8da6d5e65097116d1a641925378dcdac4d22eee09fc906484
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / obfy-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL obfy-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 7.2 MB
Tags CPython 3.13 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
54dad89a479487bbb5df104cdfbc7564fa986692fb8e77922a545401e420690f
BLAKE2b-256 checksum
How to use checksums
74e825568cc04e63678231c41ef97363652091c72bb116178d5ed1089f6e10c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / obfy-0.1.0-cp312-cp312-win_amd64.whl

Download URL obfy-0.1.0-cp312-cp312-win_amd64.whl
Size 3.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
0e21b1bdacaa2da0bfe7ce29cef7aa63f6fbdd9fab3bbf5b1552cd89786f33b8
BLAKE2b-256 checksum
How to use checksums
a623a921519ab9d2d7388dc8c25af349fd3c620bc7f0fd9a0f6bd62746c77190
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / obfy-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL obfy-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.1 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
38012c36757ed7d6407ddc72c5a849c9ca90931b1c534720d0c1d8db498b107d
BLAKE2b-256 checksum
How to use checksums
9c740e89aa108139e6722e45253654b7767dfc9aac35419351c271aff7a8b1ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / obfy-0.1.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL obfy-0.1.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 7.2 MB
Tags CPython 3.12 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3018d66f5817d8c6917eb3a77f81b138dd15b4c3b23ed7ad2e2df986b15e948b
BLAKE2b-256 checksum
How to use checksums
09fd42573a85ab9fa80cc2db794103c590e1e6b2ce323cfdbce15cb68403fe24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / obfy-0.1.0-cp311-cp311-win_amd64.whl

Download URL obfy-0.1.0-cp311-cp311-win_amd64.whl
Size 3.6 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
9e369ac4e4da4ededa2a74fb3596e78817088b94eee1b2ca1775914232b41844
BLAKE2b-256 checksum
How to use checksums
9099b8a8b2acc01901b054d6815d169bfc9913b7381126481580638c7a0c74f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / obfy-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL obfy-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.1 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9f98a56274d49e0e5b4f43fee51219523a178216cc24884c2965fef78361e258
BLAKE2b-256 checksum
How to use checksums
2c888a50b14ff48c7fe7bb68d36f42562f5396650c3af7a85a2caa6c51422c8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / obfy-0.1.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL obfy-0.1.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 7.2 MB
Tags CPython 3.11 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8a0cc123da724534f2428dee53347c0bed4ec4d3e552ab70bf8a92b9747085cc
BLAKE2b-256 checksum
How to use checksums
b0387533d181c83d9bfc5aa9e848917e6b2f00bb0f195a4561d9eb6a03e86a0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / obfy-0.1.0-cp310-cp310-win_amd64.whl

Download URL obfy-0.1.0-cp310-cp310-win_amd64.whl
Size 3.6 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
aa49c00154a14fcaf6d663f40d788e8d38a3c68b2e0e816735ddb887e958bee6
BLAKE2b-256 checksum
How to use checksums
a603220aa2222f5c5c6cc33c1a46b32055a383ba76f8dee97d9795a4c34637ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / obfy-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL obfy-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
84708fe9f95ba3034b3cefb425f506d2dfcb46a3ed78552668062d564b67eaf1
BLAKE2b-256 checksum
How to use checksums
1f5fadcc926f2317ce2b9b680d2f9d2888b131e03d3e00fda93514d9cc760828
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / obfy-0.1.0-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL obfy-0.1.0-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 7.2 MB
Tags CPython 3.10 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2599a4d07d89f86f077cb34a0ecf683921bf4e50baa6833a2fb11291b5e6ba26
BLAKE2b-256 checksum
How to use checksums
99cc666ca06541a68db2e0723e9e2f41cb2e0c10211df81d6342e1426af2c87c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Security for obfy 0.1.0

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.

Full provenance

All 12 files in this release have been uploaded with provenance metadata.

Select from 12 files

Attestation for obfy-0.1.0-cp313-cp313-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

12 release files Full provenance

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