Tool to build CLI like web application
Project description
Index
Concepts
Async Action
An async action, like the name implies, prepresent an async action.
- When an async action is created, request field stores the context on what is action is about. It is a JSON object.
- When an async action is completed -- either successfully or failed, the response field store the action result. It is a JSON object
- Once an async 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
CLIHandler
| Name | Async | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
async_start_async_action
|
YES |
Create an async action. It returns a tuple of status and async action being created. status type is AsyncActionOpStatus.
If async action is created successfully, status will be AsyncActionOpStatus.OK, and an async action will be returned, the returned async action has already been saved to database.CLIHandler rely on a list of customer defined handlers to handle the request. handler's can_handle method looks at the action's request and judge if it can handle it or not.Once an async action is created, the handler's handle method has been scheduled in a threadpool. The handler's handle method is suppose to take care of the execution of the async actionHere is a list of possible status based on status
|
||||||||||
async_update_progress_async_action
|
YES |
Update an async ation's progress, wake up all monitoring client against this async action. Here is a list of possible status based on status
|
||||||||||
async_complete_async_action
|
YES |
Complete an async ation and set it's result, wake up all monitoring client against this async action. Here is a list of possible status based on status
|
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.2.tar.gz
(68.3 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.2-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file webcli2-0.0.2.tar.gz.
File metadata
- Download URL: webcli2-0.0.2.tar.gz
- Upload date:
- Size: 68.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5404af4071dc1c9b36a17fa2abfa77fc761128cb91f74a0649e970bb5d7e03c2
|
|
| MD5 |
773cd315e1b5beb5f0bf9fbf3eccdd0c
|
|
| BLAKE2b-256 |
ec22945c1b42e831043688925cb0aac9a5c2bed3b1fed334f046cf142f92c558
|
File details
Details for the file webcli2-0.0.2-py3-none-any.whl.
File metadata
- Download URL: webcli2-0.0.2-py3-none-any.whl
- Upload date:
- Size: 10.1 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 |
81ce9d468a26207f81c487cb4657ce4229d7866396d30aecc90a4c4c2b9446d3
|
|
| MD5 |
f117f6e3b18a2eeb87000f481e380c90
|
|
| BLAKE2b-256 |
01ceeabc6cf8fc11f6e0ec609a11792e2ae25282c9aa6e19299cd22fccd67b6f
|