src/pds_doi_service/api/__main__.py
def main():
    """
    Main entry point for the DOI Service API

    The API connexion application is created using the swagger definition and
    fed to a waitress server instance.
    """
    logger = logging.getLogger(__name__)

    logger.info("Starting PDS DOI Service API")

    config = DOIConfigUtil().get_config()

    # Now that we've parsed config, we can fully set up logging
    logger = get_logger(__name__)
    logging_level = config.get("OTHER", "logging_level", fallback="info")

    logger.info(f"Logging system configured at level {logging_level}")

    # Initialize the Connexion (Flask) application
    app = init_app()

    # Set the log level of waitress to match the configured level
    get_logger("waitress")
    logger.info(f"Waitress logging configured at level {logging_level}")

    try:
        serve(
            app,
            host=config.get("OTHER", "api_host", fallback="0.0.0.0"),
            port=config.get("OTHER", "api_port", fallback=8080),
        )
    except KeyboardInterrupt:
        logger.info("Stopping PDS DOI Service API")

    Main entry point for the DOI Service API

    The API connexion application is created using the swagger definition and
    fed to a waitress server instance.
    
Main entry point for the DOI Service API
The API connexion application is created using the swagger definition and
fed to a waitress server instance.
Main entry point for the DOI Service API The API connexion application is created using the swagger definition and fed to a waitress server instance .
def main():
    logger = logging.getLogger(__name__)
    logger.info("Starting PDS DOI Service API")
    config = DOIConfigUtil().get_config()
    logger = get_logger(__name__)
    logging_level = config.get("OTHER", "logging_level", fallback="info")
    logger.info(f"Logging system configured at level {logging_level}")
    app = init_app()
    get_logger("waitress")
    logger.info(f"Waitress logging configured at level {logging_level}")
    try:
        serve(
            app,
            host=config.get("OTHER", "api_host", fallback="0.0.0.0"),
            port=config.get("OTHER", "api_port", fallback=8080),
        )
    except KeyboardInterrupt:
        logger.info("Stopping PDS DOI Service API")
def main ( ) : logger = logging . getLogger ( __name__ ) logger . info ( "Starting PDS DOI Service API" ) config = DOIConfigUtil ( ) . get_config ( ) logger = get_logger ( __name__ ) logging_level = config . get ( "OTHER" , "logging_level" , fallback = "info" ) logger . info ( f"Logging system configured at level {logging_level}" ) app = init_app ( ) get_logger ( "waitress" ) logger . info ( f"Waitress logging configured at level {logging_level}" ) try : serve ( app , host = config . get ( "OTHER" , "api_host" , fallback = "0.0.0.0" ) , port = config . get ( "OTHER" , "api_port" , fallback = 8080 ) , ) except KeyboardInterrupt : logger . info ( "Stopping PDS DOI Service API" )
Main entry point for the DOI Service API
The API connexion application is created using the swagger definition and
fed to a waitress server instance.
Main entry point for the DOI Service API The API connexion application is created using the swagger definition and fed to a waitress server instance .
"""
    Main entry point for the DOI Service API

    The API connexion application is created using the swagger definition and
    fed to a waitress server instance.
    """ # Now that we've parsed config, we can fully set up logging # Initialize the Connexion (Flask) application # Set the log level of waitress to match the configured level