-
Notifications
You must be signed in to change notification settings - Fork 33
/
setup.py
executable file
·93 lines (73 loc) · 2.27 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Flask-Whooshee
--------------
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:
.. code:: python
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:
.. code:: python
whooshee = Whooshee()
def create_app():
app = Flask(__name__)
whooshee.init_app(app)
return app
Now you can create a basic whoosheer:
.. code:: python
@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:
.. code:: python
Entry.query.whooshee_search('chuck norris').order_by(Entry.id.desc()).all()
Links
`````
* `Documentation <https://flask-whooshee.readthedocs.io>`_
* `Source Code <https://github.com/fedora-copr/flask-whooshee>`_
* `Issues <https://github.com/fedora-copr/flask-whooshee/issues>`_
"""
from setuptools import setup
from flask_whooshee import __version__
setup(
name='flask-whooshee',
version=__version__,
description='Flask-SQLAlchemy - Whoosh Integration',
long_description=__doc__,
keywords='flask, sqlalchemy, whoosh',
author='Bohuslav "Slavek" Kabrda',
author_email='bkabrda@redhat.com',
url='https://github.com/fedora-copr/flask-whooshee',
license='BSD-3-Clause',
py_modules=['flask_whooshee'],
test_suite='test',
zip_safe=False,
platforms='any',
install_requires=[
'Flask-Sqlalchemy',
'Whoosh'
],
tests_require=[
'pytest',
'flexmock'
],
classifiers=[
'Development Status :: 4 - Beta',
'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'
]
)