{ "info": { "author": "Aur\u00e9lien Matouillot", "author_email": "a.matouillot@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: SQL", "Topic :: Database", "Topic :: Database :: Front-Ends", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "sqla_declarative\n================\n\nThis package provides an extended Base class for your SQLAlchemy classes.\nWhat this class proposes:\n * the __tablename__ to create/use for the class is automatically defined by class.__name__.lower().\n * it adds a property pk_id which returns the value of the primary key for the object.\n * it attaches a query object to the class which is a shortcut to session.query(class).\n * Function which returns all the DB entry in a HTML table\n * Function to edit/add new entry as a HTML form\n\n\nExample of usage::\n\n import sqlalchemy as sa\n from sqlalchemy.orm import (\n scoped_session,\n sessionmaker,\n )\n from zope.sqlalchemy import ZopeTransactionExtension\n from sqla_declarative import extended_declarative_base\n\n session = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))\n Base = extended_declarative_base(\n session,\n metadata=sa.MetaData('sqlite:///:memory:'))\n\n class Test1(Base):\n id = sa.Column(sa.Integer, primary_key=True)\n name = sa.Column(sa.String(50))\n\n bob = Test1(name='Bob')\n session.add(bob)\n\n # pk_id detects automatically the primary key and returns it value\n bob.pk_id == 1\n # Easy querying. For example:\n Test1.query.one() == bob\n\n # To see all the existing entry as HTML\n Test1.view_all()\n\n # To add/update a new entry as HTML\n widget = Test1.edit_form()\n widget.display()", "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/LeResKP/sqla_declarative", "keywords": "", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "sqla_declarative", "package_url": "https://pypi.org/project/sqla_declarative/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sqla_declarative/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/LeResKP/sqla_declarative" }, "release_url": "https://pypi.org/project/sqla_declarative/0.2/", "requires_dist": null, "requires_python": null, "summary": "Extended SQLAlchemy declarative_base class", "version": "0.2" }, "last_serial": 800000, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "77542af7e1239cd9f53ef301a66dcf4a", "sha256": "127430120ba330474dbd1cec9c5f6d2ce6e4b18bfd3ec60c0b4eead46b68e736" }, "downloads": -1, "filename": "sqla_declarative-0.1.tar.gz", "has_sig": false, "md5_digest": "77542af7e1239cd9f53ef301a66dcf4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3370, "upload_time": "2013-01-08T00:32:09", "url": "https://files.pythonhosted.org/packages/c1/39/e835a3ecd99ab76c12d7d6a1a43084d81efff7b1fab1845d5b212760ce35/sqla_declarative-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "fff9e27504906467aa8106b5ec12ccdd", "sha256": "b72cd2c1f1a45cc86ddcc2913fbe926f06f024a2ccb85ae002e206a34c0df3f9" }, "downloads": -1, "filename": "sqla_declarative-0.2.tar.gz", "has_sig": false, "md5_digest": "fff9e27504906467aa8106b5ec12ccdd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3813, "upload_time": "2013-01-10T07:47:40", "url": "https://files.pythonhosted.org/packages/e6/e5/afc336f087443e21dea5e8209766a3acac21581002a129e22a237d1ed245/sqla_declarative-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fff9e27504906467aa8106b5ec12ccdd", "sha256": "b72cd2c1f1a45cc86ddcc2913fbe926f06f024a2ccb85ae002e206a34c0df3f9" }, "downloads": -1, "filename": "sqla_declarative-0.2.tar.gz", "has_sig": false, "md5_digest": "fff9e27504906467aa8106b5ec12ccdd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3813, "upload_time": "2013-01-10T07:47:40", "url": "https://files.pythonhosted.org/packages/e6/e5/afc336f087443e21dea5e8209766a3acac21581002a129e22a237d1ed245/sqla_declarative-0.2.tar.gz" } ] }