A sample tool by MinWei
Project description
minwei_tools
This tools contain 3 major function
- Dotter : Display animated text on screen during long missions
- re_result : A Rust-like approach to error handling
- server : A file transfer server
- us_doc : A
uvdoc generator
Install
pip install minwei_tools
Usage
-
File Transfer server
python -m minwei_tools.server -p {port} -h {host}
-
Dotter
from minwei_tools import Dotter, piano, slash from time import sleep with Dotter(message="[*] Testing 1", cycle=slash, delay=0.1, show_timer=1) as d: sleep(10) d.update_message("[-] Testing 2", delay=0.1) sleep(2)
Also support an
asyncdotterfrom time import sleep import asyncio from minwei_tools import AsyncDotter async def main(): async with AsyncDotter("Thinking", show_timer=True, delay=0.1): await asyncio.sleep(120) asyncio.run(main())
-
rs_result
from minwei_tools.rs_result import Result, Ok, Err def devide(a: int, b: int) -> Result[int, str]: if b == 0: return Err("Division by zero error") return Ok(a // b) """ >>> result : Result[int, str] = devide(10, 0) >>> result.is_ok() False >>> result.is_err() >>> result : Result[int, str] = devide(10, 2) >>> result.is_ok() True >>> result.unwrap() 5 """ result : Result[int, str] = devide(10, 0) match result: case Ok(value): print(f"Result: {value}") case Err(value): print(f"Error: {value}") result : Result[int, str] = devide(10, 2) match result: case Ok(value): print(f"Result: {value}") case Err(value): print(f"Error: {value}")
-
uv doc
python -m minwei_tools.uv_doc -p {PROJECT_NAME}
-h, --help show this help message and exit -p PROJECT_NAME, --project_name PROJECT_NAME Name of the project. Defaults to the current directory name. -o OUTPUT, --output OUTPUT Output file name. Defaults to README.md. -d DIRECTORY, --directory DIRECTORY Directory to scan. Defaults to the current working directory.
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
minwei_tools-0.1.9.tar.gz
(9.7 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
File details
Details for the file minwei_tools-0.1.9.tar.gz.
File metadata
- Download URL: minwei_tools-0.1.9.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
914e84b8e30a6aef2d31678a30e8c0283265a989eac73f504afac2f8659b5f12
|
|
| MD5 |
55c7c048e6287b7f8979b381a4a755d4
|
|
| BLAKE2b-256 |
339f21830fae146cb6791d44cc7f492fbf7c04f639114a8429c2c304cb7bdb91
|
File details
Details for the file minwei_tools-0.1.9-py3-none-any.whl.
File metadata
- Download URL: minwei_tools-0.1.9-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
608ad3646b2e1d9bd7f6e0e2ae3b0928ad5ed91c7cff8fcd21f2cd50fb633bb8
|
|
| MD5 |
1d501c826bc90010dddaf746713e5929
|
|
| BLAKE2b-256 |
0c44ac3dbc12748c7d02fd785e2e800f54def8e9e1221a70617b6a9d6d88b94e
|