bytecode
bytecode is a Python module to generate and modify bytecode.
bytecode project homepage at GitHub (code, bugs)
Download latest bytecode release at the Python Cheeseshop (PyPI)
Install bytecode: python3 -m pip install bytecode. It requires Python 3.8 or newer. The latest release that supports Python 3.7 and 3.6 is 0.13.0. The latest release that supports Python 3.5 is 0.12.0. For Python 2.7 support, have a look at dead-bytecode instead.
Example executing print('Hello World!'):
from bytecode import Instr, Bytecode
bytecode = Bytecode([Instr("LOAD_GLOBAL", (True, 'print')),
Instr("LOAD_CONST", 'Hello World!'),
Instr("CALL", 1),
Instr("POP_TOP"),
Instr("LOAD_CONST", None),
Instr("RETURN_VALUE")])
code = bytecode.to_code()
exec(code)
Metadata
Release files for bytecode 0.19.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bytecode-0.19.1.tar.gz | 106.8 kB | With provenance | Details for bytecode-0.19.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bytecode-0.19.1-py3-none-any.whl | Python 3 | none | any | Details for bytecode-0.19.1-py3-none-any.whl |
Total release size: 150.3 kB
Release files / bytecode-0.19.1.tar.gz
| Download URL | bytecode-0.19.1.tar.gz |
|---|---|
| Size | 106.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f59a6a51a980037f64196448504d12fb04937ae8dcb980943265e799af2943ae
|
|
BLAKE2b-256 checksum How to use checksums |
5ca0f4499eea31339ba709fad8ff778c6ad9afa2d87434b9771e0b37a1ab6fb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 7, 2026.
Transparency logRelease files / bytecode-0.19.1-py3-none-any.whl
| Download URL | bytecode-0.19.1-py3-none-any.whl |
|---|---|
| Size | 43.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
211a5091abd6f16f5bb3d34f1b88fc77f8f8539801a02384b51a97bdcee45f0f
|
|
BLAKE2b-256 checksum How to use checksums |
b5d27b937ec5bcc2fabca017e32541a0b1ef081bb5a1bb3531d382300f7a1ccc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 7, 2026.
Transparency logSecurity for bytecode 0.19.1
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.
Attestation for bytecode-0.19.1.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 Oct 7, 2026.
Transparency logA 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.