Skip to main content

Ethereum RPC client library for Python asyncio (PEP 3156)

Project description

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 for Geth node

1.7.0

Implemented RPC apis

db, eth, miner, net, personal, shh, txpool, web3

Documentation

TODO

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

  • Add sphinx docs

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

aioethereum-0.1.0.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

aioethereum-0.1.0-py3-none-any.whl (14.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page