{ "info": { "author": "Sergey Koposov", "author_email": "skoposov@cmu.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: BSD License", "Topic :: Utilities" ], "description": "[![Build Status](https://travis-ci.org/segasai/sqlutilpy.svg?branch=master)](https://travis-ci.org/segasai/sqlutilpy)\n[![Documentation Status](https://readthedocs.org/projects/sqlutilpy/badge/?version=latest)](http://sqlutilpy.readthedocs.io/en/latest/?badge=latest)\n\n\n# sqlutilpy\nPython module to query SQL databases and return numpy arrays, upload\ntables and run join queries involving local arrays and the tables in the DB.\nThe module only works for PostgreSQL and sqlite databases.\n\nThe full documentation is available [here](http://sqlutilpy.readthedocs.io/en/latest/)\n\n## Installation\nTo install the package you just need to do pip install. \n\n```\npip install sqlutilpy\n```\n\n\n## Querying the database and retrieving the results\n```\nra,dec = sqlutil.get('select ra,dec from mytable', host='HOST_NAME_OF_MY_PG_SERVER', db='THE_NAME_OF_MY_DB')\n```\n\nBy default sqlutil.get executes the result and returns the tuple of \nresults\n\n## Uploading your arrays as column in a table\n```\nx = np.arange(10) \ny = x**.5 \nsqlutil.upload('mytable',(x,y),('xcol','ycol')) \n``` \nThis will create a table called mytable with columns xcol and ycol \n\n## Join query involving your local data and the database table\n\nImagine you have arrays myid and y and you want to to extract all the \ninformation from somebigtable for objects with id=myid. In principle\nyou could upload the arrays in the DB and run a query, but local_join function does that for you.\n\n```\nmyid = np.arange(10)\ny = x**.5\nsqlutilpy.local_join('select * from mytmptable as m, somebigtable as s where s.id=m.myid order by m.myid', 'mytmptable',(x,y),('myid','ycol'))\n```\nIt executes a query as if you arrays where in a mytmptable. ( behind the scenes\nit uploads the data to the db and runs a query)", "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/segasai/sqlutilpy", "keywords": "numpy postgresql query sql sqlite array", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "sqlutilpy", "package_url": "https://pypi.org/project/sqlutilpy/", "platform": "", "project_url": "https://pypi.org/project/sqlutilpy/", "project_urls": { "Homepage": "https://github.com/segasai/sqlutilpy" }, "release_url": "https://pypi.org/project/sqlutilpy/0.11.0/", "requires_dist": null, "requires_python": "", "summary": "Database query code returning numpy arrays", "version": "0.11.0" }, "last_serial": 4560352, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7d4655673d897d2be2aa26affa183d90", "sha256": "6fcd6d8691580ba49cf284eb151fe7de1dafc60c6abbe14ae406b8aae394740d" }, "downloads": -1, "filename": "sqlutilpy-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7d4655673d897d2be2aa26affa183d90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7167, "upload_time": "2018-05-27T16:41:40", "url": "https://files.pythonhosted.org/packages/23/67/074f30c945c8c6f2bd7f7560a059544dea8ec2604a7e44f93409289b9a55/sqlutilpy-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "67f042b51f54f7410217f64f927180cf", "sha256": "1d5969efdce2ef9ee45b015af62e0be9877436fbd66a8ca24e23dc649fc982d6" }, "downloads": -1, "filename": "sqlutilpy-0.0.2.tar.gz", "has_sig": false, "md5_digest": "67f042b51f54f7410217f64f927180cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7336, "upload_time": "2018-05-27T19:37:33", "url": "https://files.pythonhosted.org/packages/f7/a6/3a087b07f62655137dfc455a23b4108c16f3a2ff897b6ed3a5d137097c81/sqlutilpy-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "75ac754acb5a18d2bf4d2d74d61db160", "sha256": "4ccd7c987727a89dae6da146084744e86ebe277b4c66d24f85f5185f8580a849" }, "downloads": -1, "filename": "sqlutilpy-0.0.3.tar.gz", "has_sig": false, "md5_digest": "75ac754acb5a18d2bf4d2d74d61db160", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7341, "upload_time": "2018-05-29T00:21:44", "url": "https://files.pythonhosted.org/packages/a1/e7/7967ac6a61f9aacdda9ae669fb89d18c1b4ad3dd3c6a3bf386be34c5022d/sqlutilpy-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "29ba05f1de13bf1bfe62e7ebcef2a3f1", "sha256": "36f6ae93be72deb094edfa6fa9a1406d8251dcd13125946613e9f48b69c36435" }, "downloads": -1, "filename": "sqlutilpy-0.0.4.tar.gz", "has_sig": false, "md5_digest": "29ba05f1de13bf1bfe62e7ebcef2a3f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7274, "upload_time": "2018-05-31T08:04:42", "url": "https://files.pythonhosted.org/packages/a2/e8/2a7a1374111391fa838b92eb90b6e146ee4013509c3180eb3809ad271d83/sqlutilpy-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "2daca0d5670041bc88ae5dcf5c328504", "sha256": "61cc568b848a8e2f990f6e5eb2a9ae43ddd8c7b18e993269a767341f1e9dafc0" }, "downloads": -1, "filename": "sqlutilpy-0.0.5.tar.gz", "has_sig": false, "md5_digest": "2daca0d5670041bc88ae5dcf5c328504", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7292, "upload_time": "2018-06-04T21:45:37", "url": "https://files.pythonhosted.org/packages/60/f9/63a4ae7b1014e126574b436b66876bbbe2cd5e5bee3b2cd002e3496d42fd/sqlutilpy-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "260e2a579a54ee75b6c388a92a8eee74", "sha256": "653a7a729e09954b39919a659a6e80f1d12b4aee5133c6c704bd563019c8cffa" }, "downloads": -1, "filename": "sqlutilpy-0.0.6.tar.gz", "has_sig": false, "md5_digest": "260e2a579a54ee75b6c388a92a8eee74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7436, "upload_time": "2018-06-09T23:40:14", "url": "https://files.pythonhosted.org/packages/26/ec/620d4f222c67311bd23096c03f755cdc5d90b0db2a05d85ceacd65432f9e/sqlutilpy-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "e4d3582f8d6ad76ec71a9a8594b7e2f2", "sha256": "b43d24c341baa6994f273996041077f314a0fec8f3c863119329dd7be3472cec" }, "downloads": -1, "filename": "sqlutilpy-0.0.7.tar.gz", "has_sig": false, "md5_digest": "e4d3582f8d6ad76ec71a9a8594b7e2f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7451, "upload_time": "2018-07-28T13:23:38", "url": "https://files.pythonhosted.org/packages/5d/1d/2f4b289e59c9fa0085684a6de1d28fb0233a7c3b9412d4e549485deb97c2/sqlutilpy-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "22578b15c840fa45d53916ab38f57e31", "sha256": "572644f63a5a92fcdb1caccb04b91d6d01dd253985042a388ada120ea729e75d" }, "downloads": -1, "filename": "sqlutilpy-0.0.8.tar.gz", "has_sig": false, "md5_digest": "22578b15c840fa45d53916ab38f57e31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7608, "upload_time": "2018-11-21T17:19:15", "url": "https://files.pythonhosted.org/packages/da/44/3e7bc557310eb51e8ba842622d909b1b22eff6e4545050fa97ce67dd7caf/sqlutilpy-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "a14730f267a3efabc01f70ec9ba5c355", "sha256": "24b0d090c192dbbd44e2d57f02c9dfcfdc53705ef6adbd798eded2f959939068" }, "downloads": -1, "filename": "sqlutilpy-0.0.9.tar.gz", "has_sig": false, "md5_digest": "a14730f267a3efabc01f70ec9ba5c355", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9643, "upload_time": "2018-11-21T17:34:49", "url": "https://files.pythonhosted.org/packages/65/1d/7ba3c6563b15adebbefb533c0d5b7a4efa8781d7dd3e5128bf32fcde64ca/sqlutilpy-0.0.9.tar.gz" } ], "0.10.0": [ { "comment_text": "", "digests": { "md5": "3d72d8b4d85f3d33dcaa3f30bf9bd018", "sha256": "6fc540fd1dd89dd9b5e61aea5bd5db8296b69cbd9cb189a4139c28c4a787530e" }, "downloads": -1, "filename": "sqlutilpy-0.10.0.tar.gz", "has_sig": false, "md5_digest": "3d72d8b4d85f3d33dcaa3f30bf9bd018", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9646, "upload_time": "2018-12-04T15:58:38", "url": "https://files.pythonhosted.org/packages/02/a7/88d8a7d12541227580663700557a17818eaabf0355971ff90612f4c8a81d/sqlutilpy-0.10.0.tar.gz" } ], "0.11.0": [ { "comment_text": "", "digests": { "md5": "c1e4452cd8cc2b5c0cee3fd12c0fff6b", "sha256": "c25987d45f23bcc05022bbe3d74ea46a673be1c141056c7abe551ce4c6a24e45" }, "downloads": -1, "filename": "sqlutilpy-0.11.0.tar.gz", "has_sig": false, "md5_digest": "c1e4452cd8cc2b5c0cee3fd12c0fff6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9671, "upload_time": "2018-12-04T17:00:38", "url": "https://files.pythonhosted.org/packages/34/6d/a24a6a3499f6e867276dd192f9f7f6e5c84505017d2c3b7ad6cfa66517ee/sqlutilpy-0.11.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c1e4452cd8cc2b5c0cee3fd12c0fff6b", "sha256": "c25987d45f23bcc05022bbe3d74ea46a673be1c141056c7abe551ce4c6a24e45" }, "downloads": -1, "filename": "sqlutilpy-0.11.0.tar.gz", "has_sig": false, "md5_digest": "c1e4452cd8cc2b5c0cee3fd12c0fff6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9671, "upload_time": "2018-12-04T17:00:38", "url": "https://files.pythonhosted.org/packages/34/6d/a24a6a3499f6e867276dd192f9f7f6e5c84505017d2c3b7ad6cfa66517ee/sqlutilpy-0.11.0.tar.gz" } ] }