Skip to main content

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.

https://travis-ci.org/tristan/testing.parity.svg?branch=master https://coveralls.io/repos/tristan/testing.parity/badge.png?branch=master https://codeclimate.com/github/tristan/testing.parity/badges/gpa.svg
Documentation

https://github.com/tristan/testing.parity

Issues

https://github.com/tristan/testing.parity/issues

Download

https://pypi.python.org/pypi/testing.parity

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.2.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

testing.parity-1.0.2-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file testing.parity-1.0.2.tar.gz.

File metadata

  • Download URL: testing.parity-1.0.2.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for testing.parity-1.0.2.tar.gz
Algorithm Hash digest
SHA256 daa3a8e50c5a9b0dcf473e899d07e89fc368d0b79c0be20b6601f9a1b03db870
MD5 67bc1c2878da88d7ea175fd4b11ead54
BLAKE2b-256 35e045e2f330ee1bf3091fcb2bb142e7cf18237df219da500d33c72f00ed46b4

See more details on using hashes here.

File details

Details for the file testing.parity-1.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: testing.parity-1.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for testing.parity-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 912232e66470c3b542b819321ce7d7e83a4e23ba34516f669864b1a63de84884
MD5 e84eda2222cbaad07926b6b53ddf8c59
BLAKE2b-256 8f49635afe842ec263434b757e0955e3c16f2fd4d6b654733a2aae0d65fd75a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page