- Notifications
You must be signed in to change notification settings - Fork66
A backend store for the Annotator
License
openannotation/annotator-store
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is a backend store forAnnotator.
The functionality can roughly be separated in two parts:
- An abstraction layer wrapping Elasticsearch, to easily manage annotationstorage. It features authorization to filter search results according totheir permission settings.
- 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.
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.
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.
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
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors9
Uh oh!
There was an error while loading.Please reload this page.