Key technologies related to Python ethereum development

Source: Internet
Author: User

Using Python to develop ethereum, there is a lot of technical knowledge to learn, there are many resources to recommend, we look at several major:

web3.py

https://github.com/ethereum/web3.py

Https://pypi.python.org/pypi/web3

The web3.py code base is now quite complete. The entire code base has been thoroughly instrumented, with the basic implementation of the 100% functionality that the user is familiar with in the JavaScript web3.js library.

This library supports Python 2.7, 3.4, and 3.5.

One of my favorite parts is testrpcprovider. It provides the ETH-TESTRPC service automatically for you so that you can test the web3.py code like it is in EVM memory. This provides a quick test method to ensure that any code you write works correctly when interacting directly with the JSON-RPC server supported by Geth.

Py-geth and Py-solc

Https://github.com/ethereum/py-geth

Https://pypi.python.org/pypi/py-geth

Https://github.com/ethereum/py-solc

Https://pypi.python.org/pypi/py-solc

Both libraries provide a Python package that surrounds the underlying executable file.

PY-SOLC provides advanced compile_files and compile_sources functions in order to enable you to compile solidity source programs in Python code. It also provides a link_code function to handle library links. If you want to do something lower, you can also drill down into the code to find any interface that accesses the underlying SOLC API, which you need to access through the Solc.wrapper.solc_wrappe function.

Similarly, Py-geth provides advanced tools for running Go-ethereum geth clients from Python code. It provides pre-configured classes Livegethprocess and testnetgethprocess to run the master or test network, as well as the local private chain devgethprocess for running tests.

All of the following classes have more friendly APIs.

Gethprocess.accounts: Returns the account address list

Gethprocess.data_dir: Returns the path to the underlying data directory of the Geth process.

Gethprocess.rpc_enabled/rpc_port/rpc_host: Information about the JSON-RPC interface.

Gethprocess.is_rpc_ready: Returns whether the JSON-RPC server is up and listening.

Gethprocess.wait_for_rpc (timeout=0): Wait for the JSON-RPC server to come online.

GETHPROCESS.IPC_*/IS_IPC_READY/WAIT_FOR_IPC (timeout=0): The same functionality as the corresponding RPC methods and properties.

The Py-geth library also provides a number of hybrid classes that can be used to write all geth outputs to stdout/stderr or write them to the logger through the Geth.mixins module. Examples available in the project description file.

Both of these support Python 2.7, 3.4, and 3.5.

Ethereum test-related TESTRPC and test client

https://github.com/pipermerriam/eth-testrpc/

Https://pypi.python.org/pypi/eth-testrpc

Https://github.com/pipermerriam/ethereum-tester-client

Https://pypi.python.org/pypi/ethereum-tester-client

Both libraries are abstractions above the Ethereum.tester EVM of the Pyethereum repository.

If you want to interact directly with test EVM through Python code, I recommend using the Thereum-tester-client library. It implements the vast majority of APIs that allow us to use the various interfaces of Geth.

If you need to test RPC interaction, then I recommend using ETH-TESTRPC, which implements the vast majority of json-rpc logical interfaces exposed by Geth. Under the Ethereum engine it is a layer on the top of the Ethereum-tester-client library.

Both libraries support Python 2.7, 3.4, and 3.5.

Populus

Https://github.com/ethereum/populus

http://populus.readthedocs.org/

Populus is an Ethereum smart Contract development framework that can do almost anything related to ethereum blockchain development.

A large number of Populus code libraries can be better used as stand-alone Python packages. Py-solc and Py-geth libraries have removed a lot of complex sub-process logic. Based on web3.py development, you can reduce a lot of effort from the codebase, while making ethereum blockchain interactions more robust and reliable.

If your goal is to provide a framework for automating http://www.gyslssty.com/xszzxm/xstfzz/434.html complex deployments and setting up a complete packaging and publishing system, Populus is a good choice.

Populus dependency Relationship:

Solidity compiler: Smart contracts are written in the solidity language and then compiled into the bytecode of the Ethereum virtual machine (EVM).

Geth: The Go language implementation of the Ethereum protocol. The Geth client runs on the blockchain node, allowing us to interact with the blockchain and to run and deploy it to the test chain during the development process.

In addition, Populus requires some system dependencies to install the Pyethereum library.

Populus supports Python 2.7, 3.4, and 3.5.

Python ethereum, mainly for Python engineers using web3.py for blockchain development.

WEB3J tutorial, mainly for Java and Android programmers for the blockchain development of WEB3J detailed.

Ethereum tutorial, mainly introduces intelligent http://www.chinamaofa.com and DAPP application development, suitable for getting started.

Ethereum development, mainly introduces the use of node. js, MongoDB, Blockchain, IPFs to achieve a central e-commerce Dapp actual combat, suitable for advanced.

PHP Ethereum, mainly introduces the use of PHP for intelligent Contract Development interaction, account creation, transaction, transfer, coin development and filters and events and other content.

Key technologies related to Python ethereum development

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.