Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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. 😄

Release files for aria2 0.0.1b0

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

Source distribution (sdist)

Source distribution for aria2 0.0.1b0
File Size Uploaded
aria2-0.0.1b0.tar.gz 37.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for aria2 0.0.1b0
File
aria2-0.0.1b0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
aria2-0.0.1b0-py3-none-win32.whl Python 3 none Windows x86-32 Details
aria2-0.0.1b0-py3-none-musllinux_1_1_x86_64.whl Python 3 none Linux musl 1.1+ x86-64 Details
aria2-0.0.1b0-py3-none-musllinux_1_1_aarch64.whl Python 3 none Linux musl 1.1+ ARM64 Details
aria2-0.0.1b0-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
aria2-0.0.1b0-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details

Total release size: 27.1 MB

Release files / aria2-0.0.1b0.tar.gz

Download URL aria2-0.0.1b0.tar.gz
Size 37.4 kB
Tags Source
SHA-256 checksum
How to use checksums
332b31b5caafb381c43112de01f01cade19de5c68b515c37d971bb147edf56f8
BLAKE2b-256 checksum
How to use checksums
29ce394c14fff7d4b66d3fb3be64b70ca5a4077ad8f5399c5e7cd3b213c82ffd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / aria2-0.0.1b0-py3-none-win_amd64.whl

Download URL aria2-0.0.1b0-py3-none-win_amd64.whl
Size 2.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
00aa00c9f8b709d37849a84760709d31b6c7752007f645f8bea175325c0b14cb
BLAKE2b-256 checksum
How to use checksums
cda08513d8aca9e992ea89807acec645906c08affe383f0072b6290ce6ce2eba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / aria2-0.0.1b0-py3-none-win32.whl

Download URL aria2-0.0.1b0-py3-none-win32.whl
Size 2.8 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
4e73cfb52fd61aedfb7e8e23942b50eebb3081c452ece8acb682622dfcdb709d
BLAKE2b-256 checksum
How to use checksums
e6d59b367dd6e94d0f49d13aff71857c40c24d31d13b68966c5233d0017fdd79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / aria2-0.0.1b0-py3-none-musllinux_1_1_x86_64.whl

Download URL aria2-0.0.1b0-py3-none-musllinux_1_1_x86_64.whl
Size 5.3 MB
Tags Linux musl 1.1+ x86-64 Python 3
SHA-256 checksum
How to use checksums
0f87a26658c44668d4aadaf50c0342c63b04814032f51bf533bdeacc024ed1e2
BLAKE2b-256 checksum
How to use checksums
9ed92e5360f783148a00f92ba2fad990498f17970bf2dcc34e720be376284272
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / aria2-0.0.1b0-py3-none-musllinux_1_1_aarch64.whl

Download URL aria2-0.0.1b0-py3-none-musllinux_1_1_aarch64.whl
Size 5.5 MB
Tags Linux musl 1.1+ ARM64 Python 3
SHA-256 checksum
How to use checksums
8bbbeaa1bc1a0b30ccdd7909e786821fb345071ba0fe14157a0f715a761e1691
BLAKE2b-256 checksum
How to use checksums
510e634ba04e5e213a02e5ea472693c3b7d12017b42a68f3156a2be56ad106df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / aria2-0.0.1b0-py3-none-manylinux_2_17_x86_64.whl

Download URL aria2-0.0.1b0-py3-none-manylinux_2_17_x86_64.whl
Size 5.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
80e6626d297e8d391f483e173abc193a7232a74b26c108c89250e697ced02596
BLAKE2b-256 checksum
How to use checksums
24610d0e41652ca687182f226bab80697e7b899330a00c56a3983d479818ad52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / aria2-0.0.1b0-py3-none-manylinux_2_17_aarch64.whl

Download URL aria2-0.0.1b0-py3-none-manylinux_2_17_aarch64.whl
Size 5.5 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
349f9fe693d900453d2c1a885cab761a0fce6b92ac7e390df5da32edbb5018e5
BLAKE2b-256 checksum
How to use checksums
086788617a007ee3ce58bafce2454d930226a1d60198bbbd93f1ab1dac6a08c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release history Release notifications | RSS feed

This release

0.0.1b0 This release

7 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