From fc11314eda6103d5055062c3035536c93784ea4c Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 5 Oct 2017 13:07:23 +0200 Subject: Change to flask_restplus --- archivist/server/__init__.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 archivist/server/__init__.py (limited to 'archivist/server/__init__.py') diff --git a/archivist/server/__init__.py b/archivist/server/__init__.py new file mode 100644 index 0000000..f5ae194 --- /dev/null +++ b/archivist/server/__init__.py @@ -0,0 +1,28 @@ +from importlib import import_module + +from flask.cli import FlaskGroup, ScriptInfo +from flask import Flask +from flask_restplus import Api, Resource, fields + +api = Api(version='0.1', title='Archivist API', + description='API for the Archivist Document System') + +NAMESPACES=( + 'tag', + 'prefix', +) + +def create_app(info): + app = Flask('archivist') + + for ns in NAMESPACES: + mod = import_module('.' + ns, __name__) + api.add_namespace(mod.api) + + api.init_app(app) + + return app + +server_group = FlaskGroup( + name='server', + context_settings = {'obj' : ScriptInfo(create_app=create_app)}) -- cgit v1.2.3-54-g00ecf René 'Necoro' Neumann
summaryrefslogtreecommitdiff
path: root/createpot.sh (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-06-10Modified plugin.xsd so it allows also menu-only pluginsRené 'Necoro' Neumann2-7/+8
2008-06-10Fixed the default handlingRené 'Necoro' Neumann1-1/+1
2008-06-10Allowed default for session; load 'app-portage/portato' as default for ↵René 'Necoro' Neumann2-10/+18
selections :)
2008-06-09Fixed 'kill' in the systray popupRené 'Necoro' Neumann1-2/+2
2008-06-09Fixed error messageRené 'Necoro' Neumann2-4/+1
2008-06-08Make blocks way more intelligentRené 'Necoro' Neumann3-45/+107