Skip to content
Integrate rawes in a pyramid application https://github.com/koenedaele/pyramid_rawes
Python
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
pyramid_rawes
tests
.coveragerc
.gitignore
.travis.yml
HISTORY.rst
LICENSE
MANIFEST.in
README.rst
setup.py
tox.ini

README.rst

pyramid_rawes

This library helps integrate rawes in a pyramid application.

https://travis-ci.org/koenedaele/pyramid_rawes.png?branch=master https://coveralls.io/repos/koenedaele/pyramid_rawes/badge.png?branch=master https://badge.fury.io/py/pyramid_rawes.png

Installation

To install pyramid_rawes, use pip

pip install pyramid_rawes

Setup

To activate pyramid_rawes

config = Configurator()
config.include('pyramid_rawes')

By default, this will add an instance with all the default parameters (eg. Elastic Search is assumed to run at localhost:9200). To configure your rawes instance, you can use the pyramid settings file.

rawes.url = http://localhost:9500

Once you have activated pyramid_rawes, a rawes instance is added to the registry.

Usage

To get a rawes instance, call get_rawes with the current application registry. Eg. in a view:

from pyramid_rawes import get_rawes

def search(request):
    ES = get_rawes(request.registry)
    # execute search
    # ...

You can also get a rawes instance by calling the get_rawes directive on the config.

config = Configurator()
config.include('pyramid_rawes')
ES = config.get_rawes()
Something went wrong with that request. Please try again.