123456789101112131415161718192021222324252627282930313233 |
- from flask import Blueprint, request
- query = Blueprint('query', __name__)
- @query.route('/find', methods=['GET'])
- def find():
- '''
- Search by entering a search term and optional property and comparison term.
- '''
- valid_operands = ('=', '>', '<', '<>')
- term = request.args.get('term')
- prop = request.args.get('prop', default=1)
- cmp = request.args.get('cmp', default='=')
-
- @query.route('/sparql', methods=['POST'])
- def sparql(q):
- '''
- Perform a direct SPARQL query on the underlying triplestore.
- @param q SPARQL query string.
- '''
-
- pass
|