# Path: sanskrit_parser/rest_api/flask_helper.py
# def index():
# def site_map():
# 
# Path: sanskrit_parser/rest_api/api_v1.py
# URL_PREFIX = '/v1'
# def jedge(pred, node, label):
# def jnode(node):
# def jtag(tag):
# def jtags(tags):
#     def get(self):
#     def get(self, p):
#     def get(self, v):
#     def get(self, v):
#     def get(self, v):
# class Version(Resource):
# class Tags(Resource):
# class Splits(Resource):
# class Parse_Presegmented(Resource):
# class Presegmented(Resource):


import logging
import os.path
import sys
from logging.handlers import RotatingFileHandler
from sanskrit_parser.rest_api.flask_helper import app  # noqa: E402
from sanskrit_parser.rest_api import api_v1  # noqa: E402


LOG_FILENAME = "SanskritParserApi.log"
LOG_FORMAT = "%(levelname)s: %(asctime)s {%(filename)s:%(lineno)d}: %(message)s "
formatter = logging.Formatter(LOG_FORMAT)
handler = RotatingFileHandler(LOG_FILENAME, maxBytes=10000000, backupCount=5)
handler.setLevel(logging.DEBUG)
handler.setFormatter(formatter)
logging.getLogger(' ').addHandler(handler)

console = logging.StreamHandler()
console.setLevel(logging.INFO)
# set a format which is simpler for console use
formatter = logging.Formatter('%(levelname)-8s %(message)s')
# tell the handler to use this format
console.setFormatter(formatter)
# add the handler to the root logger
logging.getLogger(' ').addHandler(console)

params = {
    'port': 9000,
}


def setup_app():
    app.register_blueprint(api_v1.api_blueprint, url_prefix="/sanskrit_parser")


def main(argv):
    setup_app()

# Path: sanskrit_parser/rest_api/flask_helper.py
# def index():
# def site_map():
# 
# Path: sanskrit_parser/rest_api/api_v1.py
# URL_PREFIX = '/v1'
# def jedge(pred, node, label):
# def jnode(node):
# def jtag(tag):
# def jtags(tags):
#     def get(self):
#     def get(self, p):
#     def get(self, v):
#     def get(self, v):
#     def get(self, v):
# class Version(Resource):
# class Tags(Resource):
# class Splits(Resource):
# class Parse_Presegmented(Resource):
# class Presegmented(Resource):


# Path: sanskrit_parser/rest_api/run.py
import logging
import os.path
import sys
from logging.handlers import RotatingFileHandler
from sanskrit_parser.rest_api.flask_helper import app  # noqa: E402
from sanskrit_parser.rest_api import api_v1  # noqa: E402



LOG_FILENAME = "SanskritParserApi.log"
LOG_FORMAT = "%(levelname)s: %(asctime)s {%(filename)s:%(lineno)d}: %(message)s "
formatter = logging.Formatter(LOG_FORMAT)
handler = RotatingFileHandler(LOG_FILENAME, maxBytes=10000000, backupCount=5)
handler.setLevel(logging.DEBUG)
handler.setFormatter(formatter)
logging.getLogger(' ').addHandler(handler)

console = logging.StreamHandler()
console.setLevel(logging.INFO)
# set a format which is simpler for console use
formatter = logging.Formatter('%(levelname)-8s %(message)s')
# tell the handler to use this format
console.setFormatter(formatter)
# add the handler to the root logger
logging.getLogger(' ').addHandler(console)

params = {
    'port': 9000,
}


def setup_app():
    app.register_blueprint(api_v1.api_blueprint, url_prefix="/sanskrit_parser")


def main(argv):
    setup_app()

    app.run(