Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A backend store for the Annotator

License

NotificationsYou must be signed in to change notification settings

openannotation/annotator-store

Repository files navigation

This is a backend store forAnnotator.

The functionality can roughly be separated in two parts:

  1. An abstraction layer wrapping Elasticsearch, to easily manage annotationstorage. It features authorization to filter search results according totheir permission settings.
  2. A Flask blueprint for a web server that exposes an HTTP API to the annotationstorage. To use this functionality, build this package with the[flask]option.

Getting going

You'll need a recent version ofPython (Python 2 >=2.6or Python 3 >=3.3) andElasticSearch (>=1.0.0)installed.

The quickest way to get going requires thepip andvirtualenvtools (easy_install virtualenv will get them both). Run thefollowing in the repository root:

virtualenv pyenvsource pyenv/bin/activatepip install -e .[flask]cp annotator.cfg.example annotator.cfgpython 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, makeyour changes toannotator.cfg or dive intorun.py.

Additionally, theHOST andPORT environment variables overridethe default socket binding of address127.0.0.1 and port5000.

Store API

The Store API is designed to be compatible with theAnnotator. The annotation store, aJSON-speaking REST API, will be mounted at/api by default. See theAnnotatordocumentation fordetails.

Running tests

We usenosetests to run tests. You can justpip install -e .[testing], ensure ElasticSearch is running, andthen:

$ nosetests......................................................................................----------------------------------------------------------------------Ran 86 tests in 19.171sOK

Alternatively (and preferably), you should installTox, and then runtox. This will runthe tests against multiple versions of Python (if you have theminstalled).

Pleaseopen an issueif you find that the tests don't all pass on your machine, making sure to includethe output ofpip freeze.

About

A backend store for the Annotator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors9

Languages


[8]ページ先頭

©2009-2025 Movatter.jp