Skip to main content

python wheel for aria2 static build.

Project description

Aria2 Wheel

python wheel for aria2 static build

CI/CD CI: lint-test pre-commit.ci status
CI: docs CI: publish
Code codecov Code style: black Ruff Checked with pyright
Package PyPI - Version PyPI - Downloads PyPI - Python Version
Meta Hatch project GitHub License

Documentation: https://wsh032.github.io/aria2-wheel/

Source Code: https://github.com/WSH032/aria2-wheel/


Introduction

aria2 is a lightweight multi-protocol & multi-source command-line download utility.

It's easy to install aria2 on Linux (apt install aria2), however it's not easy to install aria2 on Windows (at least can't one-click to install).

So I build this python wheel to binding aria2 static build. You can install it by pip from pypi on Windows.

Now, we support:

  • manylinux_2_17_x86_64
  • musllinux_1_1_x86_64
  • manylinux_2_17_aarch64
  • musllinux_1_1_aarch64
  • win_amd64
  • win32

Features

aria2-wheel internally bundles the aria2c binary and utilizes the entry_point technology.

Therefore, it does not modify your system's PATH environment variable, and there is no need for sudo permissions.

You can completely uninstall it by running pip uninstall aria2.

Credits

  • aria2
    • This project is not aria2 official project.
  • aria2-static-build
    • The bound aria2 executable file directly comes from aria2-static-build project, and aria2-wheel assumes no responsibility for your use.
    • The license of aria2-wheel project is consistent with aria2-static-build project.

check hatch_build.py and .github/workflows/publish.yml to know how we build the wheel.

Install

pip install aria2

or install in global environment with pipx

# https://pypa.github.io/pipx/
pipx install aria2

Usage

cli usage

All api is the same as aria2

aria2c --help

or

python -m aria2c --help

ctrl + c , ctrl + break , kill <pid> will work well, even exit code.

subprocess.Popen

Do not shutdown the subprocess by Popen.terminate() or Popen.kill(), which can not shutdown aria2 subprocess properly.

Use following code instead:

import os
import signal
import subprocess
import sys
from subprocess import Popen
from typing import TypedDict


class Win32PopenKwargs(TypedDict):
    """Popen kwargs for Windows."""

    creationflags: int


class UnixPopenKwargs(TypedDict):
    """Popen kwargs for Unix."""

    start_new_session: bool


popen_kwargs = (
    UnixPopenKwargs(start_new_session=True)
    if sys.platform != "win32"
    else Win32PopenKwargs(creationflags=subprocess.CREATE_NEW_PROCESS_GROUP)
)


with Popen(args=("aria2c", "--enable-rpc"), **popen_kwargs) as p:
    try:
        # Do whatever you want here.
        ...
    finally:
        # following code can shutdown the subprocess gracefully.
        if sys.platform == "win32":
            # https://stackoverflow.com/questions/44124338/trying-to-implement-signal-ctrl-c-event-in-python3-6
            os.kill(p.pid, signal.CTRL_BREAK_EVENT)
        else:
            os.killpg(os.getpgid(p.pid), signal.SIGINT)

development

English is not the native language of the author (me), so if you find any areas for improvement in the documentation, your feedback is welcome.

If you think this project helpful, consider giving it a star GitHub Repo stars, which makes me happy. :smile:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aria2-0.0.1b0.tar.gz (37.4 kB view details)

Uploaded Source

Built Distributions

aria2-0.0.1b0-py3-none-win_amd64.whl (2.7 MB view details)

Uploaded Python 3 Windows x86-64

aria2-0.0.1b0-py3-none-win32.whl (2.8 MB view details)

Uploaded Python 3 Windows x86

aria2-0.0.1b0-py3-none-musllinux_1_1_x86_64.whl (5.3 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ x86-64

aria2-0.0.1b0-py3-none-musllinux_1_1_aarch64.whl (5.5 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ ARM64

aria2-0.0.1b0-py3-none-manylinux_2_17_x86_64.whl (5.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

aria2-0.0.1b0-py3-none-manylinux_2_17_aarch64.whl (5.5 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

File details

Details for the file aria2-0.0.1b0.tar.gz.

File metadata

  • Download URL: aria2-0.0.1b0.tar.gz
  • Upload date:
  • Size: 37.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for aria2-0.0.1b0.tar.gz
Algorithm Hash digest
SHA256 332b31b5caafb381c43112de01f01cade19de5c68b515c37d971bb147edf56f8
MD5 44e3c93093c347c46117ca4bf507a6b7
BLAKE2b-256 29ce394c14fff7d4b66d3fb3be64b70ca5a4077ad8f5399c5e7cd3b213c82ffd

See more details on using hashes here.

File details

Details for the file aria2-0.0.1b0-py3-none-win_amd64.whl.

File metadata

  • Download URL: aria2-0.0.1b0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for aria2-0.0.1b0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 00aa00c9f8b709d37849a84760709d31b6c7752007f645f8bea175325c0b14cb
MD5 2efa111b32327095980a7829386c45f4
BLAKE2b-256 cda08513d8aca9e992ea89807acec645906c08affe383f0072b6290ce6ce2eba

See more details on using hashes here.

File details

Details for the file aria2-0.0.1b0-py3-none-win32.whl.

File metadata

  • Download URL: aria2-0.0.1b0-py3-none-win32.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for aria2-0.0.1b0-py3-none-win32.whl
Algorithm Hash digest
SHA256 4e73cfb52fd61aedfb7e8e23942b50eebb3081c452ece8acb682622dfcdb709d
MD5 64dd26329315156b41d19779988e8b63
BLAKE2b-256 e6d59b367dd6e94d0f49d13aff71857c40c24d31d13b68966c5233d0017fdd79

See more details on using hashes here.

File details

Details for the file aria2-0.0.1b0-py3-none-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for aria2-0.0.1b0-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 0f87a26658c44668d4aadaf50c0342c63b04814032f51bf533bdeacc024ed1e2
MD5 7f2f92f18f0ee0313548ef66b5c4d0b7
BLAKE2b-256 9ed92e5360f783148a00f92ba2fad990498f17970bf2dcc34e720be376284272

See more details on using hashes here.

File details

Details for the file aria2-0.0.1b0-py3-none-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for aria2-0.0.1b0-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 8bbbeaa1bc1a0b30ccdd7909e786821fb345071ba0fe14157a0f715a761e1691
MD5 4a76940e7d9d5c29cba8129fb86c186e
BLAKE2b-256 510e634ba04e5e213a02e5ea472693c3b7d12017b42a68f3156a2be56ad106df

See more details on using hashes here.

File details

Details for the file aria2-0.0.1b0-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for aria2-0.0.1b0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 80e6626d297e8d391f483e173abc193a7232a74b26c108c89250e697ced02596
MD5 3415082dd7bf3e449ffd07b382a775bd
BLAKE2b-256 24610d0e41652ca687182f226bab80697e7b899330a00c56a3983d479818ad52

See more details on using hashes here.

File details

Details for the file aria2-0.0.1b0-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for aria2-0.0.1b0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 349f9fe693d900453d2c1a885cab761a0fce6b92ac7e390df5da32edbb5018e5
MD5 78d919d94cea420dbd123caa0e7ad93b
BLAKE2b-256 086788617a007ee3ce58bafce2454d930226a1d60198bbbd93f1ab1dac6a08c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page