Pages (version 2.0.0)
index
pages.py

This tool runs CLI scripts and displays output in a Web Interface.
 
This file implement Pages (Api and Web system), script execution and right
system.

 
Modules
       
ntpath

 
Classes
       
builtins.object
Pages

 
class Pages(builtins.object)
    This class implement Web Pages for WebScripts server.
 
  Methods defined here:
__call__(self, environ: os._Environ, user: commons.User, server: ~Server, filename: str, commande: List[str], inputs: List[str], csrf_token: str = None) -> Tuple[str, Dict[str, str], bytes]
A redirect page (Error code 301, javascript redirect and redirect
title) to /web/ or /api/.
auth(self, environ: os._Environ, user: commons.User, server: ~Server, filename: str, commande: List[str], inputs: List[str], csrf_token: str = None) -> Tuple[str, Dict[str, str], bytes]
This function return check auth and return headers, error and page.
js(self, environ: os._Environ, user: commons.User, server: ~Server, filename: str, commande: List[str], inputs: List[str], csrf_token: str = None) -> Tuple[str, Dict[str, str], Union[bytes, Iterable[bytes]]]
This function get Javascripts Scripts and send it.
reload(self, environ: os._Environ, user: commons.User, server: ~Server, filename: str, commande: List[str], inputs: List[str], csrf_token: str = None) -> Tuple[str, Dict[str, str], str]
This function is a simple URL to reload scripts
(useful for developpers to add/modify a script).
static(self, environ: os._Environ, user: commons.User, server: ~Server, filename: str, commande: List[str], inputs: List[str], csrf_token: str = None) -> Tuple[str, Dict[str, str], Union[bytes, Iterable[bytes]]]
This function get static file and send it.

Static methods defined here:
webfile(files: Dict[str, commons.CallableFile], user: commons.User, filename: str, base: str) -> Tuple[str, Dict[str, str], Union[bytes, Iterable[bytes]]]
This function builds response for Web files.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
__annotations__ = {'ip_blacklist': typing.Dict[str, commons.Blacklist], 'js_paths': typing.Dict[str, commons.CallableFile], 'packages': <class 'utils.DefaultNamespace'>, 'processes': typing.Dict[str, Pages.Process], 'scripts': typing.Dict[str, commons.ScriptConfig], 'sessions': typing.Dict[int, commons.Session], 'statics_paths': typing.Dict[str, commons.CallableFile], 'user_blacklist': typing.Dict[str, commons.Blacklist]}
api = <Pages.Api object>
ip_blacklist = {}
processes = {}
sessions = {}
user_blacklist = {}
web = <Pages.Web object>

 
Data
        __all__ = ['Pages']
__author_email__ = 'mauricelambert434@gmail.com'
__copyright__ = '\nWebScripts Copyright (C) 2021, 2022, 2023 Mau...ome to redistribute it\nunder certain conditions.\n'
__description__ = '\nThis tool runs CLI scripts and displays output ... Web system), script execution and right\nsystem.\n'
__license__ = 'GPL-3.0 License'
__maintainer__ = 'Maurice Lambert'
__maintainer_email__ = 'mauricelambert434@gmail.com'
__url__ = 'https://github.com/mauricelambert/WebScripts'

 
Author
        Maurice Lambert