{ "info": { "author": "Kevin Hill", "author_email": "kevin@funguana.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Funhandler\nThis is the general data handler for the funguana main trading bot.\n\nTODO: Transition to a Gym-like environment.\n\n```python\n bars, done = env.step(action=action, selector=selection)\n\n process_bars(bars, dispatcher=dispatcher)\n```\n\n\n## Requirements\n- pandas\n- funtime\n- funpicker\n- dask[complete]\n## How to install\n```\npip install funhandler\n```\nThis is the general data handler for the funguana main trading bot\n\nUse to run through various events inside of the DB.\n\nor use this:\n```python\nfh.set_host('localhost')\nfh.set_store_name('test_store_name')\nfh.set_storage_model('local')\nfh.set_local_storage_info(base_path='/tmp', storage_folder='parquet_data')\nfh.initialize_database()\nunique_data = {\n \"type\": \"price\",\n \"base\": \"ETC\",\n \"trade\": \"BTC\",\n \"exchange\": \"binance\",\n \"period\": \"minute\"\n}\nfh.add_bars([unique_data])\nfh.load_data(**unique_data)\n\nwhile fh.is_still_bars(**unique_data):\n unique_data.update({'limit': 5})\n bars = fh.get_latest_bar_v2(**unique_data)\n print(bars)\n```\n\nresult:\n```\n\u279c python manual_run.py\nRegister Library Type\n base close exchange high ... trade type volumefrom volumeto\n25 ETC 0.001188 binance 0.001189 ... BTC price 93.40 0.1110\n26 ETC 0.001187 binance 0.001188 ... BTC price 131.26 0.1559\n27 ETC 0.001187 binance 0.001188 ... BTC price 192.74 0.2288\n28 ETC 0.001186 binance 0.001187 ... BTC price 216.64 0.2570\n29 ETC 0.001187 binance 0.001187 ... BTC price 0.00 0.0000\n\n[5 rows x 13 columns]\n base close exchange high ... trade type volumefrom volumeto\n20 ETC 0.001187 binance 0.001188 ... BTC price 366.37 0.43520\n21 ETC 0.001188 binance 0.001189 ... BTC price 637.63 0.75680\n22 ETC 0.001189 binance 0.001191 ... BTC price 1091.03 1.30000\n23 ETC 0.001189 binance 0.001189 ... BTC price 137.56 0.16340\n24 ETC 0.001189 binance 0.001189 ... BTC price 12.71 0.01511\n\n[5 rows x 13 columns]\n base close exchange high ... trade type volumefrom volumeto\n15 ETC 0.001187 binance 0.001188 ... BTC price 84.32 0.10010\n16 ETC 0.001188 binance 0.001188 ... BTC price 137.08 0.16280\n17 ETC 0.001185 binance 0.001189 ... BTC price 80.58 0.09568\n18 ETC 0.001187 binance 0.001187 ... BTC price 118.99 0.14120\n19 ETC 0.001187 binance 0.001188 ... BTC price 77.80 0.09236\n\n[5 rows x 13 columns]\n base close exchange high ... trade type volumefrom volumeto\n10 ETC 0.001187 binance 0.001188 ... BTC price 719.54 0.8544\n11 ETC 0.001186 binance 0.001188 ... BTC price 154.78 0.1839\n12 ETC 0.001188 binance 0.001188 ... BTC price 232.66 0.2763\n13 ETC 0.001186 binance 0.001188 ... BTC price 100.48 0.1192\n14 ETC 0.001188 binance 0.001188 ... BTC price 183.76 0.2181\n\n[5 rows x 13 columns]\n base close exchange high ... trade type volumefrom volumeto\n5 ETC 0.001186 binance 0.001187 ... BTC price 274.22 0.3253\n6 ETC 0.001186 binance 0.001187 ... BTC price 636.99 0.7560\n7 ETC 0.001186 binance 0.001186 ... BTC price 89.31 0.1059\n8 ETC 0.001187 binance 0.001188 ... BTC price 193.95 0.2300\n9 ETC 0.001188 binance 0.001188 ... BTC price 159.30 0.1892\n\n[5 rows x 13 columns]\n base close exchange high ... trade type volumefrom volumeto\n0 ETC 0.001185 binance 0.001186 ... BTC price 150.20 0.17800\n1 ETC 0.001186 binance 0.001187 ... BTC price 161.09 0.19100\n2 ETC 0.001186 binance 0.001187 ... BTC price 601.29 0.71350\n3 ETC 0.001186 binance 0.001186 ... BTC price 38.33 0.04546\n4 ETC 0.001186 binance 0.001186 ... BTC price 246.29 0.29210\n\n[5 rows x 13 columns]\n```\n\n\n## Session Object\n\nUpon reading the code for funhandler. We decided that the foundation of the code was perfect for our session store. The session store is the piece of code we use with strategies to handle outside information. This includes online learning/estimation algorithms, and constant data that needs to be called upon. It has many of the same calls the normal funhandler library has.\n\n```python\nsess = Session()\nsess.set_host('localhost')\nsess.set_store_name('test_store_name')\nsess.set_storage_model('local')\nsess.set_local_storage_info(base_path='/tmp', storage_folder='parquet_data')\nsess.initialize_database()\n\n\n\n# sess.load_bars({...})\n\n# while fh.is_still_bars(**unique_data):\n# unique_data.update({'limit': 5})\n# bars = fh.get_latest_bar_v2(**unique_data)\n# print(bars)\n\n\n# Adding state information as well\n\nsess.add(CustomReinforcementAlgorithm())\nsess.add(CustomDispatcher())\nsess.add(CustomEstimatorCode())\n\n```\n\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "funhandler", "package_url": "https://pypi.org/project/funhandler/", "platform": "", "project_url": "https://pypi.org/project/funhandler/", "project_urls": null, "release_url": "https://pypi.org/project/funhandler/0.7.1/", "requires_dist": [ "funpicker", "funtime", "apscheduler", "funhouse", "click", "tornado", "streamz-latest", "dask", "dask[complete]", "dask[dataframe]", "pyarrow", "fastparquet", "crayons", "cerberus", "python-decouple", "psycopg2" ], "requires_python": "", "summary": "Data handling library for forward testing", "version": "0.7.1" }, "last_serial": 5257761, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "b7409582c95ceffe1a7aa4f9b5f51bc1", "sha256": "7dc549e15ccbce67fb811d0ff165b3905a73824eb75b3486dfef93f56d7591fb" }, "downloads": -1, "filename": "funhandler-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "b7409582c95ceffe1a7aa4f9b5f51bc1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8195, "upload_time": "2018-12-04T04:25:50", "url": "https://files.pythonhosted.org/packages/fd/b3/1e5dbeaa8f8e293400a9a37d1b2c80c6e63ff45a47a31e5bd874ea0eed20/funhandler-0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1dccec0998462ae235b2ef4d15ff9ced", "sha256": "cbbeee3bc027bfe5d8a5ebbf14292e0ef3aa915ffc426d595017c621308721f5" }, "downloads": -1, "filename": "funhandler-0.5.tar.gz", "has_sig": false, "md5_digest": "1dccec0998462ae235b2ef4d15ff9ced", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7463, "upload_time": "2018-12-04T04:25:52", "url": "https://files.pythonhosted.org/packages/75/fc/59f9ea5c34761a82b5ca28ef1401e6da0ac1c1aea91574fb0516160c247a/funhandler-0.5.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "18b2d3be53777e77132d0bb228276319", "sha256": "c5473084e4896cd0f3830be39af64ad3c81a30a98f4f91af13a37c45af4cf411" }, "downloads": -1, "filename": "funhandler-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "18b2d3be53777e77132d0bb228276319", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8442, "upload_time": "2018-12-04T23:57:49", "url": "https://files.pythonhosted.org/packages/22/d5/81c954ffe73009c0456f565134c0f86b1b3857e6bc4466386ba00773070d/funhandler-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "826bb25b49d273351d767e7d4ddb842d", "sha256": "3540c4b701e357ac85a84877139032cefc2526caea058eea741c1840f26d3229" }, "downloads": -1, "filename": "funhandler-0.5.1.tar.gz", "has_sig": false, "md5_digest": "826bb25b49d273351d767e7d4ddb842d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7712, "upload_time": "2018-12-04T23:57:51", "url": "https://files.pythonhosted.org/packages/91/83/622a43fed28803fb10709b4112ddb4813000bbde4a32633b481dadcc5c37/funhandler-0.5.1.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "42ac34e84a9a239ade0dfa73af6c4796", "sha256": "5e35b85660e29f4f7766dd06c76a9d7ba7bc4243566dedf0816284eb46241608" }, "downloads": -1, "filename": "funhandler-0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "42ac34e84a9a239ade0dfa73af6c4796", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 37765, "upload_time": "2019-02-14T22:51:06", "url": "https://files.pythonhosted.org/packages/bf/d4/710096706fc9cd5977ceebfe5648319c765d0656fb13e7ffd7a9a6bea535/funhandler-0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d23ac6490714247971428712af80893", "sha256": "f945c70577bacf729b09a7d9e0ccc2d237343ece2ebad791aba1c299bb1f1f91" }, "downloads": -1, "filename": "funhandler-0.6.tar.gz", "has_sig": false, "md5_digest": "5d23ac6490714247971428712af80893", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28207, "upload_time": "2019-02-14T22:51:08", "url": "https://files.pythonhosted.org/packages/b7/29/250ae0ea4ce3729c105e348fb4ae1774eed63efe4d09fd881b984c7b0da5/funhandler-0.6.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "ad49f19197fc3fe4888ab89551b4e8b7", "sha256": "a73a0662011fd65e54201f93cbe5ea5ac9607b22eebf4e65d23b1565a92e8039" }, "downloads": -1, "filename": "funhandler-0.6.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ad49f19197fc3fe4888ab89551b4e8b7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 37785, "upload_time": "2019-02-16T03:13:57", "url": "https://files.pythonhosted.org/packages/40/57/3a9a904c52d15808857f456134350c8d88a846b1c674b945a30927962d9c/funhandler-0.6.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1266f552ab7e7af263f7cf270a0738c0", "sha256": "e38912bd78e1386c971adf7a94076b48452ffba58921c4a4b6b904aa073e3769" }, "downloads": -1, "filename": "funhandler-0.6.1.tar.gz", "has_sig": false, "md5_digest": "1266f552ab7e7af263f7cf270a0738c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28219, "upload_time": "2019-02-16T03:13:58", "url": "https://files.pythonhosted.org/packages/5b/11/7c2c3c95071964ac03c06638feb613d993e6c7477410a97681ef45cb6039/funhandler-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "420274084840a2daf004f5965cb77f73", "sha256": "35bebce66428e2336577c8da6b6a7e61fd6104d599c191ba1378e0e1aef9d74f" }, "downloads": -1, "filename": "funhandler-0.6.2-py3-none-any.whl", "has_sig": false, "md5_digest": "420274084840a2daf004f5965cb77f73", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 37800, "upload_time": "2019-05-09T23:22:14", "url": "https://files.pythonhosted.org/packages/6f/fe/90de9bca901c1576bd66ef1848e3430deaeaeb588d6a767382be8a6f85d9/funhandler-0.6.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0beb54ccaef704542f7205a56504dd2e", "sha256": "419db0e4ef9f6ca80abe9c193f065bcac35330828cbe7755480091c10ba0eac7" }, "downloads": -1, "filename": "funhandler-0.6.2.tar.gz", "has_sig": false, "md5_digest": "0beb54ccaef704542f7205a56504dd2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28239, "upload_time": "2019-05-09T23:22:16", "url": "https://files.pythonhosted.org/packages/a9/67/19b76094afd48f52f1fd2998e341468ecca8b295e69fbdd428a61e72abd3/funhandler-0.6.2.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "a7f320fbe3ab01a1cd61b2bb519c10a5", "sha256": "32ad32d37199e775f694a76ceba6d676dd2b81c5dd5d24e4760809c0f68b59cb" }, "downloads": -1, "filename": "funhandler-0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "a7f320fbe3ab01a1cd61b2bb519c10a5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 39099, "upload_time": "2019-05-12T00:40:04", "url": "https://files.pythonhosted.org/packages/c2/f2/578f8c53510aec2cf27df7881796dca9bdbae9545f2be969afb73e3bac3b/funhandler-0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e48d604a1e2bf2651067c5e15ed62f7", "sha256": "4922902b1ea901537da68c38077c9ff5a6d7e7ec78a829c9b674e8a3171e8b16" }, "downloads": -1, "filename": "funhandler-0.7.tar.gz", "has_sig": false, "md5_digest": "0e48d604a1e2bf2651067c5e15ed62f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30505, "upload_time": "2019-05-12T00:40:06", "url": "https://files.pythonhosted.org/packages/77/87/0a1157e87d04ee13e904ffb37527ffc5a9b99a687dadad084a38420b75aa/funhandler-0.7.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "6c7e9eaa25dd4751cf3e616a48f6872d", "sha256": "8c5a4b4aa28e935df9bda6776cb57b27de9e4737b99f5039c3f9813391272ccb" }, "downloads": -1, "filename": "funhandler-0.7.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6c7e9eaa25dd4751cf3e616a48f6872d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 39127, "upload_time": "2019-05-12T01:33:44", "url": "https://files.pythonhosted.org/packages/7d/78/94307b07a82f400cae1595c080d29aadd18e39d61dfdffc4bcb5a909f5bc/funhandler-0.7.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "688e70089b723492d1b9c12077ca9189", "sha256": "db2077f193edff0b814c839a41bae20ac0d342f623471179371a8b70eaa96cd5" }, "downloads": -1, "filename": "funhandler-0.7.1.tar.gz", "has_sig": false, "md5_digest": "688e70089b723492d1b9c12077ca9189", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30515, "upload_time": "2019-05-12T01:33:46", "url": "https://files.pythonhosted.org/packages/c1/ba/798d778fd2d166f005fb41369fac25143899d63a70a69abe8ea37518bcb5/funhandler-0.7.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6c7e9eaa25dd4751cf3e616a48f6872d", "sha256": "8c5a4b4aa28e935df9bda6776cb57b27de9e4737b99f5039c3f9813391272ccb" }, "downloads": -1, "filename": "funhandler-0.7.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6c7e9eaa25dd4751cf3e616a48f6872d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 39127, "upload_time": "2019-05-12T01:33:44", "url": "https://files.pythonhosted.org/packages/7d/78/94307b07a82f400cae1595c080d29aadd18e39d61dfdffc4bcb5a909f5bc/funhandler-0.7.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "688e70089b723492d1b9c12077ca9189", "sha256": "db2077f193edff0b814c839a41bae20ac0d342f623471179371a8b70eaa96cd5" }, "downloads": -1, "filename": "funhandler-0.7.1.tar.gz", "has_sig": false, "md5_digest": "688e70089b723492d1b9c12077ca9189", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30515, "upload_time": "2019-05-12T01:33:46", "url": "https://files.pythonhosted.org/packages/c1/ba/798d778fd2d166f005fb41369fac25143899d63a70a69abe8ea37518bcb5/funhandler-0.7.1.tar.gz" } ] }