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.6.tar.gz
(6.8 kB
view hashes)
Built Distribution
Close
Hashes for testing.parity-1.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fac67b84fce1674b5d722395f3a0fc81649251a9491a3701376de9e1304d498 |
|
MD5 | 44659c279b5f07982ab87626deae76df |
|
BLAKE2b-256 | 30e724418e1718ef11e702bee51a896e0937392c79520d92a89d8cb8ebc7dd94 |