Ethereum for Python Developers
آخر تعديل: @wackerow(opens in a new tab), ٧ مايو ٢٠٢٤
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(opens in a new tab)
- Understanding Smart Contracts(opens in a new tab)
- Write your First Smart Contract(opens in a new tab)
- Learn How to Compile and Deploy Solidity(opens in a new tab)
Beginner articles
- A (Python) Developer's Guide to Ethereum(opens in a new tab)
- The state of Python in blockchain 2023 report(opens in a new tab)
- An Introduction to Smart Contracts with Vyper(opens in a new tab)
- Deploy your own ERC20 Token with Python and Brownie(opens in a new tab)
- How to develop Ethereum contract using Python Flask?(opens in a new tab)
- Intro to Web3.py · Ethereum For Python Developers(opens in a new tab)
- How to call a Smart Contract function using Python and web3.py(opens in a new tab)
Intermediate articles
- Dapp Development for Python Programmers(opens in a new tab)
- Creating a Python Ethereum Interface: Part 1(opens in a new tab)
- Ethereum Smart Contracts in Python: a comprehensive(ish) guide(opens in a new tab)
- Using Brownie and Python to deploy Smart Contracts(opens in a new tab)
- Creating NFTs on OpenSea with Brownie(opens in a new tab)
Advanced use patterns
- Compiling, deploying and calling Ethereum smartcontract using Python(opens in a new tab)
- Analyze Solidity Smart Contracts with Slither(opens in a new tab)
- Blockchain Fintech Tutorial: Lending and Borrowing With Python(opens in a new tab)
Python projects and tools
Active:
- Web3.py(opens in a new tab) - Python library for interacting with Ethereum
- Vyper(opens in a new tab) - Pythonic Smart Contract Language for the EVM
- Ape(opens in a new tab) - The smart contract development tool for Pythonistas, Data Scientists, and Security Professionals
- py-evm(opens in a new tab) - implementation of the Ethereum Virtual Machine
- eth-tester(opens in a new tab) - tools for testing Ethereum-based applications
- eth-utils(opens in a new tab) - utility functions for working with Ethereum related codebases
- py-solc-x(opens in a new tab) - Python wrapper around the solc solidity compiler with 0.5.x support
- pymaker(opens in a new tab) - Python API for Maker contracts
- siwe(opens in a new tab) - Sign in with Ethereum (siwe) for Python
- Web3 DeFi for Ethereum integrations(opens in a new tab) - A Python package with ready integrations for ERC-20, Uniswap and other popular projects
- Wake(opens in a new tab) - All-in-one Python framework for contracts testing, fuzzing, deployment, vulnerability scanning and code navigation (language server - Tools for Solidity(opens in a new tab))
Archived / No longer maintained:
- Trinity(opens in a new tab) - Ethereum Python client
- Mamba(opens in a new tab) - framework to write, compile, and deploy smart contracts written in Vyper language
- Brownie(opens in a new tab) - Python framework for deploying, testing and interacting with Ethereum smart contracts
- pydevp2p(opens in a new tab) - implementation of the Ethereum P2P stack
- py-wasm(opens in a new tab) - 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(opens in a new tab) and Yearn Vault Contracts repository(opens in a new tab)
- Curve(opens in a new tab) and Curve smart contracts repository(opens in a new tab)
- BadgerDAO(opens in a new tab) and smart contracts using Brownie toolchain(opens in a new tab)
- Sushi(opens in a new tab) uses Python in managing and deploying their vesting contracts(opens in a new tab)
- Alpha Finance(opens in a new tab), of Alpha Homora fame, uses Brownie to test and deploy smart contracts(opens in a new tab)
Python Community discussion
- Ethereum Python Community Discord(opens in a new tab) for Web3.py and other Python framework discussion
- Vyper Discord(opens in a new tab) for Vyper smart contract programming discussion
Other aggregated lists
The Vyper wiki has an incredible list of resources for Vyper(opens in a new tab)