Skip to main content

Python Obfuscator Decorator — Skip Selected Strategies

Identity decorators so Python Obfuscator can leave chosen functions and classes untouched.

Install with pip install python-obfuscator-decorator. You need this package only to run original source. The obfuscator reads @obfuscator.skip from the AST, applies the skip, then strips the decorator and unused import obfuscator lines. Obfuscated output has no runtime dependency on this package.

More about Python Obfuscator:

https://www.pelock.com/products/python-obfuscator

Install

pip install python-obfuscator-decorator

Import package name: obfuscator. PyPI distribution name: python-obfuscator-decorator.

Usage

import obfuscator

@obfuscator.skip(obfuscator.ENCRYPT_STRINGS, obfuscator.STATE_MACHINE)
def handshake(secret: str) -> str:
    return secret

@obfuscator.skip()
class LicenseCheck:
    def verify(self):
        return True

Also valid:

  • @obfuscator.skip("encrypt_strings") — string keys match engine strategy names
  • @obfuscator.skip (bare, no call) — skip every mutating strategy on that construct
  • import obfuscator as alias then @alias.skip(...)

CODE_VIRTUALIZATION skips all virtualization modes (FSA, VM, flatten) on that function or class.

What skip cannot cover

  • Module-level statements (x = "secret" at top level) have no decorator
  • Lambdas cannot be decorated
  • Skipping rename of a function keeps its name; callers must keep using that name
  • Skipping self_defending on one method does not remove the module-level integrity probe

After obfuscation

Shipped scripts do not import obfuscator. Markers are removed from the emitted source.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_obfuscator_decorator-1.0.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_obfuscator_decorator-1.0.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file python_obfuscator_decorator-1.0.0.tar.gz.

File metadata

File hashes

Hashes for python_obfuscator_decorator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7ab1aca427239737f5617e48f4440019496c74c5a453f539f19989c43a6b20af
MD5 43c928112c2ee0cf1c27c61024871b4a
BLAKE2b-256 de02544e5b960a009ab6e5b5ac13dd5fd26d8f7b7ba9097f2339a371925d9533

See more details on using hashes here.

File details

Details for the file python_obfuscator_decorator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_obfuscator_decorator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00d876ecc869601f91bdb8c6d091cc7b458006f3b6e6c8a3c8366862049f6bc6
MD5 aafcc897788421f487f3b256b6b7a2d7
BLAKE2b-256 ca5ff151500ea122a626e415b46a7d39c8941e54a1ce0d99d85334b53857d4a4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

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