Skip to main content
Help us improve Python packaging – donate today!

Database backend for Annotator (http://annotatorjs.org)

Project Description

Annotator Store

This is a backend store for Annotator.

Getting going

You’ll need a recent version of Python (>=2.6) and ElasticSearch (>=1.0.0) installed (although see “ElasticSearch compatibility” below).

The quickest way to get going requires the pip and virtualenv tools (easy_install virtualenv will get them both). Run the following in the repository root:

virtualenv pyenv
source pyenv/bin/activate
pip install -e .
cp annotator.cfg.example annotator.cfg
python run.py

You should see something like:

* Running on http://127.0.0.1:5000/
* Restarting with reloader...

If you wish to customize the configuration of the Annotator Store, make your changes to annotator.cfg or dive into run.py.

Store API

The Store API is designed to be compatible with the Annotator. The annotation store, a JSON-speaking REST API, will be mounted at /api by default. See the Annotator documentation for details.

Running tests

We use nosetests to run tests. You can just pip install nosetests mock, ensure ElasticSearch is running, and then:

$ nosetests
....................................................
----------------------------------------------------------------------
Ran 52 tests in 3.233s

OK

Alternatively (and preferably), you should install Tox, and then run tox. This will run the tests against multiple versions of Python (if you have them installed).

Please open an issue if you find that the tests don’t all pass on your machine, making sure to include the output of pip freeze.

Elasticsearch compatibility

The store should ideally be run against Elasticsearch version 1.0.0 or greater, but can also be run against the legacy 0.90.x series (and possibly even earlier) if desired. In order to do this, set the following configuration option:

ELASTICSEARCH_COMPATIBILITY_MODE = 'pre-1.0.0'

and ensure that you have installed a version of the elasticsearch library from the 0.4.x series:

pip install 'elasticsearch>0.4,<0.5'

NB: This mode of operation is deprecated. Support will be dropped for Elasticsearch 0.90.x in the future.

Changelog

0.11.1

  • Fixed support for using ElasticSearch instances behind HTTP Basic auth

0.11.0

  • Add support for ElasticSearch 1.0
  • Create changelog

Release history Release notifications

History Node

0.14.2

History Node

0.14.1

History Node

0.14.0

History Node

0.13.2

History Node

0.13.1

History Node

0.13

History Node

0.12

History Node

0.11.2

This version
History Node

0.11.1

History Node

0.11.0

History Node

0.10.0

History Node

0.9.3

History Node

0.9.2

History Node

0.9.1

History Node

0.9.0

History Node

0.8.1

History Node

0.8.0

History Node

0.7.9

History Node

0.7.8

History Node

0.7.7

History Node

0.7.6

History Node

0.7.4

History Node

0.7.3

History Node

0.7.2

History Node

0.7.1

History Node

0.7.0

History Node

0.6.4

History Node

0.6.3

History Node

0.6.2

History Node

0.6.1

History Node

0.6.0

History Node

0.4.1

History Node

0.4

History Node

0.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
annotator-0.11.1-py2-none-any.whl (15.9 kB) Copy SHA256 hash SHA256 Wheel 2.7 Apr 8, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page