Python fast downloader
Project description
INSTALLATION
pip install aioxdl
USAGE
import asyncio
from aioxdl import Downloader
async def progress(_, stime, tsize, dsize):
# stime = start_time
# tsize = total_size
# dsize = download_size
percentage = round((dsize / tsize) * 100, 2)
print("COMPLETED : {}%".format(percentage))
async def main():
core = Downloader()
loca = "./Downloads/testfile.mkv"
link = "https://example.link/file.txt"
file = await core.start(link, loca, progress=progress)
fine = file if core.error == None else core.error
print(fine)
asyncio.run(main())
GET FILENAME
from aioxdl import Downloader
async def main():
core = Downloader()
link = "https://example.link/file.txt"
name = await core.filename(link)
print(name)
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.12.tar.gz
(7.3 kB
view hashes)