<p align="center">
📦 <a href="https://pypi.org/project/aioxdl" style="text-decoration:none;">AIO DOWNLOADER</a>
</p>
<p align="center">
<a href="https://telegram.me/clinton_abraham"><img src="https://img.shields.io/badge/𝑪𝒍𝒊𝒏𝒕𝒐𝒏 𝑨𝒃𝒓𝒂𝒉𝒂𝒎-30302f?style=flat&logo=telegram" alt="telegram badge"/></a>
<a href="https://telegram.me/Space_x_bots"><img src="https://img.shields.io/badge/Sᴘᴀᴄᴇ ✗ ʙᴏᴛꜱ-30302f?style=flat&logo=telegram" alt="telegram badge"/></a>
<a href="https://telegram.me/sources_codes"><img src="https://img.shields.io/badge/Sᴏᴜʀᴄᴇ ᴄᴏᴅᴇꜱ-30302f?style=flat&logo=telegram" alt="telegram badge"/></a>
</p>
## INSTALLATION
```bash
pip install aioxdl
```
## USAGE
```python
import time
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
```python
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())
```
## STOP DOWNLOAD
```python
import time
import asyncio
from aioxdl.modules import Aioxdl
from aioxdl.modules import Filename
from aioxdl.functions import Cancelled
TASK_ID = []
async def progress(tsize, dsize, stime, tuid):
# stime = start_time
# tsize = total_size
# dsize = download_size
if tuid in TASK_ID:
percentage = round((dsize / tsize) * 100, 2)
print("\rCOMPLETED : {}%".format(percentage), end="", flush=True)
else:
raise Cancelled("Cancelled ❌")
async def main():
tims = time.time()
tuid = 1234567890
TASK_ID.append(tuid)
core = Aioxdl(timeout=2000)
link = "https://example.uri/file.txt"
loca = await Filename.filename(link)
file = await core.download(link, loca.result,
progress=progress, progress_args=(tims, tuid))
if file.status == 400:
print(file.errors)
elif file.status == 300:
print("Cancelled ❌")
else:
print(fine.result)
asyncio.run(main())
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Clinton-Abraham",
"name": "aioxdl",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.10",
"maintainer_email": null,
"keywords": "python, downloader, aiohttp",
"author": "Clinton-Abraham",
"author_email": "clintonabrahamc@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ac/4e/e144394e16430f744b1d074812bdfd1170d64a6589991bcd378fa6cb9a14/aioxdl-0.0.30.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n \ud83d\udce6 <a href=\"https://pypi.org/project/aioxdl\" style=\"text-decoration:none;\">AIO DOWNLOADER</a>\n</p>\n\n<p align=\"center\">\n <a href=\"https://telegram.me/clinton_abraham\"><img src=\"https://img.shields.io/badge/\ud835\udc6a\ud835\udc8d\ud835\udc8a\ud835\udc8f\ud835\udc95\ud835\udc90\ud835\udc8f \ud835\udc68\ud835\udc83\ud835\udc93\ud835\udc82\ud835\udc89\ud835\udc82\ud835\udc8e-30302f?style=flat&logo=telegram\" alt=\"telegram badge\"/></a>\n <a href=\"https://telegram.me/Space_x_bots\"><img src=\"https://img.shields.io/badge/S\u1d18\u1d00\u1d04\u1d07 \u2717 \u0299\u1d0f\u1d1b\ua731-30302f?style=flat&logo=telegram\" alt=\"telegram badge\"/></a>\n <a href=\"https://telegram.me/sources_codes\"><img src=\"https://img.shields.io/badge/S\u1d0f\u1d1c\u0280\u1d04\u1d07 \u1d04\u1d0f\u1d05\u1d07\ua731-30302f?style=flat&logo=telegram\" alt=\"telegram badge\"/></a>\n</p>\n\n## INSTALLATION\n```bash\npip install aioxdl\n```\n\n## USAGE\n\n```python\nimport time\nimport asyncio\nfrom aioxdl.modules import Aioxdl\nfrom aioxdl.modules import Filename\n\nasync def progress(tsize, dsize, stime):\n # stime = start_time\n # tsize = total_size\n # dsize = download_size\n percentage = round((dsize / tsize) * 100, 2)\n print(\"\\rCOMPLETED : {}%\".format(percentage), end=\"\", flush=True)\n\nasync def main():\n core = Aioxdl(timeout=2000)\n link = \"https://example.link/file.txt\"\n loca = await Filename.filename(link)\n file = await core.download(link, loca.result, progress=progress, progress_args=(time.time()))\n fine = file.result if file.errors == None else file.errors\n print(fine)\n\nasyncio.run(main())\n```\n\n## GET FILENAME\n```python\nfrom aioxdl.modules import Filename\n\nasync def main():\n link = \"https://example.link/file.txt\"\n name = await Filename.get(link)\n print(name.result)\n\nasyncio.run(main())\n```\n\n\n## STOP DOWNLOAD\n```python\nimport time\nimport asyncio\nfrom aioxdl.modules import Aioxdl\nfrom aioxdl.modules import Filename\nfrom aioxdl.functions import Cancelled\n\nTASK_ID = []\n\nasync def progress(tsize, dsize, stime, tuid):\n # stime = start_time\n # tsize = total_size\n # dsize = download_size\n if tuid in TASK_ID:\n percentage = round((dsize / tsize) * 100, 2)\n print(\"\\rCOMPLETED : {}%\".format(percentage), end=\"\", flush=True)\n else:\n raise Cancelled(\"Cancelled \u274c\")\n\nasync def main():\n tims = time.time()\n tuid = 1234567890\n TASK_ID.append(tuid)\n core = Aioxdl(timeout=2000)\n link = \"https://example.uri/file.txt\"\n loca = await Filename.filename(link)\n file = await core.download(link, loca.result,\n progress=progress, progress_args=(tims, tuid))\n if file.status == 400:\n print(file.errors)\n elif file.status == 300:\n print(\"Cancelled \u274c\")\n else:\n print(fine.result)\n\nasyncio.run(main())\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python fast downloader",
"version": "0.0.30",
"project_urls": {
"Homepage": "https://github.com/Clinton-Abraham"
},
"split_keywords": [
"python",
" downloader",
" aiohttp"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ae3e1f7228bec51866fa5f449021af32bbad55f1be69bf4b38e2c82cb641005d",
"md5": "bafae53024d0a4715785753755e483b8",
"sha256": "8cd9e443424a410fb335965a334ed46b77ec6c8d8dd62d6cf7d9655510e64813"
},
"downloads": -1,
"filename": "aioxdl-0.0.30-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bafae53024d0a4715785753755e483b8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.10",
"size": 10040,
"upload_time": "2024-10-17T12:25:15",
"upload_time_iso_8601": "2024-10-17T12:25:15.710448Z",
"url": "https://files.pythonhosted.org/packages/ae/3e/1f7228bec51866fa5f449021af32bbad55f1be69bf4b38e2c82cb641005d/aioxdl-0.0.30-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ac4ee144394e16430f744b1d074812bdfd1170d64a6589991bcd378fa6cb9a14",
"md5": "2e3e7249df906a4730f00f7d52db45b4",
"sha256": "fb489e1ec93480d76cfbf72cc19b8c39eea7b2a36fff86a8a438f6ef2a52d78b"
},
"downloads": -1,
"filename": "aioxdl-0.0.30.tar.gz",
"has_sig": false,
"md5_digest": "2e3e7249df906a4730f00f7d52db45b4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.10",
"size": 9146,
"upload_time": "2024-10-17T12:25:17",
"upload_time_iso_8601": "2024-10-17T12:25:17.229834Z",
"url": "https://files.pythonhosted.org/packages/ac/4e/e144394e16430f744b1d074812bdfd1170d64a6589991bcd378fa6cb9a14/aioxdl-0.0.30.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-17 12:25:17",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "aioxdl"
}