Skip to main content

pychd-pyobf

Anonymise identifiers, string constants, docstrings, and metadata inside a CPython .pyc while preserving the opcode stream exactly.

Built to neutralise LLM training-data memorisation when benchmarking Python decompilers: even if an LLM has seen the original source on the internet, the anonymised .pyc does not contain the surface tokens (variable names, comments, docstrings) it would use to recognise the source.

Covers every CPython release pychd recognises: 3.0–3.14.

  • 3.14 (the running interpreter) is rewritten natively via types.CodeType.replace().
  • 3.0–3.13 are rewritten via a subprocess into a uv-managed Python of that minor version, so the obfuscator stays a tiny dependency.

Pair with pychd-pyfuzz (random valid-Python source generator) for the strongest available contamination guarantee.

See the main pychd README for the broader story.

Install

pip install pychd-pyobf

Use

pychd-pyobf rewrite IN.pyc OUT.pyc --mapping mapping.json

The --mapping flag (optional) writes the original-to-anonymised identifier dict to JSON for audit / debugging. Without it, the mapping is discarded after rewriting.

Status

Pre-release. API and CLI are still evolving with the parent project.

Metadata

Release files for pychd-pyobf 0.1.0

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

Source distribution (sdist)

Source distribution for pychd-pyobf 0.1.0
File Size Uploaded Provenance Actions
pychd_pyobf-0.1.0.tar.gz 10.8 kB With provenance Details for pychd_pyobf-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pychd-pyobf 0.1.0
File Interpreter ABI Platform Actions
pychd_pyobf-0.1.0-py3-none-any.whl Python 3 none any Details for pychd_pyobf-0.1.0-py3-none-any.whl

Total release size: 23.4 kB

Release files / pychd_pyobf-0.1.0.tar.gz

Download URL pychd_pyobf-0.1.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3a1e839ec307f2a080fe695f84d14ef40289a45d4f005e3be6645c51c7f3a452
BLAKE2b-256 checksum
How to use checksums
646ec8575e4ab5f8b7c03e6c174cb419871431a246a378b7bcf5ff954d643665
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 May 27, 2026.

Transparency log

Release files / pychd_pyobf-0.1.0-py3-none-any.whl

Download URL pychd_pyobf-0.1.0-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e854f58fb482dc40c5ed65aa509b9d8d8f8520a315a04882d19e9018318543ac
BLAKE2b-256 checksum
How to use checksums
de9b9fbb74a9c2e22c065e395503369183d136f12196fc72cea3cc67dc430bfa
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 May 27, 2026.

Transparency log

Security for pychd-pyobf 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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pychd_pyobf-0.1.0.tar.gz

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 May 27, 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

2 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