vuer.base#

async vuer.base.default_handler(request, ws)[source]#
async vuer.base.websocket_handler(request, handler, **ws_kwargs)[source]#
async vuer.base.handle_file_request(request, root, filename=None)[source]#
class vuer.base.Server[source]#

Base TCP server

host = Proto(default='localhost', dtype=<class 'str'>, help=":str 'localhost' ", metavar='\x08')#
cors = Proto(default='*', dtype=<class 'str'>, help=":str '*' Enable CORS", metavar='\x08')#
port = Proto(default=8012, dtype=<class 'int'>, help=':int 8012 ', metavar='\x08')#
cert = Proto(default=None, dtype=<class 'str'>, help=':str None the path to the SSL certificate', metavar='\x08')#
key = Proto(default=None, dtype=<class 'str'>, help=':str None the path to the SSL key', metavar='\x08')#
ca_cert = Proto(default=None, dtype=<class 'str'>, help=':str None the trusted root CA certificates', metavar='\x08')#
WEBSOCKET_MAX_SIZE: int = Proto(default=268435456, dtype=<class 'int'>, help=':int 268435456 maximum size for websocket requests.', metavar='\x08')#
REQUEST_MAX_SIZE: int = Proto(default=268435456, dtype=<class 'int'>, help=':int 268435456 maximum size for requests.', metavar='\x08')#
__post_init__()[source]#
_route(path: str, handler: callable, method: str = 'GET')[source]#
Parameters:
  • path (str) –

  • handler (callable) –

  • method (str) –

_socket(path: str, handler: callable)[source]#
Parameters:
  • path (str) –

  • handler (callable) –

static _add_task(fn: Coroutine, name=None)[source]#
Parameters:

fn (Coroutine) –

_static(path, root)[source]#
_static_file(path, root, filename=None)[source]#
run()[source]#
__annotations__ = {'REQUEST_MAX_SIZE': <class 'int'>, 'WEBSOCKET_MAX_SIZE': <class 'int'>}#