{ "info": { "author": "Shicheng Li", "author_email": "leegao36@163.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "## clickhouse2pandas\nSelect **ClickHouse** data, convert **to pandas** dataframes and various other formats, by using the [ClickHouse HTTP interface](https://clickhouse.yandex/docs/en/interfaces/http/).\n\n### Features\n- The transmitting data is [compressed](https://clickhouse.yandex/docs/en/operations/settings/settings/#settings-enable_http_compression) by default, which reduces network traffic and thus reduces the time for downloading data.\n- Comes with a dynamic download label, which shows how many data is downloaded.\n- Converts the ClickHouse query result into proper pandas data types, e.g., [ClickHouse DateTime](https://clickhouse.yandex/docs/en/data_types/datetime/) -> pandas datetime64.\n- Minimum dependencies, 5 standard python libraries (urllib, http, gzip, json, time) and 1 external library ([pandas](https://pandas.pydata.org/)).\n\n### Installation\n```\npip install clickhouse2pandas\n```\n\n### Usage\n```python\nimport clickhouse2pandas as ch2pd\n\nconnection_url = 'http://user:password@clickhouse_host:8123'\n\nquery = 'select * from system.numbers limit 1000000'\n\ndf = ch2pd.select(connection_url, query)\n# df is a pandas dataframe converted from ClickHouse query result\n```\n\n### API Reference\n```python\nclickhouse2pandas.select(connection_url, query = None, convert_to = 'DataFrame', settings = None)\n```\nReturn a formatted query result specified by \"convert_to\" parameter.\n\n**Parameters:**\n- **connection_url**: the connection url to the ClickHouse HTTP interface, e.g., `http://user:password@clickhouse_host:8123`\n- **query**: the SQL query, the query should start with 'select'\n- **convert_to**: convert the query result into specific format, could be one of the following: 'DataFrame', 'TabSeparated', 'TabSeparatedRaw', 'TabSeparatedWithNames', 'TabSeparatedWithNamesAndTypes', 'CSV', 'CSVWithNames', 'Values', 'Vertical', 'JSON', 'JSONCompact', 'JSONEachRow', 'TSKV', 'Pretty', 'PrettyCompact', 'PrettyCompactMonoBlock', 'PrettyNoEscapes', 'PrettySpace', 'XML'. Refer to ClickHouse [Input and Output Formats](https://clickhouse.yandex/docs/en/interfaces/formats/)\n- **settings**: a dict containing the setting key-values, default settings are {'enable_http_compression': 1, 'send_progress_in_http_headers': 0,'log_queries': 1, 'connect_timeout': 10, 'receive_timeout': 300, 'send_timeout': 300, 'output_format_json_quote_64bit_integers': 0, 'wait_end_of_query': 0}. Refer to ClickHouse [Settings](https://clickhouse.yandex/docs/en/operations/settings/settings/)\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": "https://github.com/lee19840806/clickhouse2pandas", "keywords": "clickhouse pandas dataframe", "license": "", "maintainer": "", "maintainer_email": "", "name": "clickhouse2pandas", "package_url": "https://pypi.org/project/clickhouse2pandas/", "platform": "", "project_url": "https://pypi.org/project/clickhouse2pandas/", "project_urls": { "ClickHouse DB": "https://clickhouse.yandex/", "Homepage": "https://github.com/lee19840806/clickhouse2pandas", "Pandas": "https://pandas.pydata.org/" }, "release_url": "https://pypi.org/project/clickhouse2pandas/0.0.3/", "requires_dist": [ "pandas (>=0.20.0)" ], "requires_python": ">=3", "summary": "Select ClickHouse data, convert to pandas dataframes", "version": "0.0.3" }, "last_serial": 5698691, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "cfbd9c8217dd543b3c34d49e3c852cfc", "sha256": "e252e853a3c137190ce1a3d7ae272da56f52e034f946bf601a6f3aad0eb83e2c" }, "downloads": -1, "filename": "clickhouse2pandas-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cfbd9c8217dd543b3c34d49e3c852cfc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 8179, "upload_time": "2019-08-18T13:12:37", "url": "https://files.pythonhosted.org/packages/38/ae/b6a1831f9faf5657150662507de9278ad988786547165a3e6fbed1b0f126/clickhouse2pandas-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b98770f409fbfeb55276eb0be1d94aee", "sha256": "b2b142f2dc62ee56803bb34c3558a7cfc3b02c55371bc374d013639d41b930af" }, "downloads": -1, "filename": "clickhouse2pandas-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b98770f409fbfeb55276eb0be1d94aee", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3562, "upload_time": "2019-08-18T13:12:40", "url": "https://files.pythonhosted.org/packages/5a/90/8358afb2bdeee3ee106c3c6dd1b77a7fc3682720b48fedaecf9d8aececec/clickhouse2pandas-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c0e6d2fd3aafe8c4212254895e73142a", "sha256": "0f321cc7a2b00be7ca1859eeb4d41a050831c17d5d255e348cfc17e87ef37c05" }, "downloads": -1, "filename": "clickhouse2pandas-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c0e6d2fd3aafe8c4212254895e73142a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 8308, "upload_time": "2019-08-19T14:02:31", "url": "https://files.pythonhosted.org/packages/39/2a/e99e361f81e55f9e132ff1ffd1355de8ea776e531b9443342d6adbb96c8b/clickhouse2pandas-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c693de5626b5646a672f847da69a08b", "sha256": "3f53c42cb1d3e977172a1971cd69a6266ebe4209c13b4663ae6fa2f6f270d091" }, "downloads": -1, "filename": "clickhouse2pandas-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8c693de5626b5646a672f847da69a08b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3687, "upload_time": "2019-08-19T14:02:33", "url": "https://files.pythonhosted.org/packages/9e/a1/5fbbf5ca1b887bd0bad4031ce057573f733bace07963e73b517e3d0f34a9/clickhouse2pandas-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "ba2e3f3af9bdf5a4025b9237cb1fb19f", "sha256": "93ae4018fa98b5616a7ee3b9538446e5de1bd3192aaaf2f12cb1ab9b513b5c61" }, "downloads": -1, "filename": "clickhouse2pandas-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "ba2e3f3af9bdf5a4025b9237cb1fb19f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 8361, "upload_time": "2019-08-19T14:26:57", "url": "https://files.pythonhosted.org/packages/d9/17/ee240cd980adc451481c33defc8fa635aeca715e898ad03b0e625c59329d/clickhouse2pandas-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "651e05abf663a812ae5091fb2db17e72", "sha256": "7af731fa747b31c3f9b8544c9053c0a7a5dc5844d955c8c3de074e6516af1203" }, "downloads": -1, "filename": "clickhouse2pandas-0.0.3.tar.gz", "has_sig": false, "md5_digest": "651e05abf663a812ae5091fb2db17e72", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3718, "upload_time": "2019-08-19T14:27:00", "url": "https://files.pythonhosted.org/packages/c7/59/52032577fe13b7bd64a735db5cff2b60d0a94eb04fbdbef629267fa513e9/clickhouse2pandas-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ba2e3f3af9bdf5a4025b9237cb1fb19f", "sha256": "93ae4018fa98b5616a7ee3b9538446e5de1bd3192aaaf2f12cb1ab9b513b5c61" }, "downloads": -1, "filename": "clickhouse2pandas-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "ba2e3f3af9bdf5a4025b9237cb1fb19f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 8361, "upload_time": "2019-08-19T14:26:57", "url": "https://files.pythonhosted.org/packages/d9/17/ee240cd980adc451481c33defc8fa635aeca715e898ad03b0e625c59329d/clickhouse2pandas-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "651e05abf663a812ae5091fb2db17e72", "sha256": "7af731fa747b31c3f9b8544c9053c0a7a5dc5844d955c8c3de074e6516af1203" }, "downloads": -1, "filename": "clickhouse2pandas-0.0.3.tar.gz", "has_sig": false, "md5_digest": "651e05abf663a812ae5091fb2db17e72", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3718, "upload_time": "2019-08-19T14:27:00", "url": "https://files.pythonhosted.org/packages/c7/59/52032577fe13b7bd64a735db5cff2b60d0a94eb04fbdbef629267fa513e9/clickhouse2pandas-0.0.3.tar.gz" } ] }