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.5.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for testing.parity-1.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37910571bbbccede24ab80004ef4df260f8ac371cb57b765fc69390ee6449e1e |
|
MD5 | 0046bcb65854577f8ef73c6e0dff00a2 |
|
BLAKE2b-256 | e091b62ec4dcedba61607fa6062c09d0b5f5a71ddf6e81949a333549e868ef30 |