{ "info": { "author": "Lukas Lalinsky", "author_email": "lukas@oxygene.sk", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "Phoenix database adapter for Python\n===================================\n\n``phoenixdb`` is a Python library for accessing the\n`Phoenix SQL database `_\nusing the\n`remote query server `_.\nThe library implements the\nstandard `DB API 2.0 `_ interface,\nwhich should be familiar to most Python programmers.\n\nInstallation\n------------\n\nThe easiest way to install the library is using `pip `_::\n\n pip install phoenixdb\n\nYou can also download the source code from `Bitbucket `_,\nextract the archive and then install it manually::\n\n cd /path/to/python-phoenix-x.y.z/\n python setup.py install\n\nUsage\n-----\n\nThe library implements the standard DB API 2.0 interface, so it can be\nused the same way you would use any other SQL database from Python, for example::\n\n import phoenixdb\n import phoenixdb.cursor\n\n database_url = 'http://localhost:8765/'\n conn = phoenixdb.connect(database_url, autocommit=True)\n\n cursor = conn.cursor()\n cursor.execute(\"CREATE TABLE users (id INTEGER PRIMARY KEY, username VARCHAR)\")\n cursor.execute(\"UPSERT INTO users VALUES (?, ?)\", (1, 'admin'))\n cursor.execute(\"SELECT * FROM users\")\n print cursor.fetchall()\n\n cursor = conn.cursor(cursor_factory=phoenixdb.cursor.DictCursor)\n cursor.execute(\"SELECT * FROM users WHERE id=1\")\n print cursor.fetchone()['USERNAME']\n\n\nSetting up a development environment\n------------------------------------\n\nIf you want to quickly try out the included examples, you can set up a\nlocal `virtualenv `_ with all the\nnecessary requirements::\n\n virtualenv e\n source e/bin/activate\n pip install -r requirements.txt\n python setup.py develop\n\nTo create or update protobuf classes, change the tag in ``gen-protobuf.sh`` and execute.\n\nIf you need a Phoenix server for experimenting, you can get one running\nquickly using Docker::\n\n docker pull docker.oxygene.sk/lukas/python-phoenixdb/phoenix:4.11\n docker run -p 127.0.0.1:8765:8765 docker.oxygene.sk/lukas/python-phoenixdb/phoenix:4.11\n\nInteractive SQL shell\n---------------------\n\nThere is a Python-based interactive shell include in the examples folder, which can be\nused to connect to Phoenix and execute queries::\n\n ./examples/shell.py http://localhost:8765/\n db=> CREATE TABLE test (id INTEGER PRIMARY KEY, name VARCHAR);\n no rows affected (1.363 seconds)\n db=> UPSERT INTO test (id, name) VALUES (1, 'Lukas');\n 1 row affected (0.004 seconds)\n db=> SELECT * FROM test;\n +------+-------+\n | ID | NAME |\n +======+=======+\n | 1 | Lukas |\n +------+-------+\n 1 row selected (0.019 seconds)\n\nRunning the test suite\n----------------------\n\nThe library comes with a test suite for testing Python DB API 2.0 compliance and\nvarious Phoenix-specific features. In order to run the test suite, you need a\nworking Phoenix database and set the ``PHOENIXDB_TEST_DB_URL`` environment variable::\n\n export PHOENIXDB_TEST_DB_URL='http://localhost:8765/'\n nosetests\n\nKnown issues\n------------\n\n- In general, the library has not been battle-tested yet. You might encounter almost any problem. Use with care.\n- You can only use the library in autocommit mode. The native Java Phoenix library also implements batched upserts, which can be committed at once, but this is not exposed over the remote server.\n (`CALCITE-767 `_)\n- TIME and DATE columns in Phoenix are stored as full timestamps with a millisecond accuracy,\n but the remote protocol only exposes the time (hour/minute/second) or date (year/month/day)\n parts of the columns. (`CALCITE-797 `_, `CALCITE-798 `_)\n- TIMESTAMP columns in Phoenix are stored with a nanosecond accuracy, but the remote protocol truncates them to milliseconds. (`CALCITE-796 `_)\n- ARRAY columns are not supported.\n (`CALCITE-1050 `_, `PHOENIX-2585 `_)\n", "description_content_type": null, "docs_url": "https://pythonhosted.org/phoenixdb/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/lalinsky/python-phoenixdb", "keywords": "", "license": "Apache 2", "maintainer": "", "maintainer_email": "", "name": "phoenixdb", "package_url": "https://pypi.org/project/phoenixdb/", "platform": "", "project_url": "https://pypi.org/project/phoenixdb/", "project_urls": { "Homepage": "https://bitbucket.org/lalinsky/python-phoenixdb" }, "release_url": "https://pypi.org/project/phoenixdb/0.7/", "requires_dist": null, "requires_python": "", "summary": "Phoenix database adapter for Python", "version": "0.7" }, "last_serial": 3126357, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "1c7bd0105cd1499ca06915ce718d4d0e", "sha256": "0df920e2bc87194b3133bfa2fb4fcf5bd0ede43d99e25b6c0d60ab1f68b6e455" }, "downloads": -1, "filename": "phoenixdb-0.1.tar.gz", "has_sig": false, "md5_digest": "1c7bd0105cd1499ca06915ce718d4d0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23624, "upload_time": "2015-07-12T18:27:29", "url": "https://files.pythonhosted.org/packages/b6/8a/3fc9a6b725fd8c6b31d74f992f057a2d2846cc79564220bec31ebbfa931b/phoenixdb-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "621c7d47e479456eb18c42c8248d6c2c", "sha256": "c177187ae228b5033fe89df0f3b24afd0fbe52e648a92eb1cb0b9088c0c61977" }, "downloads": -1, "filename": "phoenixdb-0.2.tar.gz", "has_sig": false, "md5_digest": "621c7d47e479456eb18c42c8248d6c2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25506, "upload_time": "2015-11-15T15:42:46", "url": "https://files.pythonhosted.org/packages/41/b6/d49e3c5461ff4228999156a3e77aa5d80e958934db18281bdea9285c59ef/phoenixdb-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "70ea945e1a5b4d67249ee8502ffbc41f", "sha256": "de4a108601e23949aea3172270fec8f48fe091a7588683ff09f82f7a8f38f6ce" }, "downloads": -1, "filename": "phoenixdb-0.3.tar.gz", "has_sig": false, "md5_digest": "70ea945e1a5b4d67249ee8502ffbc41f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26111, "upload_time": "2016-02-05T16:44:51", "url": "https://files.pythonhosted.org/packages/49/81/c82a898868b808a56d1fcd58ab988b190837b662ff62bef598a781088b53/phoenixdb-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "5e435c20b0d8ee047f81db70c120c60f", "sha256": "db2ee82f39257e79fe0e670ac61fcd0e6570608864719c144bd050c0ebab8ef2" }, "downloads": -1, "filename": "phoenixdb-0.4.tar.gz", "has_sig": false, "md5_digest": "5e435c20b0d8ee047f81db70c120c60f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26437, "upload_time": "2016-09-03T18:16:54", "url": "https://files.pythonhosted.org/packages/d6/67/654007b71609ac8f7609e2ef8b53e30e04baa30f7a1062c51eb2bbbc8824/phoenixdb-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "59f5a800d87c49618a30184d39652364", "sha256": "5492c431e4327d781cbe95bc43dd8cb1627325b5b0b8f4832560e020e105fc5d" }, "downloads": -1, "filename": "phoenixdb-0.5.tar.gz", "has_sig": false, "md5_digest": "59f5a800d87c49618a30184d39652364", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40118, "upload_time": "2016-11-03T20:35:15", "url": "https://files.pythonhosted.org/packages/2c/60/951938808900a666abcd7569880d339ea0911297975a5589305839474b90/phoenixdb-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "d46746fc93d9f27951e3acf1396b1d80", "sha256": "b642f7d1e8787e054e5a61cf31cc5a3d559b5a16daec84fca2a4755f28f63818" }, "downloads": -1, "filename": "phoenixdb-0.6.tar.gz", "has_sig": false, "md5_digest": "d46746fc93d9f27951e3acf1396b1d80", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40807, "upload_time": "2017-01-06T16:48:14", "url": "https://files.pythonhosted.org/packages/f6/c1/a7c91b9693b744a677816081b0f237e9c7a073662c8a570500ce9a0a6653/phoenixdb-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "f86a06e49a76937c327f54543f306ee1", "sha256": "0a51c72b1f70d74d9c06772a97257c77f9540a252f780c31592b5dc36ff5c892" }, "downloads": -1, "filename": "phoenixdb-0.7.tar.gz", "has_sig": false, "md5_digest": "f86a06e49a76937c327f54543f306ee1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41275, "upload_time": "2017-08-27T12:13:13", "url": "https://files.pythonhosted.org/packages/db/4a/a706c21457c057dc6abd81820cc566390310c080b7348f524d3ee96c79cc/phoenixdb-0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f86a06e49a76937c327f54543f306ee1", "sha256": "0a51c72b1f70d74d9c06772a97257c77f9540a252f780c31592b5dc36ff5c892" }, "downloads": -1, "filename": "phoenixdb-0.7.tar.gz", "has_sig": false, "md5_digest": "f86a06e49a76937c327f54543f306ee1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41275, "upload_time": "2017-08-27T12:13:13", "url": "https://files.pythonhosted.org/packages/db/4a/a706c21457c057dc6abd81820cc566390310c080b7348f524d3ee96c79cc/phoenixdb-0.7.tar.gz" } ] }