{ "info": { "author": "Juan-Pablo Scaletti", "author_email": "juanpablo@jpscaletti.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "# SQLA-wrapper [![Build Status](https://travis-ci.org/jpscaletti/sqla-wrapper.png)](https://travis-ci.org/jpscaletti/sqla-wrapper)\n\nA friendly wrapper for SQLAlchemy.\n\n\n## Installation\n\nInstall the package using Pypi:\n\n```bash\npip install sqla-wrapper\n```\n\nThere is another package on Pypi called `SQLAlchemy-Wrapper` which is\ndeprecated (do not use it\\!). Use `sqla-wrapper` instead.\n\n\n## Basic usage\n\n```python\nfrom sqla_wrapper import SQLAlchemy\n\ndb = SQLAlchemy('sqlite:///:memory:')\n\nclass ToDo(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n ...\n\ndb.create_all()\n\ndb.add(Todo(...))\ndb.commit()\n\n# Sorry, we don't support the `Model.query` syntax yet\ntodos = db.query(ToDo).all()\n```\n\nRead the complete documentation here: https://jpscaletti.com/sqla-wrapper\n\nSince 2.0, only Python 3.6 or later are supported. Please use the 1.9.1 version if your project runs on a previous Python version.\n\nOur test suite [runs continuously on Travis CI](https://travis-ci.org/jpscaletti/sqla-wrapper) with every update.\n\n\n## SQLAlchemy\n\nThe things you need to know compared to plain SQLAlchemy are:\n\n1. The `SQLAlchemy` gives you access to the following things:\n - All the functions and classes from `sqlalchemy` and\n `sqlalchemy.orm`\n - All the functions from a preconfigured scoped session (called\n `_session`).\n - The `~SQLAlchemy.metadata` and `~SQLAlchemy.engine`\n - The methods `SQLAlchemy.create_all` and `SQLAlchemy.drop_all` to\n create and drop tables according to the models.\n - a `Model` baseclass that is a configured declarative base.\n2. All the functions from the session are available directly in the\n class, so you can do `db.add`, `db.commit`, `db.remove`, etc.\n3. The `Model` declarative base class behaves like a regular Python\n class but has a `query` attribute attached that can be used to query\n the model.\n4. The `Model` class also auto generates `_tablename__` attributes, if\n you don't define one, based on the underscored and **pluralized**\n name of your classes.\n5. You have to commit the session and configure your app to remove it\n at the end of the request.\n\n---\n\nCopyright 2013 by [Juan-Pablo Scaletti](http://jpscaletti.com).\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://jpscaletti.com/sqla-wrapper", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sqla-wrapper", "package_url": "https://pypi.org/project/sqla-wrapper/", "platform": "", "project_url": "https://pypi.org/project/sqla-wrapper/", "project_urls": { "Documentation": "http://sqlawrapper.lucuma.co", "Homepage": "https://jpscaletti.com/sqla-wrapper" }, "release_url": "https://pypi.org/project/sqla-wrapper/2.0.2/", "requires_dist": [ "inflection", "sqlalchemy (~=1.0)", "pytest-cov ; extra == 'development'", "tox ; extra == 'development'", "sphinx ; extra == 'development'", "pytest ; extra == 'testing'", "mock ; extra == 'testing'" ], "requires_python": ">=3.6,<4.0", "summary": "A framework-independent wrapper for SQLAlchemy that makes it really easy to use.", "version": "2.0.2" }, "last_serial": 5412895, "releases": { "2.0.1": [ { "comment_text": "", "digests": { "md5": "40eb7b431de9e7a2dc7abdf246cb58ef", "sha256": "214b4fd63ae1ecff60db9d61a5bd8d0de8f61e785be2eab6ceca93abb5aaa918" }, "downloads": -1, "filename": "sqla_wrapper-2.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "40eb7b431de9e7a2dc7abdf246cb58ef", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 28326, "upload_time": "2019-02-17T01:17:17", "url": "https://files.pythonhosted.org/packages/5e/0b/8a56a8e87e529f48df188d223fb91f142460bddd49479fbb1ced665140bf/sqla_wrapper-2.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f286f522283f603e0afce86e081dffc0", "sha256": "af7e17f800eee675343f3a710f545d02650446c244da05ddb6a66ec14323e936" }, "downloads": -1, "filename": "sqla-wrapper-2.0.1.tar.gz", "has_sig": false, "md5_digest": "f286f522283f603e0afce86e081dffc0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 10979, "upload_time": "2019-02-17T01:17:15", "url": "https://files.pythonhosted.org/packages/39/8f/3484e48b163ec2ba2d96c632c14c0c0e596c9fae5edf37e471563e5293ba/sqla-wrapper-2.0.1.tar.gz" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "9f2f88e0832bed4ff3a46d660a9f532a", "sha256": "402e74e4c472a80c20b3c11600cfe80fe2b93465df3fc90dff8fa6cbbac6f43d" }, "downloads": -1, "filename": "sqla_wrapper-2.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9f2f88e0832bed4ff3a46d660a9f532a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6,<4.0", "size": 11653, "upload_time": "2019-06-18T01:51:33", "url": "https://files.pythonhosted.org/packages/35/08/96e0f41efa7dcbb78539dbd47c1a42d63ff56f47a65bf67be7be9b9f4b97/sqla_wrapper-2.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "37ea27c65ce8219b9cd0c0b7ffe0b964", "sha256": "da42b24c42e3fe76d1f693d04f287bf85b0c90f0fe21e11f130cc6b3cb620f6d" }, "downloads": -1, "filename": "sqla-wrapper-2.0.2.tar.gz", "has_sig": false, "md5_digest": "37ea27c65ce8219b9cd0c0b7ffe0b964", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 9770, "upload_time": "2019-06-18T01:51:35", "url": "https://files.pythonhosted.org/packages/53/d7/ffef951f75222474efea1c22c4680e88d3a6839fe0d6f0f64327f878816d/sqla-wrapper-2.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9f2f88e0832bed4ff3a46d660a9f532a", "sha256": "402e74e4c472a80c20b3c11600cfe80fe2b93465df3fc90dff8fa6cbbac6f43d" }, "downloads": -1, "filename": "sqla_wrapper-2.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9f2f88e0832bed4ff3a46d660a9f532a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6,<4.0", "size": 11653, "upload_time": "2019-06-18T01:51:33", "url": "https://files.pythonhosted.org/packages/35/08/96e0f41efa7dcbb78539dbd47c1a42d63ff56f47a65bf67be7be9b9f4b97/sqla_wrapper-2.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "37ea27c65ce8219b9cd0c0b7ffe0b964", "sha256": "da42b24c42e3fe76d1f693d04f287bf85b0c90f0fe21e11f130cc6b3cb620f6d" }, "downloads": -1, "filename": "sqla-wrapper-2.0.2.tar.gz", "has_sig": false, "md5_digest": "37ea27c65ce8219b9cd0c0b7ffe0b964", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 9770, "upload_time": "2019-06-18T01:51:35", "url": "https://files.pythonhosted.org/packages/53/d7/ffef951f75222474efea1c22c4680e88d3a6839fe0d6f0f64327f878816d/sqla-wrapper-2.0.2.tar.gz" } ] }