We're happy to announce that rattler, a suite of Rust crates with Python bindings for conda package management, has officially joined the conda community organization. This move marks a significant milestone in the evolution of the conda ecosystem. The conda community is a multi-stakeholder organization for the conda ecosystem, and the defining body that sets forth new standards.
What is rattler
?โ
The rattler crates were originally created by Bas Zalmstra and further developed at prefix.dev.
Its key features include:
- A clean, expressive API for Rust developers
- Well-designed Python bindings and documentation
- The fastest SAT solver in the conda ecosystem (resolvo)
Rattler's functionality spans from reading index metadata and searching packages to resolving, downloading, installing, and even writing packages. At prefix.dev all next-generation tools for the conda ecosystem are built upon rattler, such as:
- Pixi: A modern package manager for conda & PyPI packages
- rattler-build: A new and very fast tool for building conda packages with a community-designed, revamped recipe format
Adoption and Python bindingsโ
Rattler is already widely used to build custom tooling (as is done by large organizations such as Palantir, QuantCo and the Chicago Trading Company among others).
The Python bindings to rattler, originally developed by Tarun Pratap Singh are one of the easiest ways to programmatically deal with conda packages. They can be installed from conda-forge
or PyPI
!
import asyncio
import tempfile
from rattler import solve, install, VirtualPackage
async def main() -> None:
print("started solving the environment")
solved_records = await solve(
channels=["conda-forge"],
specs=["python 3.12.*", "pip", "requests 2.31.*"],
virtual_packages=VirtualPackage.detect(),
)
print("solved required dependencies")
env_path = tempfile.mkdtemp()
await install(
records=solved_records,
target_prefix=env_path,
)
print(f"created environment: {env_path}")
if __name__ == "__main__":
asyncio.run(main())
By joining the conda community as a new community project, the rattler
project now falls under community governance. This transition opens up new opportunities for the wider conda ecosystem to leverage and contribute to this powerful toolset. The development continues to be led by the team at prefix.dev who will continue with high velocity on lots of innovations for the conda ecosystem.
The conda community is an open source software community that is engaged in the development of the tooling around conda packages. Members of the conda community are employees of prefix.dev, Anaconda, Quansight, NVIDIA, Voltron Data and other companies that have a vested interest in the conda ecosystem.
If you are a tool developer and interested in the capabilities of rattler
or py-rattler
, you can find the documentation here:
You can find the authors of rattler on the prefix.dev Discord - feel free to connect and ask questions! We are โ of course โ also active on the conda community channels (such as Element).