etos自定义仪表板api的python 2和3接口

pyEthOS的Python项目详细描述


Build StatusLicenceCoverage StatusPyPI versionPyPI Lib FormatPyPI Python VersionPyPI Status

etos自定义仪表板api的python 2和3接口

这个库为etos定制提供了一个纯python接口 仪表板restapi。

维护人员

Github配置文件:Jonathan Dekhtiar电子邮件: contact@jonathandekhtiar.eu

安装

该库提供pip:

pip install pyEthOS

如果愿意,可以使用以下命令编译库:

## First clone the repository
git clone https://github.com/DEKHTIARJonathan/pyEthOS.git

## Then install the library
python setup.py install

文件

一。Ethos API文档

importpyEthOS.pyEthOSasethosif__name__=='__main__':PANEL_NAME="ethos1"DEBUG=False# Allow development debug infos to be printed on the consoleapi=ethos.EthOS_API(PANEL_NAME,debug=DEBUG)print(api.get_summary())'''
    {
        "success": "True",
        "timestamp": "2017-06-12 12:51:15",
        "payload": {
            "rigs": {
                "######": {
                    "condition": "######",
                    "version": "######",
                    "miner": "######",
                    "gpus": "######",
                    "miner_instance": "######",
                    "miner_hashes": "######",
                    "bioses": "######",
                    "meminfo": "######",
                    "vramsize": "######",
                    "drive_name": "######",
                    "mobo": "######",
                    "lan_chip": "R######",
                    "connected_displays": "",
                    "ram": "######",
                    "rack_loc": "######",
                    "ip": "######",
                    "driver": "######",
                    "server_time": 0,
                    "uptime": "######",
                    "miner_secs": 0,
                    "rx_kbps": "######",
                    "tx_kbps": "######",
                    "load": "######",
                    "cpu_temp": "######",
                    "freespace": 0,
                    "hash": 0,
                    "pool": "######",
                    "temp": "######",
                    "powertune": "######",
                    "fanrpm": "######",
                    "core": "######",
                    "mem": "######"
                }
            },
            "total_hash": 0,
            "alive_gpus": 0,
            "total_gpus": 0,
            "alive_rigs": 0,
            "total_rigs": 0,
            "current_version": "######",
            "avg_temp": 0,
            "capacity": "######",
            "per_info": {
                "claymore": {
                    "hash": 0,
                    "per_alive_gpus": 0,
                    "per_total_gpus": 0,
                    "per_alive_rigs": 0,
                    "per_total_rigs": 0,
                    "per_hash-gpu": "######",
                    "per_hash-rig": "######"
                }
            }
        }
    }
    '''print(api.get_rig_status())'''
    {
        "success": "True",
        "timestamp": "2017-06-12 12:51:15",
        "payload": {
            "######": "unreachable",
            "######": "mining",
            "######": "mining",
            "######": "unreachable",
        }
    }
    '''print(api.get_rig_ids())'''
    {
        "success": True,
        "rig_ids": [
            "######",
            "######",
            "######"
        ],
        "timestamp": "2017-06-12 12:54:15"
    }
    '''###################### Available routes:####################### ethos.ETHOS_API_GRAPH_DATA_ROUTES.RX_KBPS# ethos.ETHOS_API_GRAPH_DATA_ROUTES.TX_KBPS# ethos.ETHOS_API_GRAPH_DATA_ROUTES.SYSLOAD# ethos.ETHOS_API_GRAPH_DATA_ROUTES.CPU_LOAD# ethos.ETHOS_API_GRAPH_DATA_ROUTES.HASHRATE# ethos.ETHOS_API_GRAPH_DATA_ROUTES.GPU_CORECLOCK# ethos.ETHOS_API_GRAPH_DATA_ROUTES.GPU_MEMCLOCK# ethos.ETHOS_API_GRAPH_DATA_ROUTES.GPU_FANRPM# ethos.ETHOS_API_GRAPH_DATA_ROUTES.GPU_TEMP# ethos.ETHOS_API_GRAPH_DATA_ROUTES.GPU_HASHRATEprint(api.get_graph_data(ethos.ETHOS_API_GRAPH_DATA_ROUTES.SYSLOAD,"e057d6"))'''
    {
        "success": True,
        "payload": {
            "e057d6 sysload": [
                "1494859237000 0.30",
                "1494859529000 0.30",
                "1494859835000 0.27",
                "1494860134000 0.27",
                "1494860439000 0.28"
            ]
        },
        "timestamp": "2017-06-12 13:37:22"
    }
    '''

2.区块链API文档

importpyEthOS.pyEthOSasethosif__name__=='__main__':wallet_addr="eb090e55b3d0cb2544d5b4fb6f485845068bd932"# The API is able to handle address with the prefix "0x" or no prefix.DEBUG=False# Allow development debug infos to be printed on the consoleapi=ethos.Blockchain_ETH_API(wallet_addr,debug=DEBUG)print(api.get_account_balance())'''
    {
        "payload": {
            "balance": 0,
            "final_balance": 0,
            "total_sent": 0,
            "address": "260e285b113b8be32a5141c35d18257792c757db",
            "total_received": 0,
            "final_n_tx": 0,
            "n_tx": 0,
            "unconfirmed_balance": 0,
            "unconfirmed_n_tx": 0
        },
        "timestamp": "2017-06-12 15:51:15",
        "success": "True"
    }
    '''

三。ethermine池api文档

importpyEthOS.pyEthOSasethosif__name__=='__main__':wallet_addr="eb090e55b3d0cb2544d5b4fb6f485845068bd932"# The API is able to handle address with the prefix "0x" or no prefix.DEBUG=False# Allow development debug infos to be printed on the consoleapi=ethos.Ethermine_ETH_API(wallet_addr,debug=True)print(api.get_account_stats())'''
    {
        "payload": {
            "btcPerMin": 0,
            "reportedHashRate": "0H/s",
            "avgHashrate": 0,
            "hashRate": "0H/s",
            "rounds": [],
            "ethPerMin": 0,
            "payouts": [],
            "address": "260e285b113b8be32a5141c35d18257792c757db",
            "usdPerMin": 0,
            "workers": {},
            "unpaid": 0,
            "settings": {
                "monitor": 0,
                "vote": 0,
                "voteip": "",
                "name": "",
                "minPayout": 1,
                "email": "",
                "ip": ""
            }
        },
        "timestamp": "2017-06-12 15:44:56",
        "success": "True"
    }
    '''

免责声明

此python包不属于可用的etos发行版 在ethosdistro.com上。

作者明确否认对本产品的任何保证,包括 所有说明、文档和联机文档。这个 软件按“原样”提供,不作任何保证,包括 不受限制,对某一特定项目的适用性的任何默示保证 目的或结果。你方同意承担任何损害或 下载、安装和使用产生的结果,包括 许可证程序。在任何情况下,提交人(或其代理人和/或 合伙人)对任何附带或间接损害负责 或任何损失,包括但不限于数据损坏, 因使用或无法使用而产生的财产或利润 软件说。

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

推荐PyPI第三方库


热门话题
java log4j找不到log4jtest。房产?   我在java线程“awteventque1”中获得异常。lang.NullPointerException   java为什么在使用完整路径从文件系统读取文件时出错?   java如何迭代所有注册表项?   java中的安卓 Opencv SVM未正确训练   多线程Java ThreadPoolExecutor关闭特定线程?   如何使用Java NIO CreateDirectory方法设置目录所有者组?   java NatTable混合了固定宽度的列和可调整大小的填充剩余空间   java如何删除特定网络,即使该网络是由安卓上的其他设备创建的?   java Guava toJavaUtil()不存在   java对许多常量使用枚举是有效的memorywise?   java是否可以使用坐标定位JButton?   从WSDL生成java代码导致异常   java如何在安卓中导出javadoc   爬行JAX中的java NoClassDefFoundError错误   java为片段中的文本视图设置区域设置   发送最后一条消息后发生Java RMI RemoteException