예제 #1
0
#     schema = schemas.CompletionParameterSchema(many=True)

# class Completions(CompletionListResource):
#     """ All data for a list of completions """

#     schema = schemas.CompletionParameterSchema(many=True)


class Test(Completion10):
    def get(self) -> Tuple[Dict, int]:  # type: ignore
        return request.args, 200


api.add_resource(Test, "/test")
api.add_resource(Completions, "/")
api.add_resource(Completion, "/<api>")
api.add_resource(Completion10, "/api10/<api10>")
api.add_resource(Completion14, "/api14/<api14>")

if __name__ == "__main__":
    from fracfocus import create_app
    from config import get_active_config

    app = create_app()
    app.app_context().push()
    conf = get_active_config()

    api10s = ["4246140916"]
    Registry.completion_calcs(api10s=api10s)
    Registry.query.filter(Registry.api10.in_(api10s)).all()
예제 #2
0
""" Entrypoint for WSGI HTTP Server, usually gunicorn """
from gevent import monkey

monkey.patch_all()

from fracfocus import create_app


# gunicorn expects the app object to appear under a variable named "application"
application = create_app()