Skip to main content

Random syntactically-valid Python source generator — produces never-published code for contamination-free decompiler benchmarking

Project description

pychd-pyfuzz

Random, syntactically-valid Python source generator. Built to feed contamination-free benchmarks for pychd (the Python .pyc decompiler) and any other decompiler that wants the same.

Every sample is constructed directly from ast.AST nodes (not text templates), so it is — by construction — a code path that has never appeared anywhere on the internet and cannot be in any LLM's training data. Pair with pychd-pyobf (which strips identifiers + constants from compiled .pyc) for the strongest available contamination guarantee.

See the main pychd README for the broader story.

Install

pip install pychd-pyfuzz

Use

# 100 samples targeting Python 3.14:
pychd-pyfuzz generate --target 3.14 --count 100 --seed 0 --out /tmp/fuzz/

Each emitted .py file is accompanied by a sidecar .tags.json with the syntactic-feature tags the sample actually exercised (match, try_star, walrus, fstring, type_params, …) so downstream benchmarks can break recovery rates out by feature.

Status

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

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

pychd_pyfuzz-0.1.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

pychd_pyfuzz-0.1.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file pychd_pyfuzz-0.1.0.tar.gz.

File metadata

  • Download URL: pychd_pyfuzz-0.1.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pychd_pyfuzz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3aa6998d32cbc44bc2045a7955730ae247ada507334fcc2d61a6de72767cd2de
MD5 8851d7e2d7c64d36a7581ecd3abbd2f5
BLAKE2b-256 1787caa67ee013af205fc24f7ff845b568ca6168c1f871df855739605a353191

See more details on using hashes here.

Provenance

The following attestation bundles were made for pychd_pyfuzz-0.1.0.tar.gz:

Publisher: publish-pyfuzz.yaml on diohabara/pychd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pychd_pyfuzz-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pychd_pyfuzz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pychd_pyfuzz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 975a0a09b09980c0a08ea4d6d0907d1a3d3b4dd17e9d902541bc54a982cc4584
MD5 b0351cd89a3a04cdff51b5831cc2d44b
BLAKE2b-256 3dcb480fa3faa594a576a30eea2b4cdece8c0db0128099b9056f8daade394189

See more details on using hashes here.

Provenance

The following attestation bundles were made for pychd_pyfuzz-0.1.0-py3-none-any.whl:

Publisher: publish-pyfuzz.yaml on diohabara/pychd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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