{ "info": { "author": "Bryce Weiner", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Operating System :: OS Independent" ], "description": "=================\npython-taorpc\n=================\n\nAuthServiceProxy is an improved version of python-jsonrpc.\n\nIt includes the following generic improvements:\n\n* HTTP connections persist for the life of the AuthServiceProxy object\n* sends protocol 'version', per JSON-RPC 1.1\n* sends proper, incrementing 'id'\n* uses standard Python json lib\n* can optionally log all RPC calls and results\n* JSON-2.0 batch support\n\nIt also includes the following bitcoin-specific details:\n\n* sends Basic HTTP authentication headers\n* parses all JSON numbers that look like floats as Decimal,\n and serializes Decimal values to JSON-RPC connections.\n\nInstallation\n============\n\n1. change the first line of setup.py to point to the directory of your installation of python 2.*\n2. run setup.py\n\nNote: This will only install taorpc. If you also want to install jsonrpc to preserve \nbackwards compatibility, you have to replace 'taorpc' with 'jsonrpc' in setup.py and run it again.\n\nOr simply install the library using pip::\n\n pip install python-taorpc\n\nExample\n=======\n.. code:: python\n\n from taorpc.authproxy import AuthServiceProxy, JSONRPCException\n\n # rpc_user and rpc_password are set in the bitcoin.conf file\n rpc_connection = AuthServiceProxy(\"http://%s:%s@127.0.0.1:8332\"%(rpc_user, rpc_password))\n best_block_hash = rpc_connection.getbestblockhash()\n print(rpc_connection.getblock(best_block_hash))\n\n # batch support : print timestamps of blocks 0 to 99 in 2 RPC round-trips:\n commands = [ [ \"getblockhash\", height] for height in range(100) ]\n block_hashes = rpc_connection.batch_(commands)\n blocks = rpc_connection.batch_([ [ \"getblock\", h ] for h in block_hashes ])\n block_times = [ block[\"time\"] for block in blocks ]\n print(block_times)\n\nLogging all RPC calls to stderr\n===============================\n.. code:: python\n\n from taorpc.authproxy import AuthServiceProxy, JSONRPCException\n import logging\n\n logging.basicConfig()\n logging.getLogger(\"TaoRPC\").setLevel(logging.DEBUG)\n\n rpc_connection = AuthServiceProxy(\"http://%s:%s@127.0.0.1:8332\"%(rpc_user, rpc_password))\n print(rpc_connection.getinfo())\n\nProduces output on stderr like\n\n DEBUG:TaoRPC:-1-> getinfo []\n DEBUG:TaoRPC:<-1- {\"connections\": 8, ...etc }", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.github.com/taoblockchain/python-taorpc", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "python-taorpc", "package_url": "https://pypi.org/project/python-taorpc/", "platform": "", "project_url": "https://pypi.org/project/python-taorpc/", "project_urls": { "Homepage": "http://www.github.com/taoblockchain/python-taorpc" }, "release_url": "https://pypi.org/project/python-taorpc/1.0/", "requires_dist": null, "requires_python": "", "summary": "Enhanced version of python-bitcoinrpc for use with Tao", "version": "1.0" }, "last_serial": 4185509, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "fc702b97b7a6619847fa9dd1e902e1ba", "sha256": "2a55268bfb0c1f53e73f8e10bad1ec93ebd135c4713bf7d473c60fc89ffca155" }, "downloads": -1, "filename": "python-taorpc-1.0.tar.gz", "has_sig": false, "md5_digest": "fc702b97b7a6619847fa9dd1e902e1ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13538, "upload_time": "2018-08-19T15:29:32", "url": "https://files.pythonhosted.org/packages/46/b3/bb396c4cd8beca719edba213b2ae1a89ca8c74d5eb80516e844b4a067d1d/python-taorpc-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fc702b97b7a6619847fa9dd1e902e1ba", "sha256": "2a55268bfb0c1f53e73f8e10bad1ec93ebd135c4713bf7d473c60fc89ffca155" }, "downloads": -1, "filename": "python-taorpc-1.0.tar.gz", "has_sig": false, "md5_digest": "fc702b97b7a6619847fa9dd1e902e1ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13538, "upload_time": "2018-08-19T15:29:32", "url": "https://files.pythonhosted.org/packages/46/b3/bb396c4cd8beca719edba213b2ae1a89ca8c74d5eb80516e844b4a067d1d/python-taorpc-1.0.tar.gz" } ] }