Registry / database / vyper
library0.4.3pypypi✓ verified 86d ago

Vyper is a Pythonic programming language for the Ethereum Virtual Machine (EVM), designed with security, auditability, and simplicity in mind. It provides a more constrained set of features compared to other EVM languages, aiming to reduce complexity and potential vulnerabilities. The current version is 0.4.3, with minor releases and release candidates occurring frequently, typically leading to stable minor versions every few months.

pip install vyper
INSTALL
IMPORT
SIG · VYPER
V
vyper
databasepythonv0.4.3
Install
2.8s avg
Import
420ms
Disk
31MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.432s · 32.2MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.8s · import 0.408s · 34MB
31MB installed
● package 31MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

compile_code
from vyper import compile_code
import vyper.compiler
The primary programmatic compilation function `compile_code` is directly available from the top-level package.

This quickstart demonstrates how to programmatically compile a basic Vyper smart contract using the `compile_code` function. It specifies the desired output formats (bytecode and ABI) and an EVM version for compilation, then prints the resulting artifacts.

from vyper import compile_code contract_code = ''' # @version ^0.4.0 # A simple Vyper contract @external def hello() -> String[100]: return "Hello, Vyper!" ''' # Compile the contract to get bytecode, ABI, and other artifacts compiled_artifacts = compile_code( contract_code, output_formats=['bytecode', 'abi'], evm_version='shanghai' # Specify EVM version for compatibility ) print("Bytecode:", compiled_artifacts['bytecode']) print("ABI:", compiled_artifacts['abi'])
vyper --version
Debug
Known issues
breakingVyper adheres to a `0.x.x` versioning scheme, meaning breaking changes can occur in minor releases. Always review release notes when upgrading between `0.X.x` versions (e.g., from 0.3.x to 0.4.x).
fix
Consult the official Vyper release notes (docs.vyperlang.org/en/latest/release-notes.html) for specific upgrade instructions and breaking changes.
affects: <1.0.0
breakingThe default EVM version targeted by the compiler can change in minor releases (e.g., to 'prague' in v0.4.3). This might affect bytecode generation and compatibility with specific chain deployments if not explicitly handled.
fix
Always explicitly specify the target EVM version using the `evm_version` parameter in `compile_code` or the `--evm-version` CLI flag to ensure consistent bytecode across environments.
affects: All versions
gotchaVyper requires Python 3.10 or higher, but strictly less than Python 4.0. Running with an unsupported Python version will lead to installation or runtime errors.
fix
Ensure your environment uses a compatible Python version (e.g., `python3.10` or `python3.11`). Use `pyenv` or `conda` for managing Python versions if necessary.
affects: All versions
breakingRecent releases (e.g., v0.4.1) have included security-related fixes for low-to-moderate severity vulnerabilities. Older versions may contain known security flaws.
fix
Always use the latest stable version of Vyper to benefit from critical security patches. Regularly check the official Vyper GitHub for security advisories.
affects: <0.4.1
gotchaExperimental compiler features, such as the `--venom` or `--experimental-codegen` flags (aliases), are subject to rapid change, may contain bugs, or produce unoptimized/unexpected bytecode. They are not recommended for production deployments.
fix
Avoid using experimental features in production. If used for development, be aware of potential instabilities and thoroughly test generated bytecode.
affects: All versions with experimental features
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'vyper'
The Vyper library has not been installed in the current Python environment.
fix
Run `pip install vyper` to install the library.
SyntaxException: line X:X 'some_invalid_keyword' is not allowed
There is a syntax error or an attempt to use a non-existent keyword or feature in your Vyper contract code.
fix
Review the Vyper contract code against the official Vyper documentation for the specific version you are using. Vyper has a minimalist design, so many Solidity features are not present.
ValueError: Vyper does not support python version 3.9.x (or similar for other unsupported versions)
You are attempting to run Vyper with an unsupported Python version. Vyper typically requires Python 3.10+ but less than 4.
fix
Switch your Python environment to a compatible version (e.g., 3.10, 3.11, 3.12). You can use `pyenv install 3.12.0 && pyenv local 3.12.0` or create a new virtual environment with the correct Python version.
KeyError: 'bytecode' (or 'abi') when accessing compiled_artifacts
The specified `output_formats` in `compile_code` did not include the key you are trying to access, or compilation failed silently without producing all artifacts.
fix
Ensure that the `output_formats` list explicitly includes all the keys you intend to access (e.g., `['bytecode', 'abi', 'ast_dict']`). Check for compilation errors if outputs are still missing.
Upgrade
Version history
0.4.3latest on PyPI · released Jun 18, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
17
Meta
1
OpenAI (training)
1
Resources
vyper — pip install vyper · libregistry