Skip to main content

📦 AIOXDL

telegram badge telegram badge telegram badge

USAGE

Installation
pip install aioxdl
Quick start
import asyncio
from aioxdl.modules import Aioxdl
from aioxdl.functions import AioxdlTimeout

# tsize = total size
# dsize = downloaded size

async def progress(tsize, dsize):
    percentage = round((dsize / tsize) * 100, 2)
    print(f"COMPLETED : {percentage}%")

async def main():
    try:
        core = Aioxdl(timeout=2000)
        link = "https://example.in/file.txt"
        file = await core.download(link, progress=progress)
        print(file)
    except AioxdlTimeout as errors:
        print(errors)
    except Exception as errors:
        print(errors)

asyncio.run(main())
Set location
import asyncio
from aioxdl.modules import Aioxdl
from aioxdl.functions import AioxdlTimeout

# tsize = total size
# dsize = downloaded size

async def progress(tsize, dsize):
    percentage = round((dsize / tsize) * 100, 2)
    print(f"COMPLETED : {percentage}%")

async def main():
    try:
        path = "/Downloads"
        core = Aioxdl(timeout=2000)
        link = "https://example.in/file.txt"
        file = await core.download(link, location=path, progress=progress)
        print(file)
    except AioxdlTimeout as errors:
        print(errors)
    except Exception as errors:
        print(errors)

asyncio.run(main())
Set filename
import asyncio
from aioxdl.modules import Aioxdl
from aioxdl.functions import AioxdlTimeout

# tsize = total size
# dsize = downloaded size

async def progress(tsize, dsize):
    percentage = round((dsize / tsize) * 100, 2)
    print(f"COMPLETED : {percentage}%")

async def main():
    try:
        name = "Clinton Abraham"
        core = Aioxdl(timeout=2000)
        link = "https://example.in/file.txt"
        file = await core.download(link, filename=name, progress=progress)
        print(file)
    except AioxdlTimeout as errors:
        print(errors)
    except Exception as errors:
        print(errors)

asyncio.run(main())
Stop download
import asyncio
from aioxdl.modules import Aioxdl
from aioxdl.functions import Cancelled
from aioxdl.functions import AioxdlTimeout

TASK_IDS = []

# tsize = total size
# dsize = downloaded size

async def progress(tsize, dsize, tuid):
    if tuid in TASK_IDS:
        percentage = round((dsize / tsize) * 100, 2)
        print(f"COMPLETED : {percentage}%")
    else:
        raise Cancelled("Cancelled ❌")

async def main():
    try:
        tuid = 1234567890
        TASK_IDS.append(tuid)
        core = Aioxdl(timeout=2000)
        link = "https://example.in/file.txt"
        file = await core.download(link, progress=progress, progress_args=(tuid))
        print(file)
    except AioxdlTimeout as errors:
        print(errors)
    except Cancelled as cancelled:
        print(cancelled)
    except Exception as errors:
        print(errors)

asyncio.run(main())

Metadata

Release files for aioxdl 0.0.31

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aioxdl 0.0.31
File Size Uploaded
aioxdl-0.0.31.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aioxdl 0.0.31
File Interpreter ABI Platform
aioxdl-0.0.31-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / aioxdl-0.0.31.tar.gz

Download URL aioxdl-0.0.31.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ec992629f5d053360853a8306e909bd2629afe04a985216c8e1837f4240e2163
BLAKE2b-256 checksum
How to use checksums
9e40fb4fd28e011019873f88465e70a863aea239c13acbddb558ae882809d5f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release files / aioxdl-0.0.31-py3-none-any.whl

Download URL aioxdl-0.0.31-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5402f4d860fad2ad0c44d2a1e423879298ea84eb9af64a5b7c5177be10f415cf
BLAKE2b-256 checksum
How to use checksums
ec12f62148a35b01cd67948e3ccac029d73d9986923cf911b00b206e49300d61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release history Release notifications | RSS feed

This release

0.0.31 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page