{ "info": { "author": "Sebasti\u00e1n Mon\u00eda", "author_email": "smonia@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: SQL", "Topic :: Database", "Topic :: Software Development", "Topic :: Utilities" ], "description": "Helper to consume a database from the REPL.\n\nDependencies:\n\n* pypyodbc\n* tabulate\n* Configuration file database.ini. A template is included in the source.\n\nFull documentation available in https://github.com/sebasmonia/pyquebec/wiki\n\nSample:\n\n>>> from pyquebec import pyquebec\n>>> from pyquebec import formatters as pf\n>>> pyquebec.add('SampleDB', 'connection string here', 'MSSQL') # first use\n>>> db = pyquebec.open('SampleDB') # after using add, the db config and schema is cached\n>>> db.dbo.\ndb.dbo.Table1 db.dbo.Table2\ndb.dbo.Table3 db.dbo.Table4\n>>>result = db.dbo.Table1.From().go()\n>>> pf.to_html(result)\nCreating and opening temp file C:\\Users\\smonia\\AppData\\Local\\Temp\\tmpn3g43ppp.htm\n>>> pf.to_csv(result)\nCreating and opening temp file C:\\Users\\smonia\\AppData\\Local\\Temp\\tmpe68shxd9.csv\n>>> result[0]\nrow(column1=datetime.datetime(2015, 5, 13, 23, 34, 58, 77000), column2=59, column3=29, column4='Sample')\n\nPypyodbc returns tuples. This library converts them to namedtuples for increased readability and to make it easier to keep playing with the data using filter, map, sorted, etc.\n\nThere's a third option in the formatters that uses tabulate for output to_console().\nBoth HTML and CSV options create a temp file and use os.startfile (in Windows you get the default browser and, usually, Excel).\n\nRoadmap (help/guidance appreciated!): \n\n* Tested with MSSQL and SQLite. With some configuration should support other engines, and ideally the config should be included in the package.\n* The API for querying might need a few tweaks. Suggestions are welcome.\n* Decide on other SQL features to support beyond basic querying. UPDATES, INSERTS, GROUP BY, etc, would it make sense? Would this make supporting other products more difficult?\n* Needs more unittest!\n\nContributors:\nSebasti\u00c3\u00a1n Mon\u00c3\u00ada - http://github.com/sebasmonia\nFernando Antivero - http://github.com/ferantivero", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sebasmonia/pyquebec", "keywords": "SQL development console MSSQL SQLite", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pyquebec", "package_url": "https://pypi.org/project/pyquebec/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyquebec/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/sebasmonia/pyquebec" }, "release_url": "https://pypi.org/project/pyquebec/0.9.0/", "requires_dist": null, "requires_python": null, "summary": "A Python package to create simple SQL queries from the console, and quickly display the returned information.", "version": "0.9.0" }, "last_serial": 1854551, "releases": { "0.5.0": [ { "comment_text": "", "digests": { "md5": "aa2726aa9e808676400c30b8fa2756fb", "sha256": "e034714a0636e87eaa9a73474ca590df74de2e52eb9597be2ce9fbf882403d0e" }, "downloads": -1, "filename": "pyquebec-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "aa2726aa9e808676400c30b8fa2756fb", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 72587, "upload_time": "2015-10-26T05:02:02", "url": "https://files.pythonhosted.org/packages/8b/9c/8c400210c4fe12815f5b056d41cb756e92a993c82221dabb59c07f370fb9/pyquebec-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1a3eef5b56783ae23a5075667b038aa1", "sha256": "a97134ca00df76b5d600fdf6bcd81159e241428ad5f605284bba64011b746846" }, "downloads": -1, "filename": "pyquebec-0.5.0.zip", "has_sig": false, "md5_digest": "1a3eef5b56783ae23a5075667b038aa1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 74313, "upload_time": "2015-10-26T05:02:11", "url": "https://files.pythonhosted.org/packages/56/fc/26fc6de9681cc3c24162ed74a8262cb7bbe4457fc6ba87b6136d2b2c5fea/pyquebec-0.5.0.zip" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "2f4ae51728841c6fd7c488d90a8fcc84", "sha256": "3cbc22d7c3c2e390afaf7c3d04efbf52636fce02a65a41db1e24edff14f479cd" }, "downloads": -1, "filename": "pyquebec-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2f4ae51728841c6fd7c488d90a8fcc84", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 74875, "upload_time": "2015-10-28T19:13:22", "url": "https://files.pythonhosted.org/packages/8b/cd/2f34d2765a36d8ddf6418291fedccbe07d94cd9e9ef82cc3be437adfef7d/pyquebec-0.5.1-py3-none-any.whl" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "c99273bb58c04a82223a5c1062054dc9", "sha256": "de52017e66a5f407de578447334ed4227c5fc490185275f45d35e596e0b922b5" }, "downloads": -1, "filename": "pyquebec-0.9.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c99273bb58c04a82223a5c1062054dc9", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 76208, "upload_time": "2015-12-09T21:18:49", "url": "https://files.pythonhosted.org/packages/ba/15/96bc3d156c7af0b8ccc6ee8781954179ab63ae0deed0c4b9be85abc2d63e/pyquebec-0.9.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c99273bb58c04a82223a5c1062054dc9", "sha256": "de52017e66a5f407de578447334ed4227c5fc490185275f45d35e596e0b922b5" }, "downloads": -1, "filename": "pyquebec-0.9.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c99273bb58c04a82223a5c1062054dc9", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 76208, "upload_time": "2015-12-09T21:18:49", "url": "https://files.pythonhosted.org/packages/ba/15/96bc3d156c7af0b8ccc6ee8781954179ab63ae0deed0c4b9be85abc2d63e/pyquebec-0.9.0-py3-none-any.whl" } ] }