Tool to build CLI like web application
Project description
Index
Concepts
Action
Represent an action:
- When an action is created, request field stores the context on what is action is about. It is a JSON object.
- When an action is completed -- either successfully or failed, the response field store the action result. It is a JSON object
- Once an action is created, before it is completed, you can update the progress information, it is stored in progress field. It is a JSON field.
APIs
ActionHandler
- The
can_handlermethod tells if a handler can handle an action or not - The
handlemethod actually handles the action
CLIHandler
| Name | Async | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
async_start_action | YES |
Create an action. It returns a tuple of status and action being created.
If action is created successfully, status will be CLIHandlerStatus.OK, and the newly created action will be returned, the returned action has already been saved to database.CLIHandler will find the first action handler which can handle the action to handler it, or it will fail with NO_HANDLER.Once an action is created, the handler's handle method has been scheduled in a threadpool. The action handler's handle method is suppose to take care of the execution of the actionHere is a list of possible status based on status
|
||||||||||
async_update_action | YES |
Update an ation's progress, wake up all monitoring client against this action. Here is a list of possible status based on status
|
||||||||||
async_complete_action |
YES |
Complete an ation and set it's result, wake up all monitoring client against this action. Here is a list of possible status based on status
|
||||||||||
async_wait_for_action_update | YES | wait for an action to be updated or completed Here is a list of possible status based on status
|
||||||||||
start_action | No | non-async version of async_start_action |
||||||||||
update_action | No | non-async version of async_update_action |
||||||||||
complete_action | No | non-async version of async_complete_action |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
webcli2-0.0.7.tar.gz
(68.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
webcli2-0.0.7-py3-none-any.whl
(10.4 kB
view details)
File details
Details for the file webcli2-0.0.7.tar.gz.
File metadata
- Download URL: webcli2-0.0.7.tar.gz
- Upload date:
- Size: 68.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2a4925f4a6d72d4540fa71c1d7a8dc7abbb8745572c7db01412edcac8274964
|
|
| MD5 |
0279944c2107c035c24c90a83d89620f
|
|
| BLAKE2b-256 |
e164ea93916e435275832049b8eeb5b39845b3a6dc3c462fa251779b9ee60da3
|
File details
Details for the file webcli2-0.0.7-py3-none-any.whl.
File metadata
- Download URL: webcli2-0.0.7-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4c71c27fb2d79893c5f401c503bdc9c866a8ac34c60e4cf99eca17a29887d9f
|
|
| MD5 |
c705fe7021328454d0f85f8479ac6a09
|
|
| BLAKE2b-256 |
1123dbda321c7f06605cb6b06f4890d57980ea80c4af5cac61aa200f9ca99468
|