{ "info": { "author": "Julio Antonio Soto", "author_email": "julio@esbet.es", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "drillpy is a Python wrapper for Apache Drill's REST API, which lets you query and import data to Python directly from a working Drill cluster/drillbit instance. It is built on top on requests, numpy and pandas.\n\n\nInstallation\n\npip install drillpy\n\n\nUsage\n\ndrillpy follows the Python Database API Specification v2.0, so it's usage is pretty similar to the one you can find e.g. in the builtin sqlite3 module from CPython's Standard Library.\n\n\nAs with sqlite3, you should start by creating a Connection object, using drillpy.connect():\n\nfrom drillpy import connect\n\ncon = connect(host=\"some_drillbit_host\", db=\"some_database_managed_by_drill\", port=8047)\n\n\nOnce created, you must create a Cursor:\n\ncur = con.cursor()\n\nNow you can use this cursor to write SQL queries against your Drill cluster. Parameter substitution is handled by question marks ? (as in sqlite3):\n\nquery = cur.execute(\"SELECT * FROM mytable WHERE somecolumn > ? AND someothercolumn < ? LIMIT 10\", (value, other_value))\n\n\nResults are returned in a pandas DataFrame, with NaNs in missing values. Column types are inferred automatically. You can retreive results with fetchone(), fetchmany(size) and fetchall(). With fetchone(), a pandas Series is returned rather than a DataFrame:\n\nreturned_df = query.fetchall()\n\n\n\nKeep in mind that drillpy cannot insert new data in your tables/databases, since Drill itself is a querying engine meant to be used for exploratory data analysis and BI/visualization tools.\n\nOnce finished, you should call Connection.close():\n\ncon.close()", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/julioasoto/drillpy", "keywords": "drill nosql api", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "drillpy", "package_url": "https://pypi.org/project/drillpy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/drillpy/", "project_urls": { "Homepage": "https://bitbucket.org/julioasoto/drillpy" }, "release_url": "https://pypi.org/project/drillpy/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Python wrapper for Apache Drill's REST API", "version": "0.2.0" }, "last_serial": 1984868, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "532b0ee9d18f9820c451de7baee1255a", "sha256": "bad5e3b6b204bc41a376d958d609f2581e9da2b9fa2f18543b4c2a1f426e7df1" }, "downloads": -1, "filename": "drillpy-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "532b0ee9d18f9820c451de7baee1255a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5864, "upload_time": "2016-02-28T20:04:54", "url": "https://files.pythonhosted.org/packages/17/65/bd28387426d90bfda24282b3f4308bb4deda463fdeadf94c335fd0dc9d18/drillpy-0.1.0-py2.py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3ce61c4b539d091ee6a9d62f3d5d016b", "sha256": "2d4ebe932328f3a76dc339047630c172fc053796624b2d74742f16fe0137c8ff" }, "downloads": -1, "filename": "drillpy-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3ce61c4b539d091ee6a9d62f3d5d016b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5891, "upload_time": "2016-03-01T23:24:56", "url": "https://files.pythonhosted.org/packages/b9/d1/b510b337a618e359867eed731d3046ecd4fbc83f05ad09a3a3b19b30144e/drillpy-0.2.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3ce61c4b539d091ee6a9d62f3d5d016b", "sha256": "2d4ebe932328f3a76dc339047630c172fc053796624b2d74742f16fe0137c8ff" }, "downloads": -1, "filename": "drillpy-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3ce61c4b539d091ee6a9d62f3d5d016b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5891, "upload_time": "2016-03-01T23:24:56", "url": "https://files.pythonhosted.org/packages/b9/d1/b510b337a618e359867eed731d3046ecd4fbc83f05ad09a3a3b19b30144e/drillpy-0.2.0-py2.py3-none-any.whl" } ] }