Redmine #1835: added setup and test call for api
This commit is contained in:
parent
e087add763
commit
d88809be8d
10
package/setup.py
Normal file
10
package/setup.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from setuptools import setup
|
||||
|
||||
setup(name='structure_assignment',
|
||||
version='0.1',
|
||||
description='Pipeline for parsing and assigning structures to arbitrary Slovenian strings',
|
||||
url='',
|
||||
author='Cyprian Laskowski',
|
||||
author_email='cyp@cjvt.si',
|
||||
packages=['structure_assignment'],
|
||||
zip_safe=True)
|
0
package/structure_assignment/__init__.py
Normal file
0
package/structure_assignment/__init__.py
Normal file
15
package/structure_assignment/api.py
Normal file
15
package/structure_assignment/api.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
|
||||
from flask import Flask, jsonify, make_response, request
|
||||
from flask_httpauth import HTTPBasicAuth
|
||||
|
||||
app = Flask(__name__)
|
||||
api_prefix = os.environ['API_PREFIX']
|
||||
|
||||
@app.route(api_prefix + '/test/<string:string>', methods=['GET'])
|
||||
def test(string):
|
||||
results = {'input':string}
|
||||
return jsonify(results)
|
Loading…
Reference in New Issue
Block a user