{ "info": { "author": "Div Shekhar", "author_email": "div@txtlabs.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Database :: Front-Ends" ], "description": "\n# Binder - A Python SQL Mapper.\n\nBinder is a lightweight SQL mapper for Python that lets you perform SQL\noperations using native Python data types and methods:\n\n >>> conn.select(Trades, AND(Trades.q.symbol=='RHAT', Trades.q.trans=='BUY'))\n [{'date': datetime.date(2006, 1, 5), 'symbol': u'RHAT', 'trans': u'BUY', 'price'\n : 35.0, 'qty': 100}]\n\nA database row is mapped to a Python dictionary containing native Python data\ntypes. Binder gives you control of what SQL query is executed, while taking\ncare of query generation, parameter passing and data conversion.\n\nCurrently, Binder supports the SQLite (via Python's built-in sqlite3 module),\nPostgreSQL (via psycopg2) and MySQL (via the MySQLdb python module).\n\nSee manual.txt for full documentation.\n\n\n## Installing\n\nInstall using pip:\n\n pip install binder\n\nInstall from source:\n\n python setup.py install\n\n\n## Quick Tour\n\nDefine the schema for a table:\n\n >>> from binder import *\n >>> Trades = Table(\"trades\",\n ... DateCol(\"date\"), UnicodeCol(\"trans\", 4), UnicodeCol(\"symbol\", 4),\n ... IntCol(\"qty\"), FloatCol(\"price\")\n ... )\n\nCreating a new database using SQLite and create the table we defined above:\n\n >>> conn = SqliteConnection(\"readme.db3\")\n >>> conn.create_table(Trades)\n\nInsert a row using a regular Python dictionary:\n\n >>> from datetime import date\n >>> row = {\n ... \"date\":date(2006, 1, 5), \"trans\":\"BUY\", \"symbol\":\"RHAT\",\n ... \"qty\":100, \"price\":35\n ... }\n >>> conn.insert(Trades, row)\n >>> conn.commit()\n\nFinally, retrieve the data:\n\n >>> conn.select(Trades)\n [{'date': datetime.date(2006, 1, 5), 'symbol': u'RHAT', 'trans': u'BUY', 'price'\n : 35.0, 'qty': 100}]\n\n\n", "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/divtxt", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "binder", "package_url": "https://pypi.org/project/binder/", "platform": "any", "project_url": "https://pypi.org/project/binder/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/divtxt" }, "release_url": "https://pypi.org/project/binder/0.6/", "requires_dist": null, "requires_python": null, "summary": "Binder is a lightweight mapping engine for SQL databases.", "version": "0.6" }, "last_serial": 786855, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "8ac1486578454575923eba474b94952b", "sha256": "ce96c38748adf5695935069df9fc042b25c8cb72cfc285e8fdec5ca122818014" }, "downloads": -1, "filename": "binder-0.5.tar.gz", "has_sig": false, "md5_digest": "8ac1486578454575923eba474b94952b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7887, "upload_time": "2013-01-12T08:51:35", "url": "https://files.pythonhosted.org/packages/96/b5/ff986c4bd358edf7c43af19afa6d9cf7de6d4cd8b5a403e6fdc98d4c84f6/binder-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "a9bbbf481582794380cc461e68470be7", "sha256": "8548986d61dd4ad59d447eb22dcafe48af9c06d6e2adcd67f12098e806806623" }, "downloads": -1, "filename": "binder-0.6.tar.gz", "has_sig": false, "md5_digest": "a9bbbf481582794380cc461e68470be7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8287, "upload_time": "2013-01-22T06:30:57", "url": "https://files.pythonhosted.org/packages/03/e2/3606600b8b67b0f9ca52c3aada5222cf9d5a90b91b86e0fb2a343743af63/binder-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a9bbbf481582794380cc461e68470be7", "sha256": "8548986d61dd4ad59d447eb22dcafe48af9c06d6e2adcd67f12098e806806623" }, "downloads": -1, "filename": "binder-0.6.tar.gz", "has_sig": false, "md5_digest": "a9bbbf481582794380cc461e68470be7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8287, "upload_time": "2013-01-22T06:30:57", "url": "https://files.pythonhosted.org/packages/03/e2/3606600b8b67b0f9ca52c3aada5222cf9d5a90b91b86e0fb2a343743af63/binder-0.6.tar.gz" } ] }