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

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: testing.parity-1.0.6.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for testing.parity-1.0.6.tar.gz
Algorithm Hash digest
SHA256 3c4aa0dbfa8484bdf67d64e04bfb122e5fc6cebc950a22ff6b3fa3b2468db995
MD5 659d37f53ccf000e17e41b17ea950048
BLAKE2b-256 64329ca044880b529a09f056d41a8e1dc14af02f94c491815a013f6c2c345e77

See more details on using hashes here.

File details

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

File metadata

  • Download URL: testing.parity-1.0.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for testing.parity-1.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0fac67b84fce1674b5d722395f3a0fc81649251a9491a3701376de9e1304d498
MD5 44659c279b5f07982ab87626deae76df
BLAKE2b-256 30e724418e1718ef11e702bee51a896e0937392c79520d92a89d8cb8ebc7dd94

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