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
1.0.3 (2018-09-24)
Support Parity-Ethereum in version string
1.0.4 (2019-01-18)
Support Parity versions >= 2.2.0
1.0.5 (2019-07-17)
Update chainspec to support Constantinople EIPs
1.0.6 (2019-08-07)
Allow enabling of websocket interface
1.0.7 (2019-10-19)
Fix instantSeal engine for Parity versions >= 2.5.8
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file testing.parity-1.0.7.tar.gz.
File metadata
- Download URL: testing.parity-1.0.7.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0d8900b436d01f1bf20e5bf37900b83cf90e6b70dd0d0329e15682a89bfcbf7
|
|
| MD5 |
92c6d268953f7bff82f06e90c6632af1
|
|
| BLAKE2b-256 |
cd55d9b4a5582efd269448699ea2b94a7779d8a7a1d0f270d1a24e8fc866542e
|
File details
Details for the file testing.parity-1.0.7-py2.py3-none-any.whl.
File metadata
- Download URL: testing.parity-1.0.7-py2.py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49407dabb4a0efccbf75c6687b3949fe5c55ba350582d0521cae968f7307e3d3
|
|
| MD5 |
0252edd5ee3df5c5ef20c2b43ac0e43d
|
|
| BLAKE2b-256 |
688defbe3fcadc922c87407abaa00357567fbce90fd9aa4898b266701e0a18cd
|