Ethereum RPC client library for Python asyncio (PEP 3156)
Project description
aioethereum
Ethereum RPC client library for the PEP 3156 Python event loop.
Features
ujson support |
Yes |
High-level APIs |
Yes |
HTTP support |
Yes |
Unix domain socket (IPC) support |
Yes |
SSL/TLS support |
Yes |
Tested CPython versions |
3.4, 3.5, 3.6 |
Tested Geth versions |
1.7.0 |
Implemented RPC apis |
db, eth, miner, net, personal, shh, txpool, web3 |
Documentation
Usage examples
Simple high-level interface (through HTTP):
import asyncio
import aioethereum
loop = asyncio.get_event_loop()
async def go():
client = await aioethereum.create_ethereum_client(
'http://localhost:8545', loop=loop)
val = await client.web3_clientVersion()
print(val)
loop.run_until_complete(go())
# will print like 'Geth/v1.7.0-stable-6c6c7b2a/darwin-amd64/go1.9'
or via IPC
import asyncio
import aioethereum
loop = asyncio.get_event_loop()
async def go():
client = await aioethereum.create_ethereum_client(
'ipc://<path_to_unix_socket>', loop=loop)
val = await client.web3_clientVersion()
print(val)
loop.run_until_complete(go())
# will print like 'Geth/v1.7.0-stable-6c6c7b2a/darwin-amd64/go1.9'
Requirements
License
The aioethereum is offered under MIT license.
TODO
Add tests for all management RPC apis
Add admin and debug apis
Changes
0.1.0 (2017-09-30)
NEW:
Add HTTP(s) and IPC clients for ethereum nodes;
Implement RPC apis - db, eth, miner, net, personal, shh, txpool, web3;
Add ujson encoder/decoder;
Project details
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
Hashes for aioethereum-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea2e802a5561c37c6f8aac950a5a1b95b9e3f872d6f80e6b2a9e601c4e250269 |
|
MD5 | 67b3843665dddffe88fcbf3e6f35c57d |
|
BLAKE2b-256 | 928dad7d8db4a5a473b612cea3aca8cf2d0a3b4b1b36bef4ac335f52a2358191 |