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
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.1.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for testing.parity-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a27fd4594f1b13a52c695b37ad2d7f42bd95a68c385c87cbdb8a121360855911 |
|
MD5 | 07958fae3ca5623cd4ea827e62d0ceb1 |
|
BLAKE2b-256 | 298850cfc43c70d37ed70cdf9a657c7b7d099db8bc97e031b96c508ed3c50909 |