WebScriptsClient (version 0.0.1) | index webscriptsclient.py |
This package implements the "official" WebScripts client.
This package implements client for default WebScripts features.
~# python WebScriptsClient.py -v -u Admin -p Admin test http://127.0.0.1:8000/web/
~# python WebScriptsClient.py -v -u Admin -p Admin download -f "LICENSE.txt" "LICENSE.txt" http://127.0.0.1:8000/web/
~# python WebScriptsClient.py -v -u Admin -p Admin download -s -f "LICENSE.txt" "LICENSE.txt" http://127.0.0.1:8000/web/
~# python WebScriptsClient.py -v -u Admin -p Admin download -o test.txt -f "LICENSE.txt" "LICENSE.txt" http://127.0.0.1:8000/web/
-# python -c "print('test')" > test.txt
~# python WebScriptsClient.py -v -u Admin -p Admin upload -r 1000 -w 1000 -d 1000 -f test.txt test.txt http://127.0.0.1:8000/web/
~# python WebScriptsClient.py -v -u Admin -p Admin upload -6 -b -C -H -c dGVzdA== test.txt http://127.0.0.1:8000/web/
~# python -c "print('test')" | python WebScriptsClient.py -v -u Admin -p Admin upload test.txt http://127.0.0.1:8000/web/
~# python WebScriptsClient.py -v -u Admin -P request -s title -n Maurice -r request -c 500 http://127.0.0.1:8000/web/
~# python WebScriptsClient.py -v -A exec "test_config.py" http://127.0.0.1:8000/web/
~# python -c "print('test')" | python WebScriptsClient.py -v -u Admin -p Admin exec "test_config.py" -o test.txt -I http://127.0.0.1:8000/web/
~# python -c "print('test')" > test.txt
~# python WebScriptsClient.py -v -u Admin -p Admin exec "test_config.py" -I test.txt http://127.0.0.1:8000/web/
~# python WebScriptsClient.py -v -u Admin -p Admin exec "test_config.py --test test3 --test4 -t" -i "test1" "test2" http://127.0.0.1:8000/web/
~# python WebScriptsClient.py -v info http://127.0.0.1:8000/web/
~# python WebScriptsClient.py -a AdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdminAdmin info -a -c -d -s "test_config.py" "/auth/" http://127.0.0.1:8000/web/
>>> client = WebScriptsClient("http://127.0.0.1:8000/web/", username="user", password="pass", api_key="api key")
>>> client.auth()
>>> scripts = client.get_scripts(refresh=False)
>>> client.upload("upload.txt", open("upload.txt"), no_compression=False, is_base64=False, hidden=False, binary=False, read_permissions=0, write_permissions=1000, delete_permissions=1000)
>>> file = client.download("upload.txt", save=True)
>>> client.request("Access", "I need access to test_config.py", "Maurice LAMBERT", error_code=500)
>>> arguments = client.args_command_to_webscripts(["--test", "test1", "test3"])
>>> inputs = client.args_command_to_webscripts(["--test", "test1", "test3"], is_inputs=True)
>>> for output, error, code in client.execute_script("test_config.py", arguments, inputs): print(output, end="")
>>> print(f"Error code: {code}")
>>> print(f"Error: {error}")
Classes | ||||||||||||||||||||||||||||||||||
|
Data | ||
__all__ = ['WebScriptsClient', 'WebScriptsError', 'WebScriptsPermissionsError', 'WebScriptsScriptNotFoundError', 'WebScriptsAuthenticationError'] __annotations__ = {'authopener': <class 'collections.abc.Callable'>, 'logger': <class 'logging.Logger'>, 'logger_critical': <class 'collections.abc.Callable'>, 'logger_debug': <class 'collections.abc.Callable'>, 'logger_error': <class 'collections.abc.Callable'>, 'logger_info': <class 'collections.abc.Callable'>, 'logger_warning': <class 'collections.abc.Callable'>, 'opener': <class 'urllib.request.OpenerDirector'>, 'urlopen': <class 'collections.abc.Callable'>} __author_email__ = 'mauricelambert434@gmail.com' __copyright__ = '\nWebScriptsClient Copyright (C) 2022 Maurice L...ome to redistribute it\nunder certain conditions.\n' __description__ = '\nThis package implements the "official" WebScrip...plements client for default WebScripts features.\n' __license__ = 'GPL-3.0 License' __maintainer__ = 'Maurice Lambert' __maintainer_email__ = 'mauricelambert434@gmail.com' __url__ = 'https://github.com/mauricelambert/WebScriptsClient' |
Author | ||
Maurice Lambert |