testing.parity
automatically setups a parity instance, and destroys it after testing.
- Documentation
- https://github.com/tristan/testing.parity
- Issues
- https://github.com/tristan/testing.parity/issues
- Download
- https://pypi.python.org/pypi/testing.parity
Use pip:
$ pip install testing.parity
And testing.parity
requires parity
server in your PATH.
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
- Python 2.7, 3.4, 3.5, 3.6
Apache License 2.0
- First release
- Added
--min-gas-price
option
- Support Parity-Ethereum in version string
- Support Parity versions >= 2.2.0
- Update chainspec to support Constantinople EIPs
- Allow enabling of websocket interface
- Fix instantSeal engine for Parity versions >= 2.5.8