自动设置奇偶校验以太坊实例,并在测试后将其销毁

testing.parit的Python项目详细描述


关于

testing.parity自动设置奇偶校验实例,并在测试后将其销毁。

https://travis-ci.org/tristan/testing.parity.svg?branch=masterhttps://coveralls.io/repos/tristan/testing.parity/badge.png?branch=masterhttps://codeclimate.com/github/tristan/testing.parity/badges/gpa.svg
文档
https://github.com/tristan/testing.parity
问题
https://github.com/tristan/testing.parity/issues
下载
https://pypi.python.org/pypi/testing.parity

安装

使用pip:

$ pip install testing.parity

并且testing.parity需要路径中的parity服务器。

用法

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

要求

  • Python2.7、3.4、3.5、3.6

许可证

apache许可证2.0

历史记录

1.0.1(2018-08-03)

  • 首次发布

1.0.2(2018-08-06)

  • 添加了--min-gas-price选项

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
为@Nonnull注释参数编写java单元测试   对于JAVA,如何从它自己的类调用插入排序来将数组分类到一个单独的类中?   Java中嵌套SQL查询的字符串解析   java在所有带有特定注释的方法上调用带注释的方面   在Java中将base64转换为PDF   无法在Android上强制转换java getApplicationContext()   雅加达ee Java ee:如何获取我的应用程序的URL?   IntelliJ:如何导入的文件夹。java文件作为库?   多线程Java(FX)在播放一种声音的同时,播放另一种声音   网络爬虫我需要将proto3版本中protobuf生成的java代码添加到nutch 1.7中   使用JAXRS注释资源的java Restlet客户端   java如何查找给定月份的日期范围   java Minecraft Bukkit插件:我的小游戏传送机不工作   Java Excel搜索和数组列表工作不正常