Installation

Installation#

You can prototype async code quickly using the uv tool interface, if you need only the executable (that is, the CLI) and not the library. This can be helpful if you wish to decide how much this library suits your needs before committing to installation. Simply execute:

uvx --from py-asyncutils asyncutils

The REPL starts with the following banner:

asyncutils REPL (version 1.2.4) running on linux
Type "help", "copyright", "credits" or "license" for more information, "clear" to clear the terminal, and "exit" or "quit" to exit.
asyncutils is a multi-purpose and efficient asynchronous utilities library.
You can use *await* statements directly instead of *asyncio.run* for quick testing.
All the submodules of asyncutils are also loaded into the namespace.

asyncutils injects itself into the globals and the import is automated visually. Afterwards, simply type Python code as you normally would, bearing in mind that await statements are magically supported:

>>> import asyncutils
>>> from asyncutils import *
>>> # Your code here

For the normal installation pathway, many more package managers are supported.

You are advised to ensure that your package manager is updated to the latest version as follows:

# uv (preferred for modernity, speed and compatibility with this project)
uv self update # standalone installation of uv
pip install -U uv # pip installation of uv
pip install -U pip # pip
pip install -U pipx # pipx
# conda
conda update conda anaconda
conda update --all # optional
poetry self update # poetry
pip install -U pdm # pdm
pip install -U pipenv # pipenv

Next, install py-asyncutils:

# recommended: uv
uv pip install py-asyncutils==1.2.4
uv pip install git+https://github.com/jonathandung/asyncutils.git # directly from source
# pip
pip install py-asyncutils==1.2.4
pip install git+https://github.com/jonathandung/asyncutils.git # directly from source
# conda
conda install -c conda-forge py-asyncutils=1.2.4
# alternatively:
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install py-asyncutils==1.2.4

other installation pathways:

pipx install py-asyncutils==1.2.4 # pipx
poetry add py-asyncutils@1.2.4 # poetry
pdm add py-asyncutils==1.2.4 # pdm
pipenv install py-asyncutils==1.2.4 # pipenv
# no package manager (needs Python and the build and installer packages)
python3 -m build # generate sdist and wheel in dist/
python3 -m installer dist/*.whl # install from the wheel

asyncutils and autils will then be made available as entry points to the asyncutils CLI. The CLI can also be called with a typical and perhaps more familiar python3 -m asyncutils.

Dependency groups#

The PEP 735 dependency groups of this package are listed below for reference:

  • dev: Packages one would want installed for development; superset of docs, json5, test, and tools.

  • docs: Documentation dependencies, including Sphinx and some of its plugins

  • executors: All the libraries implementing executors this module supports, except distributed, since that is much too specialized and heavy.

  • json5: The Cython-accelerated JSON5 parser, specifically used to read format.json5 in tests.

  • pconf: Dependencies to parse configuration files in Hjson, JSONC, JSON5, and YAML formats

  • test: Test dependencies, including pytest and related plugins; superset of json5