automatically setups a parity-ethereum instance, and destroys it after testing
Project description
About
testing.parity automatically setups a parity instance, and destroys it after testing.
Install
Use pip:
$ pip install testing.parity
And testing.parity requires parity server in your PATH.
Usage
Create Parity instance using testing.parity.ParityServer:
import testing.parity import json import urllib.request # Lanuch new Parity-Ethereum server with testing.parity.ParityServer() as parity: # test that jsonrpc responds result = urllib.request.urlopen( urllib.request.Request( parity.url(), headers={'Content-Type': "application/json"}, data=json.dumps({ "jsonrpc": "2.0", "id": "1234", "method": "eth_blockNumber", "params": [] }).encode('utf-8') )) print(json.load(result)) # Parity server is terminated here
Requirements
Python 2.7, 3.4, 3.5, 3.6
License
Apache License 2.0
History
1.0.1 (2018-08-03)
First release
1.0.2 (2018-08-06)
Added --min-gas-price option
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
testing.parity-1.0.2.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for testing.parity-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 912232e66470c3b542b819321ce7d7e83a4e23ba34516f669864b1a63de84884 |
|
MD5 | e84eda2222cbaad07926b6b53ddf8c59 |
|
BLAKE2b-256 | 8f49635afe842ec263434b757e0955e3c16f2fd4d6b654733a2aae0d65fd75a3 |