Python module to generate and modify bytecode
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bytecode-0.17.0.tar.gz.
File metadata
- Download URL: bytecode-0.17.0.tar.gz
- Upload date:
- Size: 105.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c37efa5bd158b1b873f530cceea2c645611d55bd2dc2a4758b09f185749b6fd
|
|
| MD5 |
73c43999ab078543c8880ea741578bbf
|
|
| BLAKE2b-256 |
98c44818b392104bd426171fc2ce9c79c8edb4019ba6505747626d0f7107766c
|
Provenance
The following attestation bundles were made for bytecode-0.17.0.tar.gz:
Publisher:
release.yml on MatthieuDartiailh/bytecode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bytecode-0.17.0.tar.gz -
Subject digest:
0c37efa5bd158b1b873f530cceea2c645611d55bd2dc2a4758b09f185749b6fd - Sigstore transparency entry: 466290108
- Sigstore integration time:
-
Permalink:
MatthieuDartiailh/bytecode@0b800c1338aa258d4189cdf07ff4aba795d9d298 -
Branch / Tag:
refs/tags/0.17.0 - Owner: https://github.com/MatthieuDartiailh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b800c1338aa258d4189cdf07ff4aba795d9d298 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bytecode-0.17.0-py3-none-any.whl.
File metadata
- Download URL: bytecode-0.17.0-py3-none-any.whl
- Upload date:
- Size: 43.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64fb10cde1db7ef5cc39bd414ecebd54ba3b40e1c4cf8121ca5e72f170916ff8
|
|
| MD5 |
127f7e0ad6b251111bd6106bfcaa4000
|
|
| BLAKE2b-256 |
ce80379e685099841f8501a19fb58b496512ef432331fed38276c3938ab09d8e
|
Provenance
The following attestation bundles were made for bytecode-0.17.0-py3-none-any.whl:
Publisher:
release.yml on MatthieuDartiailh/bytecode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bytecode-0.17.0-py3-none-any.whl -
Subject digest:
64fb10cde1db7ef5cc39bd414ecebd54ba3b40e1c4cf8121ca5e72f170916ff8 - Sigstore transparency entry: 466290126
- Sigstore integration time:
-
Permalink:
MatthieuDartiailh/bytecode@0b800c1338aa258d4189cdf07ff4aba795d9d298 -
Branch / Tag:
refs/tags/0.17.0 - Owner: https://github.com/MatthieuDartiailh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b800c1338aa258d4189cdf07ff4aba795d9d298 -
Trigger Event:
push
-
Statement type: