annot-server/webapp/api.py
author rougeronj
Thu, 22 Jan 2015 09:26:43 +0100
changeset 111 a7b72620d227
parent 26 ebfd0d3cffab
child 108 082b64a5c699
permissions -rw-r--r--
Add variable "wait". When this variable set, the annotsroll wait ignore some annotations, and wait before printing an otherone so there is no superposition. Can be passed as an options

#
# See LICENCE for detail
# Copyright (c) 2014 IRI
#

import sys

import flask.ext.restless

import database
import models
from webapp import app

manager = flask.ext.restless.APIManager(app, session=database.db_session)

manager.create_api(models.Annotation,
    methods=['GET', 'POST', 'PUT', 'DELETE'],
    url_prefix='/api/v1',
    primary_key='uuid',
    max_results_per_page=sys.maxint)