Classes | |
| class | StandaloneApplication |
Functions | |
| def | all_exception_handler (error) |
| def | initialize () |
| def | run_loop () |
| def | set_datapack () |
| def | get_datapack () |
| def | reset () |
| def | shutdown () |
| Namespace | parse_arguments () |
| bool | is_port_in_use (str address, int port) |
| int | find_free_port () |
| tuple | extract_hostname_port_from_url (str url) |
| None | register_in_regserver (str regserver_url, str engine_name, str hostname, int port) |
| dict | parse_extra_options (str options_str) |
| dict | prepare_options (str extra_options, str hostname, int port) |
Variables | |
| int | DEFAULT_TIMEOUT = 90 |
| int | DEFAULT_WORKERS = 1 |
| log = logging.getLogger("werkzeug") | |
| app = Flask(__name__) | |
| Namespace | args = parse_arguments() |
| hostname | |
| port | |
| dict | options = prepare_options(args.options, hostname, port) |
| def python_json_engine.all_exception_handler | ( | error | ) |
Custom error handler for error code 500. The default handler returns a html response, which doesn't look very nice when printed to terminal.
| tuple python_json_engine.extract_hostname_port_from_url | ( | str | url | ) |
| int python_json_engine.find_free_port | ( | ) |
Returns a random free port number
| def python_json_engine.get_datapack | ( | ) |
| def python_json_engine.initialize | ( | ) |
| bool python_json_engine.is_port_in_use | ( | str | address, |
| int | port | ||
| ) |
Checks if given port is already in use
| Namespace python_json_engine.parse_arguments | ( | ) |
| dict python_json_engine.parse_extra_options | ( | str | options_str | ) |
Parses the extra server options passed by the user
Expected format is a python dict: '{ "option1": value1, "option2": value2 }'
| dict python_json_engine.prepare_options | ( | str | extra_options, |
| str | hostname, | ||
| int | port | ||
| ) |
Prepares the dictionary with options for the server application
| None python_json_engine.register_in_regserver | ( | str | regserver_url, |
| str | engine_name, | ||
| str | hostname, | ||
| int | port | ||
| ) |
Registers in the registration server of the client
| def python_json_engine.reset | ( | ) |
| def python_json_engine.run_loop | ( | ) |
| def python_json_engine.set_datapack | ( | ) |
| def python_json_engine.shutdown | ( | ) |
| python_json_engine.app = Flask(__name__) |
| Namespace python_json_engine.args = parse_arguments() |
| int python_json_engine.DEFAULT_TIMEOUT = 90 |
| int python_json_engine.DEFAULT_WORKERS = 1 |
| python_json_engine.hostname |
| python_json_engine.log = logging.getLogger("werkzeug") |
| dict python_json_engine.options = prepare_options(args.options, hostname, port) |
| python_json_engine.port |