Installation
============
Requirements
------------
py3createtorrent requires Python 3.11 or newer and the `bencode.py `_ module.
.. note::
You're looking at the documentation of the latest 2.0 release (beta). Therefore,
the following commands contain special prerelease options like ``--prerelease``, ``--pre``,
and ``--pip-args``.
Alternatively, you can find the docs for the stable version here (without v2/hybrid torrent support):
https://py3createtorrent.readthedocs.io/en/v1.2.1/user.html
Recommended: Isolated installation using uv or pipx
---------------------------------------------------
Using `uv `_ or `pipx `_ is the recommended way to install
command line tools like py3createtorrent in an isolated environment without affecting system packages.
Using `uv `_::
uv tool install --prerelease=allow py3createtorrent
py3createtorrent --help
# or without installation
uvx --prerelease=allow py3createtorrent --help
Using `pipx `_::
pipx install --pip-args="--pre" py3createtorrent
py3createtorrent --help
# or without installation
pipx run --pip-args="--pre" py3createtorrent --help
Via ``pip``::
pip install --pre py3createtorrent
py3createtorrent --help
Alternative: Manual installation
--------------------------------
Alternatively, you can download py3createtorrent manually from the
`GitHub releases page `_, install the dependency::
pip install bencode.py
and execute ``py3createtorrent.py`` directly from the ``src`` folder.