{ "info": { "author": "Davide Moro", "author_email": "davide.moro@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "========\nplay sql\n========\n\n\n.. image:: https://img.shields.io/pypi/v/play_sql.svg\n :target: https://pypi.python.org/pypi/play_sql\n\n.. image:: https://travis-ci.org/davidemoro/play_sql.svg?branch=develop\n :target: https://travis-ci.org/davidemoro/play_sql\n\n.. image:: https://readthedocs.org/projects/play-sql/badge/?version=latest\n :target: https://play-sql.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://codecov.io/gh/davidemoro/play_sql/branch/develop/graph/badge.svg\n :target: https://codecov.io/gh/davidemoro/play_sql\n\n\npytest-play support for SQL expressions and assertions\n\nMore info and examples on:\n\n* pytest-play_, documentation\n* cookiecutter-qa_, see ``pytest-play`` in action with a working example if you want to start hacking\n\n\nFeatures\n--------\n\nThis project defines a new pytest-play_ command:\n\n::\n\n - type: sql\n provider: play_sql\n database_url: postgresql://$db_user:$db_pwd@$db_host/$db_name\n query: SELECT id, title FROM invoices\n variable: invoice_id\n variable_expression: results.first()[0]\n assertion: invoice_id == $invoice_id\n\nwhere:\n\n* ``database_url`` follows the format described \n http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls\n* ``variable_expression`` is a Python expression\n * ``results.fetchone()`` returns an array whose elements matches with the next row's\n columns and it could be invoked many times until there will be no more rows (eg: first call\n ``(1, 'first',)``, second call ``(2, 'second')``)\n * ``results.first()`` returns an array whose elements matches with the first row's colums and it\n can be invoked exactly one time\n * ``results.fetchall()`` returns an array of tuples whose elements matches with the selected\n colums (eg: ``[(1, 'first'), (2, 'second'), (3, 'third')]``)\n\nTwitter\n-------\n\n``pytest-play`` tweets happens here:\n\n* `@davidemoro`_\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the cookiecutter-play-plugin_ (based on `audreyr/cookiecutter-pypackage`_ project template).\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n.. _`cookiecutter-play-plugin`: https://github.com/davidemoro/cookiecutter-play-plugin\n.. _pytest-play: https://github.com/davidemoro/pytest-play\n.. _cookiecutter-qa: https://github.com/davidemoro/cookiecutter-qa\n.. _`@davidemoro`: https://twitter.com/davidemoro\n\n\n=======\nCHANGES\n=======\n\n0.0.3 (2019-01-25)\n------------------\n\n- Supports new pytest-play >= 2.0 YAML based syntax (json no more supported)\n\n\n0.0.2 (2018-01-22)\n------------------\n\n- No more depends on play_python (deprecated)\n\n\n0.0.1 (2018-01-11)\n------------------\n\n* First release\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tierratelematics/play_sql", "keywords": "play_sql", "license": "Apache Software License 2.0", "maintainer": "", "maintainer_email": "", "name": "play-sql", "package_url": "https://pypi.org/project/play-sql/", "platform": "", "project_url": "https://pypi.org/project/play-sql/", "project_urls": { "Homepage": "https://github.com/tierratelematics/play_sql" }, "release_url": "https://pypi.org/project/play-sql/0.0.3/", "requires_dist": [ "pytest-play (>=2.0.0)", "SQLAlchemy", "pytest ; extra == 'tests'", "pytest-cov ; extra == 'tests'", "mock ; extra == 'tests'" ], "requires_python": "", "summary": "pytest-play support for SQL expressions and assertions", "version": "0.0.3" }, "last_serial": 4742198, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "cc00b7d05195923106124ceff89592d3", "sha256": "8540312a31e93624ce10704290b85edb2b7e97b76f971e93567c795bf36e3535" }, "downloads": -1, "filename": "play_sql-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cc00b7d05195923106124ceff89592d3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5846, "upload_time": "2018-01-11T17:58:39", "url": "https://files.pythonhosted.org/packages/4b/27/5744a76208581dbb2fb654f903ea1e4fa1ffb0f2d368c9066fbf4b4004b8/play_sql-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8029cf2d4c24a610a44f80552bab02bf", "sha256": "874eded01f1486cfc183491a7cf8b3b5bc78dfdc1e8eaae0d3b4130bd5220142" }, "downloads": -1, "filename": "play_sql-0.0.1.tar.gz", "has_sig": false, "md5_digest": "8029cf2d4c24a610a44f80552bab02bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14685, "upload_time": "2018-01-11T17:58:40", "url": "https://files.pythonhosted.org/packages/22/e9/2457c0920d4c5ceeb0f665f122191c9f6be45f2c4dc4783ba263dd09f867/play_sql-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "1a4b922d49a90ae4b3a9abff45237eb6", "sha256": "9fc8bc2bf1b51ee6f02b2707fc04a37193117e8b2f74401f885b0ddb224834ec" }, "downloads": -1, "filename": "play_sql-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1a4b922d49a90ae4b3a9abff45237eb6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5779, "upload_time": "2018-01-22T13:47:22", "url": "https://files.pythonhosted.org/packages/be/05/2930fb7cc28fb18c579061c30ebdc58224a8d71f5aa30768bd0b9d819361/play_sql-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef5af0d658c47041eb30b44ff2edbd2d", "sha256": "a40ece92e1fcf2e816ad739a66e2644452865845e077b013be7d9ef91d48be4a" }, "downloads": -1, "filename": "play_sql-0.0.2.tar.gz", "has_sig": false, "md5_digest": "ef5af0d658c47041eb30b44ff2edbd2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14559, "upload_time": "2018-01-22T13:47:23", "url": "https://files.pythonhosted.org/packages/fd/d2/a43e162839d0badae8001546e5baa52a5f9c979d05d1da72a45a00c8aba4/play_sql-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "b4eb7b75d208b0ac82a4590a14d1b841", "sha256": "c09c2b366a471678b2b241501780963ec6325bb9040726856073d78aa13615b1" }, "downloads": -1, "filename": "play_sql-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b4eb7b75d208b0ac82a4590a14d1b841", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7844, "upload_time": "2019-01-25T23:06:02", "url": "https://files.pythonhosted.org/packages/ab/10/e09f11cd35e289245f875adb7abe7defb3d7cae99c7af6519b7f7530f58e/play_sql-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44c8bd69caaf5c39f743d06ea964b346", "sha256": "7d429b4b7e76864d7eb146573e9e45a09a941717be88f111c8edb7818f175a63" }, "downloads": -1, "filename": "play_sql-0.0.3.tar.gz", "has_sig": false, "md5_digest": "44c8bd69caaf5c39f743d06ea964b346", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17727, "upload_time": "2019-01-25T23:06:04", "url": "https://files.pythonhosted.org/packages/94/9d/f4871017109186d2d4436c53a2dd260fad8d05a3cdfb3598e0e413de68c7/play_sql-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4eb7b75d208b0ac82a4590a14d1b841", "sha256": "c09c2b366a471678b2b241501780963ec6325bb9040726856073d78aa13615b1" }, "downloads": -1, "filename": "play_sql-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b4eb7b75d208b0ac82a4590a14d1b841", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7844, "upload_time": "2019-01-25T23:06:02", "url": "https://files.pythonhosted.org/packages/ab/10/e09f11cd35e289245f875adb7abe7defb3d7cae99c7af6519b7f7530f58e/play_sql-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44c8bd69caaf5c39f743d06ea964b346", "sha256": "7d429b4b7e76864d7eb146573e9e45a09a941717be88f111c8edb7818f175a63" }, "downloads": -1, "filename": "play_sql-0.0.3.tar.gz", "has_sig": false, "md5_digest": "44c8bd69caaf5c39f743d06ea964b346", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17727, "upload_time": "2019-01-25T23:06:04", "url": "https://files.pythonhosted.org/packages/94/9d/f4871017109186d2d4436c53a2dd260fad8d05a3cdfb3598e0e413de68c7/play_sql-0.0.3.tar.gz" } ] }