Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/openannotation/annotator-store
A backend store for the Annotator
https://github.com/openannotation/annotator-store
Last synced: about 17 hours ago
JSON representation
A backend store for the Annotator
- Host: GitHub
- URL: https://github.com/openannotation/annotator-store
- Owner: openannotation
- License: mit
- Created: 2011-02-22T11:30:09.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2016-02-16T00:08:19.000Z (over 8 years ago)
- Last Synced: 2024-11-04T08:37:07.423Z (5 days ago)
- Language: Python
- Homepage: http://annotateit.org/
- Size: 706 KB
- Stars: 177
- Watchers: 24
- Forks: 66
- Open Issues: 9
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - openannotation/annotator-store - A backend store for the Annotator (others)
README
Annotator Store
===============This is a backend store for `Annotator `__.
The functionality can roughly be separated in two parts:
1. An abstraction layer wrapping Elasticsearch, to easily manage annotation
storage. It features authorization to filter search results according to
their permission settings.
2. A Flask blueprint for a web server that exposes an HTTP API to the annotation
storage. To use this functionality, build this package with the ``[flask]``
option.Getting going
-------------You'll need a recent version of `Python `__ (Python 2 >=2.6
or Python 3 >=3.3) and `ElasticSearch `__ (>=1.0.0)
installed.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 .[flask]
cp annotator.cfg.example annotator.cfg
python run.pyYou 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``.Additionally, the ``HOST`` and ``PORT`` environment variables override
the default socket binding of address ``127.0.0.1`` and port ``5000``.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 -e .[testing]``, ensure ElasticSearch is running, and
then::$ nosetests
......................................................................................
----------------------------------------------------------------------
Ran 86 tests in 19.171sOK
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``.