Skip to main content

Obfuscate proprietary LocalStack code bases

Project description

Obfuscator

Utility to obfuscate Python code

Installation

pip install localstack-obfuscator

Usage

You need to have a config file in the project you want to obfuscate.

An example config file is given below:

custom_patches: false # if true, will use custom patches for dataclasses. Default is false.

# custom parameters for python_minifier
minify:
  remove_literal_statements: true

# list of files to exclude from obfuscation
exclude:
  - "constants.py"
  - "routes.py"

# list of files to remove from resulting build
remove:
  - ".venv"
  - "build"

target_dir: "outages" # relative to the build directory. The default is the same as current dir name
build_dir: "build" # relative to the current dir. The default is "build".

Note that the exclude and remove lists perform different functions:

  • The exclusion works on a per-file basis and is for files that should be kept in the package but not obfuscated.
  • The removal is for files and directories that should not be in the final build at all. This is, e.g., useful for the virtual environment directory or the build directory itself. It also improves the performance because the files are not even copied to the build directory in the first place.

To perform the obfuscation, run the obfuscator against the project directory.

localstack-obfuscator .

Project details


Download files

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

Source Distribution

localstack_obfuscator-0.3.0.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file localstack_obfuscator-0.3.0.tar.gz.

File metadata

  • Download URL: localstack_obfuscator-0.3.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for localstack_obfuscator-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3fd5737bdd528990e53a7541d32551ae317c65e3304be22a0cffaec48959b4a1
MD5 42c48372f11357b3fa4e4b1a0371fd3a
BLAKE2b-256 d7540a647ae68d94e54308b7cf429bd082edee805a431a679a0cd376384cf766

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page