{ "info": { "author": "Thomas Sileo", "author_email": "thomas.sileo@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Programming Language :: Python" ], "description": "===========\n TxWatcher\n===========\n\nA little Python utility that lets you monitor Bitcoin addresses through `Blockchain Websocket API `_ and perform custom callbacks.\n\n\n.. image:: https://pypip.in/v/txwatcher/badge.png\n :target: https://crate.io/packages/txwatcher\n\n.. image:: https://pypip.in/d/txwatcher/badge.png\n :target: https://crate.io/packages/txwatcher\n\n\nInstallation\n============\n\n.. code-block::\n\n $ pip install txwatcher\n\n\nQuickStart\n==========\n\n.. code-block:: python\n\n\tfrom txwatcher import TxWatcher\n\n\tw = TxWatcher(['18eGUUxUsSetQYxJcQXEQTjSCUETEFeA4E'])\n\n\tdef tx_printer(tx):\n\t\tprint(tx)\n\n\t# You can add as many callbacks as you want\n\tw.on_tx += tx_printer\n\n\tw.run_forever()\n\t# or\n\timport thread\n\tthread.start_new_thread(w.run_forever, ())\n\t\n\t# Do some work\n\n\tw.add_addresses(*['16xg9kBKUR2S6bmyccCyPichCpMNMPATAH'])\n\n\nTransactions format\n-------------------\n\n.. code-block:: python\n\n\t{\n\t \"op\": \"utx\",\n\t \"x\": {\n\t \"hash\": \"f6c51463ea867ce58588fec2a77e9056046657b984fd28b1482912cdadd16374\",\n\t \"ver\": 1,\n\t \"vin_sz\": 4,\n\t \"vout_sz\": 2,\n\t \"lock_time\": \"Unavailable\",\n\t \"size\": 796,\n\t \"relayed_by\": \"209.15.238.250\",\n\t \"tx_index\": 3187820,\n\t \"time\": 1331300839,\n\t \"inputs\": [\n\t {\n\t \"prev_out\": {\n\t \"value\": 10000000,\n\t \"type\": 0,\n\t \"addr\": \"12JSirdrJnQ8QWUaGZGiBPBYD19LxSPXho\"\n\t }\n\t }\n\t ],\n\t \"out\": [\n\t {\n\t \"value\": 2800000000,\n\t \"type\": 0,\n\t \"addr\": \"1FzzMfNt46cBeS41r6WHDH1iqxSyzmxChw\"\n\t }\n\t ]\n\t }\n\t}\n\n\nMisc\n----\n\nUsing TxWatcher within Flask\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can start TxWatcher in a separate thread and have it running within your Flask app (or any Python web framework).\n\n.. code-block:: python\n\n\tfrom flask import Flask\n\tapp = Flask(__name__)\n\n\t@app.route(\"/\")\n\tdef hello():\n\t return \"Hello World!\"\n\n\tif __name__ == \"__main__\":\n\t #\u00a0First, start TxWatcher\n\t tw = TxWatcher([a['address'] for a in col_urls.find()])\n\t tw.on_tx += new_tx\n\n\t thread.start_new_thread(tw.run_forever, ())\n\n\t # Then, start the Flask app\n\t app.run()\n\n\nChangelog\n=========\n\nSee CHANGES.rst.\n\n\nContribution\n============\n\nFeel free to submit a pull request!\n\n\nDonation\n========\n\nIf you like my work, please consider donating:\n\nBTC 18eGUUxUsSetQYxJcQXEQTjSCUETEFeA4E\n\n\nLicense (MIT)\n=============\n\nCopyright (c) 2013 Thomas Sileo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tsileo/txwatcher", "keywords": "txwatcher bitcoin", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "txwatcher", "package_url": "https://pypi.org/project/txwatcher/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/txwatcher/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tsileo/txwatcher" }, "release_url": "https://pypi.org/project/txwatcher/0.1.2/", "requires_dist": null, "requires_python": null, "summary": ".", "version": "0.1.2" }, "last_serial": 893412, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4f536f27b42ef1d277575fc01d252ef5", "sha256": "3964a2630058b41dff71b31fbc95c0070083494cd0ef2006dc7b59ed0c04debb" }, "downloads": -1, "filename": "txwatcher-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4f536f27b42ef1d277575fc01d252ef5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3923, "upload_time": "2013-10-10T08:24:03", "url": "https://files.pythonhosted.org/packages/59/be/ff571be00486b17dc2653dad8d3aa06fcce039fb8b7332a8b769cdbe7966/txwatcher-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b1dbd445f813f22be21131c20fe2f3cf", "sha256": "88ac378a11a29fe5ee32e4a4cd3bb2b4ecd08c0cf25b3f680371a1a502afb45e" }, "downloads": -1, "filename": "txwatcher-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b1dbd445f813f22be21131c20fe2f3cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4150, "upload_time": "2013-10-11T19:59:42", "url": "https://files.pythonhosted.org/packages/d4/89/b8f38bb5288dd624ffb9a6ea30426aaa52c23aa01112c8f8fb916852ed67/txwatcher-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "dc8f1b1c8656e62cef0ea9f7cbaa70b4", "sha256": "b577ead82d0b7ddc999085ba18f7fd0b46e37768179a3ebf935d136922c3372f" }, "downloads": -1, "filename": "txwatcher-0.1.2.tar.gz", "has_sig": false, "md5_digest": "dc8f1b1c8656e62cef0ea9f7cbaa70b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4348, "upload_time": "2013-10-13T14:46:19", "url": "https://files.pythonhosted.org/packages/a0/35/70633b8ab0cd34f1ac12651f6b80def7fc03d94847f819ebd1ecdbe65d06/txwatcher-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dc8f1b1c8656e62cef0ea9f7cbaa70b4", "sha256": "b577ead82d0b7ddc999085ba18f7fd0b46e37768179a3ebf935d136922c3372f" }, "downloads": -1, "filename": "txwatcher-0.1.2.tar.gz", "has_sig": false, "md5_digest": "dc8f1b1c8656e62cef0ea9f7cbaa70b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4348, "upload_time": "2013-10-13T14:46:19", "url": "https://files.pythonhosted.org/packages/a0/35/70633b8ab0cd34f1ac12651f6b80def7fc03d94847f819ebd1ecdbe65d06/txwatcher-0.1.2.tar.gz" } ] }