fasttask_manager
Manager for fasttask
Installation
pip install fasttask_manager
Usage
Create a Manager
Synchronous Manager:
from fasttask_manager import Manager
m = Manager("127.0.0.1", port=8080)
Asynchronous Manager:
import asyncio
from fasttask_manager import AsyncManager
async def main():
am = AsyncManager("127.0.0.1", port=8080)
# use await
result = await am.run(params)
Run a task
result = m.run(params)
Create a task and check result later
result_id = m.create_task(params)
# do something...
result = m.check(result_id)
Create a task and wait for result
result = m.create_and_wait_result(params)
Upload a file
file_name = m.upload("/path/to/file.txt")
Download a file
m.download("file.txt", "/path/to/save.txt")
Revoke a task
m.revoke(result_id)
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| host | str | - | Server host |
| protocol | str | "http" | HTTP protocol |
| port | int | 80 | Server port |
| tries | int | 5 | Max retry attempts |
| delay | int | 3 | Retry delay (seconds) |
| logger | Logger | None | Custom logger |
| log_prefix | str | "" | Log prefix |
| auth_user | str | "" | Basic auth username |
| auth_passwd | str | "" | Basic auth password |
| url_base_path | str | "" | URL base path |
| req_timeout | int | 30 | Request timeout (seconds) |
| simple_error_log | bool | True | Simple error logging |
| verify_ssl | bool | False | Verify SSL certificate |
Architecture
BaseManager (shared initialization and utilities)
├── Manager (synchronous implementation)
│ ├── _req: uses requests library
│ └── _wait: uses time.sleep
└── AsyncManager (asynchronous implementation)
├── _req: uses httpx async client
└── _wait: uses asyncio.sleep
Release files for fasttask-manager 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fasttask_manager-0.5.0.tar.gz | 8.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fasttask_manager-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.4 kB
Release files / fasttask_manager-0.5.0.tar.gz
| Download URL | fasttask_manager-0.5.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83a2eb4e771d1924d903948f2e9777ae9ad44d1c8e5eb278d4c4ad377bd99edc
|
|
BLAKE2b-256 checksum How to use checksums |
b9ab470e9ded4142c58dd9894b9aa8786fd9b56cbb6183ff73b4c0e4d10cf80f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / fasttask_manager-0.5.0-py3-none-any.whl
| Download URL | fasttask_manager-0.5.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35bc23ff802fb2e9307d07d59678ba69696dead60a4b69e003c54b6e9872a773
|
|
BLAKE2b-256 checksum How to use checksums |
c3f6582ae3a96d1ebbd0a82c23b58d572d41c90b4600a0f27d062bd0ffbc0272
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|