Skip to main content

No project description provided

Project description

cdis logo

cdis - a consistent Python disassembler

Important

The cdis bytecode format will not be considered stable until the 1.0.0 release. The 0.x.y releases may have breaking changes in both the bytecode and the API exposed.

What is it?

cdis, pronounced "see this", is a Python disassembler that produce consistent results across Python versions. CPython bytecode is neither forward or backwards compatible, so it outputs bytecode for the "cdis Virtual Machine", which when executed, has the exact same behaviour as CPython's bytecode.

Why would I use it?

  • To write a Python compiler to any language of your choice
  • To determine what symbols a function uses
  • As a compiler target to generate Python code from another language

Known differences with CPython

Missing features

  • Using non-constant except types. (Planned)
  • Async for (Planned)
  • Async with (Planned)
  • Generator comprehensions (list, dict and set comprehensions are supported) (Planned)
  • Defining classes within functions (Planned)
  • User customizable optimization passes (Planned)
  • User customizable VM tracer (Planned)
  • A guide on how to actually use cdis (Planned).

Run tests

Install test dependencies

pip install "pytest>8" "coverage" "tox"
pip install -e .

Run tests on current python version

pytest

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

cdis-0.0.0a0.tar.gz (55.5 kB view details)

Uploaded Source

Built Distribution

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

cdis-0.0.0a0-py3-none-any.whl (40.9 kB view details)

Uploaded Python 3

File details

Details for the file cdis-0.0.0a0.tar.gz.

File metadata

  • Download URL: cdis-0.0.0a0.tar.gz
  • Upload date:
  • Size: 55.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cdis-0.0.0a0.tar.gz
Algorithm Hash digest
SHA256 7036697ffee239e120988cc34fb62cc3e690177614b135a21e1e2ab9614a8ec4
MD5 720d6e256a72a73d088927ca1720c2e9
BLAKE2b-256 a7631cbbdd1c0e9416a5408db8f811b9b2bc522fcf19f8240675694d59641c16

See more details on using hashes here.

Provenance

The following attestation bundles were made for cdis-0.0.0a0.tar.gz:

Publisher: release.yml on cdis-vm/cdis

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

File details

Details for the file cdis-0.0.0a0-py3-none-any.whl.

File metadata

  • Download URL: cdis-0.0.0a0-py3-none-any.whl
  • Upload date:
  • Size: 40.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cdis-0.0.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cc5c3409b10706de6a5d8d92bdf321b8c71521f4199db8053ec31131fc44384
MD5 cd243792ae230224b538c44a3d7c0d7d
BLAKE2b-256 657a01873fef2d633824f60a8210b43fe8a228899accd93fd87a0d422463bd65

See more details on using hashes here.

Provenance

The following attestation bundles were made for cdis-0.0.0a0-py3-none-any.whl:

Publisher: release.yml on cdis-vm/cdis

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