Coder Social home page Coder Social logo

pephers / flask-whooshee Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fedora-copr/flask-whooshee

0.0 3.0 0.0 127 KB

Customizable Flask - SQLAlchemy - Whoosh integration

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.79% Python 99.21%

flask-whooshee's Introduction

Flask-Whooshee

Build Status PyPI Version License

Adds Whoosh integration to Flask-SQLAlchemy.

Flask-Whooshee provides a more advanced Whoosh integration for Flask. Its main power is in the ability to index and search joined queries.

The project is in early beta stage and is fairly stable. However, API may still change before 1.0.0 release.

Flask-Whooshee is licensed under BSD License. Note that up until 0.3.0 it was licensed under GPLv2+.

Quickstart

Install it from PyPI:

$ pip install Flask-Whooshee

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

flask-whooshee's People

Contributors

bkabrda avatar clime avatar colin4124 avatar jordanfung avatar jtl999 avatar pjcunningham avatar sh4nks avatar wassname avatar xsuchy avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.