Ethereum for Python Developers
Use Ethereum to create decentralized applications (or "dapps") that utilize the benefits of cryptocurrency and blockchain technology. These dapps can be trustworthy, meaning that once they are deployed to Ethereum, they will always run as programmed. They can control digital assets in order to create new kinds of financial applications. They can be decentralized, meaning that no single entity or person controls them and are nearly impossible to censor.
Getting started with smart contracts and the Solidity language
Take your first steps to integrating Python with Ethereum
Need a more basic primer first? Check out ethereum.org/learn or ethereum.org/developers.
- Blockchain Explained
- Understanding Smart Contracts
- Write your First Smart Contract
- Learn How to Compile and Deploy Solidity
Beginner articles
- A (Python) Developer's Guide to Ethereum
- The state of Python in blockchain 2023 report
- An Introduction to Smart Contracts with Vyper
- Deploy your own ERC20 Token with Python and Brownie
- How to develop Ethereum contract using Python Flask?
- Intro to Web3.py · Ethereum For Python Developers
- How to call a Smart Contract function using Python and web3.py
Intermediate articles
- Dapp Development for Python Programmers
- Creating a Python Ethereum Interface: Part 1
- Ethereum Smart Contracts in Python: a comprehensive(ish) guide
- Using Brownie and Python to deploy Smart Contracts
- Creating NFTs on OpenSea with Brownie
Advanced use patterns
- Compiling, deploying and calling Ethereum smartcontract using Python
- Analyze Solidity Smart Contracts with Slither
- Blockchain Fintech Tutorial: Lending and Borrowing With Python
Python projects and tools
Active:
- Web3.py - Python library for interacting with Ethereum
- Vyper - Pythonic Smart Contract Language for the EVM
- Ape - The smart contract development tool for Pythonistas, Data Scientists, and Security Professionals
- py-evm - implementation of the Ethereum Virtual Machine
- eth-tester - tools for testing Ethereum-based applications
- eth-utils - utility functions for working with Ethereum related codebases
- py-solc-x - Python wrapper around the solc solidity compiler with 0.5.x support
- pymaker - Python API for Maker contracts
- siwe - Sign in with Ethereum (siwe) for Python
- Web3 DeFi for Ethereum integrations - A Python package with ready integrations for ERC-20, Uniswap and other popular projects
- Wake - All-in-one Python framework for contracts testing, fuzzing, deployment, vulnerability scanning and code navigation (language server - Tools for Solidity)
Archived / No longer maintained:
- Trinity - Ethereum Python client
- Mamba - framework to write, compile, and deploy smart contracts written in Vyper language
- Brownie - Python framework for deploying, testing and interacting with Ethereum smart contracts
- pydevp2p - implementation of the Ethereum P2P stack
- py-wasm - Python implementation of the web assembly interpreter
Looking for more resources? Check out ethereum.org/developers.
Projects using Python tooling
The following Ethereum-based projects use tools mentioned on this page. The related open-source repositories serve as a good reference for example code and best practices.
- Yearn Finance and Yearn Vault Contracts repository
- Curve and Curve smart contracts repository
- BadgerDAO and smart contracts using Brownie toolchain
- Sushi uses Python in managing and deploying their vesting contracts
- Alpha Finance, of Alpha Homora fame, uses Brownie to test and deploy smart contracts
Python Community discussion
- Ethereum Python Community Discord for Web3.py and other Python framework discussion
- Vyper Discord for Vyper smart contract programming discussion
Other aggregated lists
The Vyper wiki has an incredible list of resources for Vyper