Installation¶
PyPI (stable) version¶
Mcproto is available on PyPI and can be installed like any other Python library with:
pip is the main package installer for Python.
Poetry is an all-in-one solution for Python project management.
Rye is an all-in-one solution for Python project management, written in Rust.
uv is an ultra fast dependency resolver and package installer, written in Rust.
PDM is an all-in-one solution for Python project management.
Test PyPI (latest main commit builds)¶
A new version of mcproto is published to Test PyPI on every commit to the main
branch, using a
version format like 0.6.0.postN.devX
. This is useful if you want the latest development changes but still prefer
installing from a trusted package index (e.g. one that provides attestations or reproducible builds), instead of
relying on VCS links.
Although these builds are technically considered "pre-releases", they are not alpha or beta versions like 0.5.0a1
(which would appear on PyPI too). They're regular post-development builds made continuously for easier testing and
access.
These builds are functionally identical to what you'd get from installing directly from Git (see next section), but Test PyPI offers advantages like:
- Index-based installation with hashes and attestations
- Easier CI/CD and lockfile compatibility
- Skips the need to build the package locally, pre-built wheels are downloaded directly
- No need for Git to be installed
Warning
Mcproto is still in active development, and changes can happen quickly. These builds may contain bugs or unfinished features. However, they're useful if you want to try out a fix or feature that hasn't yet been released on the main PyPI index, as it can sometimes take us a while to publish stable releases during this stage.
To install the latest version from Test PyPI:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --pre mcproto
pip is the main package installer for Python.
Tell pip to prefer Test PyPI for new versions while falling back to PyPI for dependencies.
poetry source add --priority=supplemental testpypi https://test.pypi.org/simple
poetry add --source testpypi mcproto
Poetry is an all-in-one solution for Python project management.
Add the testpypi index as an additional source and install mcproto using that source.
Rye is an all-in-one solution for Python project management, written in Rust.
Rye does not have a clean way to specify per-package source, it is possible to add Test PyPI as a source and use it globally, however, this would also affect other packages, and even with this approach, Rye handles dependency resolution pretty poorly (if a packge is being installed from Test PyPI, all of it's dependencies must be from Test PyPI, or they must be installed manually).
For this reason, we don't recommend using the Test PyPI index with Rye, instead, if you want the latest release, follow the git installation method.
uv is an ultra fast dependency resolver and package installer, written in Rust.
Uv supports custom indexes via matching pip flags.
PDM is an all-in-one solution for Python project management.
With PDM, you will want to follow their documentation for this type of installation, as it
involves editing pyproject.toml
manually and a deeper understanding of what you're doing is beneficial.
Alternatively, you can just use the git installation instead.
Latest (git) version¶
Installing directly from Git gives you the exact same version as Test PyPI: the latest commit to main
, but also allows
you to install from any branch or commit. This is useful if you're testing experimental branches or need a very
specific commit not yet published to Test PyPI, or you just don't want to use the Test PyPI index.
Warning
This type of installation carries the same risks of bugs occuring as the Test PyPI installation. See the warning notice in that section.
To install the latest mcproto version directly from the main
git branch, use:
pip is the main package installer for Python.
Poetry is an all-in-one solution for Python project management.
Rye is an all-in-one solution for Python project management, written in Rust.
uv is an ultra fast dependency resolver and package installer, written in Rust.
PDM is an all-in-one solution for Python project management.