Adds Whoosh integration to Flask-SQLAlchemy.
Setup
Flask-Whooshee supports two different methods of setting up the extension. You can either initialize it directly, thus binding it to a specific application instance:
app = Flask(__name__)
whooshee = Whooshee(app)
and the second is to use the factory pattern which will allow you to configure whooshee at a later point:
whooshee = Whooshee()
def create_app():
app = Flask(__name__)
whooshee.init_app(app)
return app
Now you can create a basic whoosheer:
@whooshee.register_model('title', 'content')
class Entry(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String)
content = db.Column(db.Text)
and finally you can search the model:
Entry.query.whooshee_search('chuck norris').order_by(Entry.id.desc()).all()
Links
Release files for flask-whooshee 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flask-whooshee-0.9.1.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flask_whooshee-0.9.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 23.1 kB
Release files / flask-whooshee-0.9.1.tar.gz
| Download URL | flask-whooshee-0.9.1.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4770a4b8a0425ad39654a9ec62930fb94d4c4e600505cb589314c0ba35201ae2
|
|
BLAKE2b-256 checksum How to use checksums |
c95a861bd48c6b48a2ec1049d399cccb4bc55059037e28acc0c7487e4694f00a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Release files / flask_whooshee-0.9.1-py2.py3-none-any.whl
| Download URL | flask_whooshee-0.9.1-py2.py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a0dde9f59b0f171c911d6d39d237b19a50e2b432775a23a9f2b188a3cbafea77
|
|
BLAKE2b-256 checksum How to use checksums |
e7ece75a2139daff74963218812d4c85afdecc9618046a2b560eae50a52a9e2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|