httpserver

The http module contains the API web server. This is a lightweight web server used by remotes to interact with OpenLP. It uses JSON to communicate with the remotes.

class openlp.plugins.remotes.lib.httpserver.CustomHandler(request, client_address, server)[source]

Bases: http.server.BaseHTTPRequestHandler, openlp.plugins.remotes.lib.httprouter.HttpRouter

Stateless session handler to handle the HTTP request and process it. This class handles just the overrides to the base methods and the logic to invoke the methods within the HttpRouter class. DO not try change the structure as this is as per the documentation.

do_GET()[source]

Present pages / data and invoke URL level user authentication.

do_POST()[source]

Present pages / data and invoke URL level user authentication.

class openlp.plugins.remotes.lib.httpserver.HttpThread(server)[source]

Bases: PyQt5.QtCore.QThread

A special Qt thread class to allow the HTTP server to run at the same time as the UI.

run()[source]

Run the thread.

stop()[source]
class openlp.plugins.remotes.lib.httpserver.OpenLPServer[source]

Bases: openlp.core.common.registryproperties.RegistryProperties

start_server()[source]

Start the correct server and save the handler

start_server_instance(address, port, server_class)[source]

Start the server

Parameters:
  • address – The server address
  • port – The run port
  • server_class – the class to start
stop_server()[source]

Stop the server

class openlp.plugins.remotes.lib.httpserver.ThreadingHTTPServer(server_address, RequestHandlerClass, bind_and_activate=True)[source]

Bases: socketserver.ThreadingMixIn, http.server.HTTPServer