Python fast downloader
Project description
INSTALLATION
pip install aioxdl
USAGE
import asyncio
from aioxdl.modules import Aioxdl
from aioxdl.modules import Filename
async def progress(tsize, dsize, stime):
# stime = start_time
# tsize = total_size
# dsize = download_size
percentage = round((dsize / tsize) * 100, 2)
print("\rCOMPLETED : {}%".format(percentage), end="", flush=True)
async def main():
core = Aioxdl(timeout=2000)
link = "https://example.link/file.txt"
loca = await Filename.filename(link)
file = await core.download(link, loca.result, progress=progress, progress_args=(time.time()))
fine = file.result if file.errors == None else file.errors
print(fine)
asyncio.run(main())
GET FILENAME
from aioxdl.modules import Filename
async def main():
link = "https://example.link/file.txt"
name = await Filename.get(link)
print(name.result)
asyncio.run(main())
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
aioxdl-0.0.30b2.tar.gz
(8.8 kB
view hashes)
Built Distribution
Close
Hashes for aioxdl-0.0.30b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce5654ec62c502db867c30df419eed3125801feef63d228507fb21f4fe474a3d |
|
MD5 | fc990b9be6a07ff19997389a145a4710 |
|
BLAKE2b-256 | 21814ea82dd45e9d60646b373e513f9462ef04af0d8650b22b869b4e3d430d19 |