{ "info": { "author": "Karl Gyllstrom", "author_email": "karl.gyllstrom+code@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Welcome to Flask-WhooshAlchemy!\n===============================\n\nFlask-WhooshAlchemy is a Flask extension that integrates the text-search functionality of `Whoosh `_ with the ORM of `SQLAlchemy `_ for use in `Flask `_ applications.\n\nSource code and issue tracking at `GitHub `_.\n\nView the official docs at http://packages.python.org/Flask-WhooshAlchemy/.\n\nInstall\n-------\n\n::\n\n pip install flask_whooshalchemy\n\nOr:\n\n::\n \n git clone https://github.com/gyllstromk/Flask-WhooshAlchemy.git\n\nQuickstart\n----------\n\nLet's set up the environment and create our model:\n\n::\n\n import flask.ext.whooshalchemy\n\n # set the location for the whoosh index\n app.config['WHOOSH_BASE'] = 'path/to/whoosh/base'\n\n\n class BlogPost(db.Model):\n __tablename__ = 'blogpost'\n __searchable__ = ['title', 'content'] # these fields will be indexed by whoosh\n\n id = app.db.Column(app.db.Integer, primary_key=True)\n title = app.db.Column(app.db.Unicode) # Indexed fields are either String,\n content = app.db.Column(app.db.Text) # Unicode, or Text\n created = db.Column(db.DateTime, default=datetime.datetime.utcnow)\n\nOnly two steps to get started:\n\n1) Set the ``WHOOSH_BASE`` to the path for the whoosh index. If not set, it will default to a directory called 'whoosh_index' in the directory from which the application is run.\n2) Add a ``__searchable__`` field to the model which specifies the fields (as ``str`` s) to be indexed .\n\nLet's create a post:\n\n::\n\n db.session.add(\n BlogPost(title='My cool title', content='This is the first post.')\n ); db.session.commit()\n\nAfter the session is committed, our new ``BlogPost`` is indexed. Similarly, if the post is deleted, it will be removed from the Whoosh index.\n\nText Searching\n--------------\n\nTo execute a simple search:\n\n::\n\n results = BlogPost.query.whoosh_search('cool')\n\nThis will return all ``BlogPost`` instances in which at least one indexed field (i.e., 'title' or 'content') is a text match to the query. Results are ranked according to their relevance score, with the best match appearing first when iterating. The result of this call is a (subclass of) :class:`sqlalchemy.orm.query.Query` object, so you can chain other SQL operations. For example::\n\n two_days_ago = datetime.date.today() - datetime.timedelta(2)\n recent_matches = BlogPost.query.whoosh_search('first').filter(\n BlogPost.created >= two_days_ago)\n\nOr, in alternative (likely slower) order::\n\n recent_matches = BlogPost.query.filter(\n BlogPost.created >= two_days_ago).whoosh_search('first')\n\nWe can limit results::\n\n # get 2 best results:\n results = BlogPost.query.whoosh_search('cool', limit=2)\n\nBy default, the search is executed on all of the indexed fields as an OR conjunction. For example, if a model has 'title' and 'content' indicated as ``__searchable__``, a query will be checked against both fields, returning any instance whose title or content are a content match for the query. To specify particular fields to be checked, populate the ``fields`` parameter with the desired fields::\n\n results = BlogPost.query.whoosh_search('cool', fields=('title',))\n\nBy default, results will only be returned if they contain all of the query terms (AND). To switch to an OR grouping, set the ``or_`` parameter to ``True``::\n\n results = BlogPost.query.whoosh_search('cool', or_=True)", "description_content_type": null, "docs_url": "https://pythonhosted.org/Flask-WhooshAlchemy/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gyllstromk/Flask-WhooshAlchemy", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "Flask-WhooshAlchemy", "package_url": "https://pypi.org/project/Flask-WhooshAlchemy/", "platform": "any", "project_url": "https://pypi.org/project/Flask-WhooshAlchemy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/gyllstromk/Flask-WhooshAlchemy" }, "release_url": "https://pypi.org/project/Flask-WhooshAlchemy/0.56/", "requires_dist": null, "requires_python": null, "summary": "Whoosh extension to Flask/SQLAlchemy", "version": "0.56" }, "last_serial": 2410748, "releases": { "0.1a": [ { "comment_text": "", "digests": { "md5": "766276e94fb871ca071904eeca7f4117", "sha256": "c1676e13388b6aa941f76151dfb07a2e58c1cd1aa458f539982170af8032aecc" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.1a.tar.gz", "has_sig": false, "md5_digest": "766276e94fb871ca071904eeca7f4117", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2722, "upload_time": "2012-03-02T14:45:16", "url": "https://files.pythonhosted.org/packages/82/43/ed0a0bf90bb6f39e632627e4fb965ef2dee98db8f49ac9e9976c79406316/Flask-WhooshAlchemy-0.1a.tar.gz" } ], "0.2a": [ { "comment_text": "", "digests": { "md5": "99b1c863d1f3e15b53bce706aa9c5d65", "sha256": "509dc5c74f4602f9d85e22ff7e208f398378f30da668ba03f1379c2b78a826b2" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.2a.tar.gz", "has_sig": false, "md5_digest": "99b1c863d1f3e15b53bce706aa9c5d65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2990, "upload_time": "2012-03-02T18:08:42", "url": "https://files.pythonhosted.org/packages/81/9d/74b503d06deb6ed1986a6708980fc3f778553faf7b71a355fbc7e2862aa8/Flask-WhooshAlchemy-0.2a.tar.gz" } ], "0.3a": [ { "comment_text": "built for Darwin-10.8.0", "digests": { "md5": "e7033048b11f584ae2fb7c26852f7c04", "sha256": "d2c3edd3c7a0a29587deefd55f1e6fdf147a92d0090433e61fe2ca56e04819a3" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.3a.macosx-10.6-x86_64.tar.gz", "has_sig": false, "md5_digest": "e7033048b11f584ae2fb7c26852f7c04", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 4795, "upload_time": "2012-05-15T20:26:05", "url": "https://files.pythonhosted.org/packages/c6/bc/f3b75e919756546797981ebdf5bd794a8a3a0e541686d9b36d7ae33d0fc5/Flask-WhooshAlchemy-0.3a.macosx-10.6-x86_64.tar.gz" } ], "0.4a": [ { "comment_text": "", "digests": { "md5": "3037f651a30d5a15d38803e3eb53178f", "sha256": "5fe47dceed4cd73af91dcf4424f118d3b6d60cb3f8c99ea32108de42731df3b8" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.4a.tar.gz", "has_sig": false, "md5_digest": "3037f651a30d5a15d38803e3eb53178f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6960, "upload_time": "2012-05-18T20:13:41", "url": "https://files.pythonhosted.org/packages/14/c0/e76de9f23597c2e21369ed3d3c69f8e5960ac1be46f8a5d2ff3e517fbb53/Flask-WhooshAlchemy-0.4a.tar.gz" } ], "0.51a": [ { "comment_text": "", "digests": { "md5": "2cd6ad8328415e68f5771fc2a0cdc139", "sha256": "45bbd3ff17f2e1ace22416f29e47d53ccb78e412e6c078fc634cfec1639b3bb8" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.51a.tar.gz", "has_sig": false, "md5_digest": "2cd6ad8328415e68f5771fc2a0cdc139", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7155, "upload_time": "2012-05-20T15:49:16", "url": "https://files.pythonhosted.org/packages/e8/3b/2241a5cf01188bfb1089453e5a12d21318a844de11d4ae04c3b34c89853a/Flask-WhooshAlchemy-0.51a.tar.gz" } ], "0.53a": [ { "comment_text": "", "digests": { "md5": "20fa34fedf16d1184bf3de5de27c8bd8", "sha256": "9f952aa784a6fa6c4f43b42b64b67d5bcd99067e8108685c43b621f9ab82f3c3" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.53a.tar.gz", "has_sig": false, "md5_digest": "20fa34fedf16d1184bf3de5de27c8bd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7358, "upload_time": "2012-05-28T18:31:48", "url": "https://files.pythonhosted.org/packages/68/38/099378b7b6a3259fd59281c0fa8867b69154edf97bad5ef4be8f648936f0/Flask-WhooshAlchemy-0.53a.tar.gz" } ], "0.54a": [ { "comment_text": "", "digests": { "md5": "d2a9016967c7643c643e3761222d57c2", "sha256": "f8cdd5455de914f83781589148b918de9f17ad8cca13ce6dbe9b3648be1f3717" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.54a.tar.gz", "has_sig": false, "md5_digest": "d2a9016967c7643c643e3761222d57c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7354, "upload_time": "2012-05-28T18:34:18", "url": "https://files.pythonhosted.org/packages/f8/ed/5591d591aa33bad07401d2986dd71f3cc8ca71687bb32a1bbcb9101ef299/Flask-WhooshAlchemy-0.54a.tar.gz" } ], "0.55": [ { "comment_text": "", "digests": { "md5": "2ec8060cc3344f73136ae7f1ad4d55b9", "sha256": "0e77fc9a53babff4bd3b54bbc948f9cdda425f7b9742995e32639ba431a761de" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.55.tar.gz", "has_sig": false, "md5_digest": "2ec8060cc3344f73136ae7f1ad4d55b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8521, "upload_time": "2014-03-01T18:19:16", "url": "https://files.pythonhosted.org/packages/ea/4f/50f3de95555e357fba373838b71fd1c81d04e6b8276a201a528a8cf0a871/Flask-WhooshAlchemy-0.55.tar.gz" } ], "0.55a": [ { "comment_text": "", "digests": { "md5": "a081eeff4450f3ddeedbbca540847f74", "sha256": "50c9539ad72d401ce2e95cfe16b41c7d4a325b1142e3fd9bc8e49bf4a134cc85" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.55a.tar.gz", "has_sig": false, "md5_digest": "a081eeff4450f3ddeedbbca540847f74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7355, "upload_time": "2012-05-28T18:41:50", "url": "https://files.pythonhosted.org/packages/0b/a7/0aa867a2a7cb4142e5c3e6d83a3c972afc1422f3a3902d2082771a95d9aa/Flask-WhooshAlchemy-0.55a.tar.gz" } ], "0.56": [ { "comment_text": "", "digests": { "md5": "26d8d2cd1dce8e06f354633ae69ac6bf", "sha256": "8320ba75040bd37c2810d5ab9a4bd9f3ccadebbef93c805fe0578403f8785baa" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.56.tar.gz", "has_sig": false, "md5_digest": "26d8d2cd1dce8e06f354633ae69ac6bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8528, "upload_time": "2014-07-20T16:33:38", "url": "https://files.pythonhosted.org/packages/4c/85/97e502c02b93351fcc7fd6f5570f2698ae9f29a47ccc069f7347b6e94eb1/Flask-WhooshAlchemy-0.56.tar.gz" } ], "0.5a": [ { "comment_text": "", "digests": { "md5": "f38af9240c8fc4556bcd2ca2454abd4b", "sha256": "aaca8e6d8f1a07624bb92e6b6d5ae21b9d0b63eae46b6e59d70ceed427d604ea" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.5a.tar.gz", "has_sig": false, "md5_digest": "f38af9240c8fc4556bcd2ca2454abd4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7103, "upload_time": "2012-05-19T04:54:40", "url": "https://files.pythonhosted.org/packages/71/e3/8f3b5ac65983f702736f27c09e73816dd548a832bdecaef54973014cd9e2/Flask-WhooshAlchemy-0.5a.tar.gz" } ], "0.6": [], "0.7": [ { "comment_text": "", "digests": { "md5": "aaa742cca554a74c50868dc0b7c28207", "sha256": "ae7823bb8a6354769c3578b4d398495e78d01d9f85786c17d70d63abdc283367" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.7.tar.gz", "has_sig": false, "md5_digest": "aaa742cca554a74c50868dc0b7c28207", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8777, "upload_time": "2016-08-13T20:20:10", "url": "https://files.pythonhosted.org/packages/e6/50/b8ef53d9c1ffcd8f75dbbd0b187f9031fe577902c27ae1f760035502669f/Flask-WhooshAlchemy-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "c9617008076bbf97b2d78f69179872f6", "sha256": "45bd638d2ded106d955b9924f27f7ee41c48fbdd5a1fd6b2a892180354006d10" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.8.tar.gz", "has_sig": false, "md5_digest": "c9617008076bbf97b2d78f69179872f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8916, "upload_time": "2016-10-19T14:50:00", "url": "https://files.pythonhosted.org/packages/f6/fa/c730a77735de591f405ede4fc524e453af9d10f6b79e67c33591ebd7cdea/Flask-WhooshAlchemy-0.8.tar.gz" } ], "v0.52a": [ { "comment_text": "", "digests": { "md5": "354ac085271eb347f65b0e95d1d0163f", "sha256": "991e9104d8da724491d9b5be4ad0ec61b7375a834971b9de672014b20c2d9962" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-v0.52a.tar.gz", "has_sig": false, "md5_digest": "354ac085271eb347f65b0e95d1d0163f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7362, "upload_time": "2012-05-28T18:27:09", "url": "https://files.pythonhosted.org/packages/af/8c/3f8ebe01b272ad0972a99a5ab4186be98b714997fed2a6c466cf3965fd42/Flask-WhooshAlchemy-v0.52a.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "26d8d2cd1dce8e06f354633ae69ac6bf", "sha256": "8320ba75040bd37c2810d5ab9a4bd9f3ccadebbef93c805fe0578403f8785baa" }, "downloads": -1, "filename": "Flask-WhooshAlchemy-0.56.tar.gz", "has_sig": false, "md5_digest": "26d8d2cd1dce8e06f354633ae69ac6bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8528, "upload_time": "2014-07-20T16:33:38", "url": "https://files.pythonhosted.org/packages/4c/85/97e502c02b93351fcc7fd6f5570f2698ae9f29a47ccc069f7347b6e94eb1/Flask-WhooshAlchemy-0.56.tar.gz" } ] }