{ "info": { "author": "Emlyn O'Regan", "author_email": "emlynoregan@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Distributed Computing" ], "description": "# im_qsb\nThis package provides methods for safely describing App Engine Search API Query as a json structure (a QSpec).\n\nYou can construct a QSpec manually or by using the qsb_X methods\n\nYou can render any QSpec to a Search API Query String using render_query_string()\n\nThe github repo is [here](https://github.com/emlynoregan/im_qsb).\n\n[![Build Status](https://travis-ci.org/emlynoregan/im_qsb.svg?branch=master)](https://travis-ci.org/emlynoregan/im_qsb)\n\n## Install \n\nUse the python package for this library. You can find the package online [here](https://pypi.org/project/im-qsb/).\n\nChange to your Python App Engine project's root folder and do the following:\n\n> pip install im_qsb --target lib\n\nOr add it to your requirements.txt. You'll also need to set up vendoring, see [app engine vendoring instructions here](https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27).\n\n# QSpec\n\nA QSpec is a json structure for describing a Search Engine API query, which is converted to a querystring using the following rules:\n\n## string QSpec:\n\tqspec format: \n\trenders to: quote delimited and escaped unicode string value \n\texample: 'Fred \"Freddy\" Frog' => u'\"Fred \\\"Freddy\\\" Frog\"'\n\tconstruct method: qsb_string()\n\n## number QSpec:\n\tqspec format: \n\trenders to: a numeric value\n\texample: 47 => u'47'\n\tconstruct method: qsb_number()\n\n## boolean QSpec:\n\tqspec format: \n\trenders to: '1' or '0'\n\texample: True => '1'\n\tconstruct method: qsb_boolean()\n\n## unquoted QSpec:\n\tqspec format: { \"unquoted\": }\n\trenders to: an escaped but not quote delimited unicode string value\n\texample: { \"unquoted\": 'Fred \"Freddy\" Frog' } => u'Fred \\\"Freddy\\\" Frog'\n\tconstruct method: qsb_unquoted()\n\n## field QSpec:\n\tqspec format: { \"fieldname\": }\n\trenders to: a valid fieldname, with invalid characters replaced with \"_\"\n\texample: 'first*name' => u'firse_name'\n\tconstruct method: qsb_field()\n\n## equality QSpec\n\tqspec format: { \"op\": \"=\", \"field\": , \"value\": }\n\trenders to: an equality comparison\n\texample: {\"op\":\"=\", \"field\": {\"fieldname\":\"name\"}, \"value\": \"Frodo\"} => u'name:\"Frodo\"'\n\tconstruct method: qsb_eq(, )\n\n## inequality QSpec\n\tqspec format: qspec format: { \"op\": \"!=\", \"field\": , \"value\": }\n\trenders to: an inequality comparison\n\texample: {\"op\":\"!=\", \"field\": {\"fieldname\":\"name\"}, \"value\": \"Frodo\"} => u'NOT (name:\"Frodo\")'\n\tconstruct method: qsb_neq(, )\n\n## paren QSpec\n\tqspec format: { \"op\": \"paren\", \"arg\": }\n\trenders to: wraps parens around a QSpec\n\texample: {\"op\": \"paren\", \"arg\": 47} => u'(47)'\n\tconstruct method: qsb_paren()\n\n## stem QSpec\n\tqspec format: { \"op\": \"stem\", \"arg\": }\n\trenders to: adds a stem to a QSpec\n\texample: {\"op\": \"stem\", \"arg\": \"Harry\"} => u'~\"Harry\"'\n\tconstruct method: qsb_stem()\n\n## less-than QSpec\n\tqspec format: { \"op\": \"<\", \"field\": , \"value\": }\n\trenders to: a less-than comparison\n\texample: {\"op\":\"<\", \"field\": {\"fieldname\":\"amount\"}, \"value\": 43} => u'amount<43'\n\tconstruct method: qsb_lt(, )\n\n## less-than-or-equal-to QSpec\n\tqspec format: { \"op\": \"<=\", \"field\": , \"value\": }\n\trenders to: a less-than-or-equal-to comparison\n\texample: {\"op\":\"<=\", \"field\": {\"fieldname\":\"amount\"}, \"value\": 47.2} => u'amount<=47.2'\n\tconstruct method: qsb_le(, )\n\n## greater-than QSpec\n\tqspec format: { \"op\": \">\", \"field\": , \"value\": }\n\trenders to: a greater-than comparison\n\texample: {\"op\":\">\", \"field\": {\"fieldname\":\"amount\"}, \"value\": -1} => u'amount>-1'\n\tconstruct method: qsb_gt(, )\n\n## greater-than-or-equal-to QSpec\n\tqspec format: { \"op\": \">=\", \"field\": , \"value\": }\n\trenders to: a greater-than-or-equal-to comparison\n\texample: {\"op\":\">=\", \"field\": {\"fieldname\":\"amount\"}, \"value\": 0} => u'amount>=0'\n\tconstruct method: qsb_ge(, )\n\n## and QSpec\n\tqspec format: { \"op\": \"AND\", args: [] }\n\trenders to: a space separated list of QSpecs, which is a valid way to express AND relationships.\n\texample: {\"op\":\"AND\", \"args\": [\"X\", \"Y\", \"Z\"] => u'\"X\" \"Y\" \"Z\"'\n\tconstruct method: qsb_and(, ...)\n\n## or QSpec\n\tqspec format: { \"op\": \"OR\", args: [] }\n\trenders to: an OR separated list of QSpecs.\n\texample: {\"op\":\"OR\", \"args\": [\"noodle\", {\"quoted\": \"poodle\"}]} => u'\"noodle\" OR poodle'\n\tconstruct method: qsb_or(, ...)\n\n## not QSpec\n\tqspec format: { \"op\": \"NOT\", arg: }\n\trenders to: a negation of a QSpecs.\n\texample: {\"op\":\"NOT\", \"args\":\"noodle\"} => u'NOT \"noodle\"'\n\tconstruct method: qsb_not()\n\n## geopoint QSpec\n\tqspec format: { \"op\": \"geopoint\", left: , right: }\n\trenders to: a geopoint specification\n\texample: {\"op\":\"geopoint\", \"left\": 12, \"right\": 42.7} => u'geopoint(12,42.7)'\n\tconstruct method: qsb_geopoint(, )\n\n## distance QSpec\n\tqspec format: { \"op\": \"distance\", left: , right: }\n\trenders to: a distance specification\n\texample: {\"op\": \"distance\", \"left\": {\"op\":\"geopoint\", \"left\": 12, \"right\": 42.7}, \"right\": {\"fieldname\": \"home\"}} \n\t\t=> u'distance(geopoint(12,42.7),home)'\n\tconstruct method: qsb_distance(, )\n\n## rendered QSpec\n\tqspec format: { \"rendered\": }\n\trenders to: the pre-rendered querystring\n\texample: {\"rendered\": \"userid: 1234\"} => u'userid: 1234'\n\tconstruct method: qsb_rendered()\n\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/emlynoregan/im_qsb", "keywords": "", "license": "../LICENSE.txt", "maintainer": "", "maintainer_email": "", "name": "im-qsb", "package_url": "https://pypi.org/project/im-qsb/", "platform": "", "project_url": "https://pypi.org/project/im-qsb/", "project_urls": { "Homepage": "https://github.com/emlynoregan/im_qsb" }, "release_url": "https://pypi.org/project/im-qsb/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "This package provides methods for safely describing App Engine Search API Query as a json structure (a QSpec).", "version": "0.1.2" }, "last_serial": 3919359, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ad1c2e499fb628b01d573fdb77d1a1a3", "sha256": "998187d35b052005a0939f7e4109dbd76a9b2a521f5ec567f320544d6c139eb2" }, "downloads": -1, "filename": "im_qsb-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ad1c2e499fb628b01d573fdb77d1a1a3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7193, "upload_time": "2018-03-06T07:13:17", "url": "https://files.pythonhosted.org/packages/8e/7d/0b9946dc72796d185b3bc8c05a0e3d9a87f42738b4b52360bb79d207981f/im_qsb-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d09f281686a51df30a8aef897feab0e", "sha256": "9e2d5940ab6c80e3048ae038a1dd2709d93cf62db7e44d78c121b2796fdba99a" }, "downloads": -1, "filename": "im_qsb-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3d09f281686a51df30a8aef897feab0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4548, "upload_time": "2018-03-06T07:13:18", "url": "https://files.pythonhosted.org/packages/1e/bf/eb2844764bccbef2a994b6aca7fecb4cd9311f0b7fd954227b34a2d68973/im_qsb-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "218742b357ea76db3e6892833c41bd36", "sha256": "0b03db3bf104829679293bd5539f168808d2149bb1e83ea3455a574e37b06704" }, "downloads": -1, "filename": "im_qsb-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "218742b357ea76db3e6892833c41bd36", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7232, "upload_time": "2018-03-07T00:23:49", "url": "https://files.pythonhosted.org/packages/9c/d1/960fd7fbc48e3656c3f57496d603f2b7bd79aacf1f9a784e47d78e48b9cb/im_qsb-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9f2ecd103918f438b786e85ec4cf767f", "sha256": "4fc717e18492cfaf5c49f00c8ef4b6bf36173b224612ecceace44c67808a21bf" }, "downloads": -1, "filename": "im_qsb-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9f2ecd103918f438b786e85ec4cf767f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4564, "upload_time": "2018-03-07T00:23:50", "url": "https://files.pythonhosted.org/packages/42/be/735a5149f4c758223465056b29725b47071e4422a595993cb5e19b7266b3/im_qsb-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "bb0a054a8c50a2e1bc44651f8307582d", "sha256": "a4527e9a814f79086c6a18847190441286f8374ebb8365694266a7ea58199b73" }, "downloads": -1, "filename": "im_qsb-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bb0a054a8c50a2e1bc44651f8307582d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7488, "upload_time": "2018-06-01T03:49:15", "url": "https://files.pythonhosted.org/packages/52/b0/4a1e175363dc69e58a69bcd852cb5a5b492be6d90603fc45a9f76a1adcff/im_qsb-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0afe7c65a4dad92ecef3eebeed057eba", "sha256": "79d8057d9e7ba74619f5ba7bdca5983c6877c7f3bd384977306fda95c529b8f9" }, "downloads": -1, "filename": "im_qsb-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0afe7c65a4dad92ecef3eebeed057eba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4712, "upload_time": "2018-06-01T03:49:17", "url": "https://files.pythonhosted.org/packages/b9/94/708f56deff6f079e89e0544c07d06b9449f90a064a0e228bb559738c35c2/im_qsb-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bb0a054a8c50a2e1bc44651f8307582d", "sha256": "a4527e9a814f79086c6a18847190441286f8374ebb8365694266a7ea58199b73" }, "downloads": -1, "filename": "im_qsb-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bb0a054a8c50a2e1bc44651f8307582d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7488, "upload_time": "2018-06-01T03:49:15", "url": "https://files.pythonhosted.org/packages/52/b0/4a1e175363dc69e58a69bcd852cb5a5b492be6d90603fc45a9f76a1adcff/im_qsb-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0afe7c65a4dad92ecef3eebeed057eba", "sha256": "79d8057d9e7ba74619f5ba7bdca5983c6877c7f3bd384977306fda95c529b8f9" }, "downloads": -1, "filename": "im_qsb-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0afe7c65a4dad92ecef3eebeed057eba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4712, "upload_time": "2018-06-01T03:49:17", "url": "https://files.pythonhosted.org/packages/b9/94/708f56deff6f079e89e0544c07d06b9449f90a064a0e228bb559738c35c2/im_qsb-0.1.2.tar.gz" } ] }