Python Async Download Engine.
Project description
Richka - Python Async Download Engine
Richka (From Ukrainian: Рiчка) means river, stands for the download speed of Richka Engine
Usage
import richka
and run script in your code, for example:
import richka
import asyncio
import time
import threading
# Create task controller
controller = richka.Controller()
def download():
global controller
# Create download task
time_used, file_size = asyncio.run(richka.download("https://mirrors.tuna.tsinghua.edu.cn/videolan-ftp/vlc-iOS/3.6.4/VLC-iOS.ipa", "VLC-iOS.ipa", controller))
# Result
print("Time used:", time_used)
print(f"Speed: {file_size / time_used / pow(1024, 2)}MiB/s")
def main():
global controller
# Progress monitor
while controller.status:
if controller.status == 1:
print(f"Download Progress: {round(controller.progress, 2)}% \r", end="")
time.sleep(0.1)
if __name__ == "__main__":
threading.Thread(target=download).start()
main()
Then you'll get a file from Internet :D.
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
richka-0.0.2.tar.gz
(5.6 kB
view details)
Built Distribution
File details
Details for the file richka-0.0.2.tar.gz
.
File metadata
- Download URL: richka-0.0.2.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 501484ac5f6f4fdfe51ce3cb9e90b8e1b39ccddf14d2e4cab87f957e5e5af747 |
|
MD5 | 32a784fe19d4b45b6c31510bca3b2de1 |
|
BLAKE2b-256 | efc9cc150838847011f564c3dd5b4ffddf5ca47c31eed3264a00d7d5e9a60303 |
File details
Details for the file richka-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: richka-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c0fdd2fe9ca9846e8bd9c804c6c1a3a4854dcf35c7972b769d416d5fbacb460 |
|
MD5 | bf6fd5b79df38917a8fff7a32ac0bf02 |
|
BLAKE2b-256 | 8d46b4a167679e619a4dc08a31086cc505496bebb290205d339ccc5fb76f1e06 |