Giter Club home page Giter Club logo

testing.parity's Introduction

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
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

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

testing.parity's People

Contributors

tristan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.