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

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: testing.parity-1.0.4.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for testing.parity-1.0.4.tar.gz
Algorithm Hash digest
SHA256 c658bde9a094e18a6068912f52c79fa0857699c689b1a5366c5281e4d87f0490
MD5 64e5a0f1b64282bd7ff0a4de8a2ed3f2
BLAKE2b-256 4d3b7112c45af4a1905ac9446fc1492b8841c05c0c88e4149cfef43950e71ebf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: testing.parity-1.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for testing.parity-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2131b89103c409db2d5bddf24faa2ee949d363b41c9012a109a85ca437b2f805
MD5 7914c94065d068291d4b6ba0241a1759
BLAKE2b-256 1478c6ba33f4e53036e5e81cb4d47de286f590645b690552bbbb7284bf250dbf

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