Package: py-rattler
Rattler: Rust crates for fast handling of conda packagesRattler is a library that provides common functionality used within the conda ecosystem (what is conda & conda-forge?).
The goal of the library is to enable programs and other libraries to easily interact with the conda ecosystem without being dependent on Python.
Its primary use case is as a library that you can use to provide conda related workflows in your own tools.Rattler is written in Rust and tries to provide a clean API to its functionalities (see:Components).
With the primary goal in mind we aim to provide bindings to different languages to make it easy to integrate Rattler in non-rust projects.Rattler is actively used within thehttps://prefix.devbackend.ShowcaseThis repository also contains a binary (usecargo runto try) that shows some of the capabilities of the library.
This is an example of installing an environment containingcowpyand all its dependenciesfrom scratch(including Python!):Give it a try!Before you begin, make sure you have the following prerequisites:A recent version ofgitA recent version ofmicromambaFollow these steps to clone, compile, and run the rattler project:# Clone the rattler repository along with its submodules:gitclone--recursivehttps://github.com/mamba-org/rattler.gitcdrattler# Set up an environment with the required dependencies for compiling rattler and libsolv:micromambacreate-fenvironment.yml
micromambaactivaterattler-env# Compile and execute rattler to create a JupyterLab instance:cargorun--release--binrattlercreatejupyterlabThe above command will execute therattlerexecutable in release mode.
It will download and install an environment into the.prefixfolder that containsjupyterlaband all the dependencies required to run it (likepython)Run the following command to start jupyterlab:# on windows.\.prefix\Scripts\jupyter-lab.exe# on linux or macOS./.prefix/bin/jupyter-labVoila!
You have a working installation of jupyterlab installed on your system!
You can of course install any package you want this way.
Try it!Contributing 😍We would love to have you contribute!
See the CONTRIBUTION.md for more info. For questions, requests or a casual chat, we are very active on our discord server.
You canjoin our discord server via this link.ComponentsRattler consists of several crates that provide different functionalities.rattler_conda_types: foundational types for all datastructures used withing the conda eco-system.rattler_package_streaming: provides functionality to download, extract and create conda package archives.rattler_repodata_gateway: downloads, reads and processes information about existing conda packages from an index.rattler_shell: code to activate an existing environment and run programs in it.rattler_solve: a backend agnostic library to solve the package satisfiability problem.rattler_virtual_packages: a crate to detect system capabilities.rattler: functionality to create complete environments from scratch using the crates above.rattler-bin: an example of a package manager using all the crates above (see:showcase)You can find these crates in thecratesfolder.What is conda & conda-forge?The conda ecosystem providescross-platform,binarypackages that you can use withany programming language.condais an open-source package management system and environment management system that can install and manage multiple versions of software packages and their dependencies.condais written in Python.
The aim of Rattler is to provide all functionality required to work with the conda ecosystem from Rust.
Rattler is not a reimplementation ofconda.condais a package management tool.
Rattler is alibraryto work with the conda ecosystem from different languages and applications.
For example, it powers the backend ofhttps://prefix.dev.conda-forgeis a community-driven effort to bring new and existing software into the conda ecosystem.
It providestens-of-thousands of up-to-datepackages that are maintained by a community of contributors.
For an overview of available packages seehttps://prefix.dev.