📦 AIOXDL
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aioxdl-0.0.31.tar.gz | 5.7 kB | Without provenance | Details for aioxdl-0.0.31.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aioxdl-0.0.31-py3-none-any.whl | Python 3 | none | any | Details for aioxdl-0.0.31-py3-none-any.whl |
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
|
Security for aioxdl 0.0.31
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.