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.3.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.3-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: testing.parity-1.0.3.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/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for testing.parity-1.0.3.tar.gz
Algorithm Hash digest
SHA256 483000d6d7ac00b44ca16c2bb125e43180bf9c3cb522cb53a36d62067b8104de
MD5 9420ad0b5ffd95d93f565048f41b3bef
BLAKE2b-256 3ae23737f089942cb2fed49f78ed2a76026c6c269fb49a40f6da860cce20fa36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: testing.parity-1.0.3-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/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for testing.parity-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 65a10b30f84696fde70f20f0568f9a8b29fdcaff5efec837342a8fc3be1073de
MD5 4a6f3ca56b972a758ef437293f60d1bb
BLAKE2b-256 ca9703eeca4df87d4c2e4b03f46be65e1fb1463695cc7682b8a9d22718288a3d

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