Convert Figma logo to code with AI

astral-sh logorye

a Hassle-Free Python Experience

13,419
459
13,419
313

Top Related Projects

9,503

The Python package installer

6,398

A system-level, binary package and environment manager running on all major operating systems and platforms.

7,771

A modern Python package and dependency manager supporting the latest PEP standards

39,014

Simple Python version management

Quick Overview

Rye is an experimental package management solution for Python projects. It aims to simplify dependency management and virtual environment creation, offering a streamlined approach to Python project setup and maintenance.

Pros

  • Simplified project setup with automatic virtual environment creation
  • Consistent dependency management across different platforms
  • Built-in support for multiple Python versions
  • Easy-to-use command-line interface

Cons

  • Experimental status may lead to instability or breaking changes
  • Limited ecosystem compared to established tools like pip or poetry
  • May require learning new workflows for experienced Python developers
  • Not yet widely adopted in the Python community

Getting Started

To get started with Rye, follow these steps:

  1. Install Rye:

    curl -sSf https://rye-up.com/get | bash
    
  2. Create a new project:

    rye init my-project
    cd my-project
    
  3. Add dependencies:

    rye add requests
    
  4. Run your Python script:

    rye run python main.py
    

For more detailed instructions and advanced usage, refer to the official Rye documentation.

Competitor Comparisons

9,503

The Python package installer

Pros of pip

  • Widely adopted and well-established in the Python ecosystem
  • Extensive documentation and community support
  • Simple and straightforward for basic package management tasks

Cons of pip

  • Lacks built-in virtual environment management
  • No native dependency resolution, leading to potential conflicts
  • Limited project-level configuration options

Code Comparison

pip:

pip install package_name
pip freeze > requirements.txt

rye:

rye add package_name
rye sync

Summary

pip is the standard package installer for Python, offering a familiar and widely supported tool for managing packages. However, it lacks some advanced features that rye provides, such as integrated virtual environment management and improved dependency resolution.

rye aims to be a more comprehensive Python project management tool, offering features like automatic virtual environment creation, dependency resolution, and project-level configuration. It provides a more streamlined workflow for managing Python projects, especially for more complex setups.

While pip remains the go-to choice for many Python developers due to its simplicity and widespread adoption, rye offers a more modern and feature-rich alternative for those seeking a more integrated project management experience.

6,398

A system-level, binary package and environment manager running on all major operating systems and platforms.

Pros of conda

  • Supports multiple programming languages, not just Python
  • Extensive package ecosystem with pre-built binaries for various platforms
  • Robust environment management with support for complex dependency resolution

Cons of conda

  • Can be slower in creating and updating environments
  • Larger installation footprint and more complex setup process
  • Sometimes faces compatibility issues with pip-installed packages

Code Comparison

conda:

conda create -n myenv python=3.9
conda activate myenv
conda install numpy pandas

rye:

rye init myproject
rye add numpy pandas
rye sync

Summary

Conda offers a comprehensive solution for managing environments and packages across multiple programming languages, making it suitable for complex scientific computing setups. However, it can be slower and more resource-intensive compared to Rye.

Rye, being Python-specific, provides a more streamlined and faster experience for Python projects. It aims to simplify dependency management and project setup, but may not offer the same breadth of packages or cross-language support as Conda.

The choice between the two depends on project requirements, with Conda being more suitable for multi-language or scientific computing projects, while Rye offers a more lightweight and Python-focused alternative.

7,771

A modern Python package and dependency manager supporting the latest PEP standards

Pros of PDM

  • More mature and established project with a larger user base
  • Supports multiple Python versions in a single project
  • Offers a plugin system for extending functionality

Cons of PDM

  • Slightly more complex configuration and setup process
  • Less focus on providing a complete Python development environment
  • May require additional tools for certain tasks (e.g., virtual environment management)

Code Comparison

PDM:

[project]
name = "my-project"
version = "0.1.0"
dependencies = [
    "requests>=2.0.0",
]

Rye:

[project]
name = "my-project"
version = "0.1.0"
dependencies = [
    "requests>=2.0.0",
]

Both PDM and Rye use similar pyproject.toml configurations for project metadata and dependencies. The main differences lie in their CLI commands and additional features rather than the core configuration syntax.

PDM is a more established project management tool with a larger ecosystem, while Rye aims to provide a more comprehensive Python development environment. PDM offers flexibility with multi-Python version support and a plugin system, but may require additional setup. Rye, being newer, focuses on simplifying the entire Python development workflow but may have fewer advanced features compared to PDM.

39,014

Simple Python version management

Pros of pyenv

  • Mature and widely adopted project with extensive community support
  • Supports a wide range of Python versions and implementations
  • Allows for system-wide and per-project Python version management

Cons of pyenv

  • Requires manual setup and configuration of virtual environments
  • Lacks built-in dependency management features
  • Can be complex for beginners to set up and use effectively

Code Comparison

pyenv:

pyenv install 3.9.5
pyenv global 3.9.5
python -m venv myproject
source myproject/bin/activate
pip install package_name

Rye:

rye init myproject
rye add package_name
rye run python script.py

Rye simplifies Python project management by combining version control, virtual environment creation, and dependency management into a single tool. It offers a more streamlined workflow compared to pyenv, especially for beginners. However, pyenv provides greater flexibility and control over Python versions and environments, making it a preferred choice for more advanced users or complex setups.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Rye: a Hassle-Free Python Experience


Rye

Rye is a comprehensive project and package management solution for Python. Born from its creator's desire to establish a one-stop-shop for all Python users, Rye provides a unified experience to install and manage Python installations, pyproject.toml based projects, dependencies and virtualenvs seamlessly. It's designed to accommodate complex projects, monorepos and to facilitate global tool installations. Curious? Watch an introduction.

A hassle-free experience for Python developers at every level.

Watch the instruction

Click on the thumbnail to watch a 16 minute introduction video

In The Box

Rye picks and ships the right tools so you can get started in minutes:

  • Bootstraps Python: it provides an automated way to get access to the amazing Indygreg Python Builds as well as the PyPy binary distributions.
  • Linting and Formatting: it bundles ruff and makes it available with rye lint and rye fmt.
  • Managing Virtualenvs: it uses the well established virtualenv library under the hood.
  • Building Wheels: it delegates that work largely to build.
  • Publishing: its publish command uses twine to accomplish this task.
  • Locking and Dependency Installation: is today implemented by using uv with a fallback to unearth and pip-tools.
  • Workspace support: Rye lets you work with complex projects consisting of multiple libraries.

Installation

The installation takes just a minute:

  • Linux and macOS:

    curl -sSf https://rye.astral.sh/get | bash
    
  • Windows:

    Download and run the installer (64-bit (x86-64) or 32-bit (x86)).

For more details and other options, refer to the installation instructions.

Learn More

Did I spark your interest?

More

  • Discussion Forum, to discuss the project on GitHub
  • Discord, for conversations with other developers in text form
  • Issue Tracker, if you run into bugs or have suggestions
  • Badges, if you want to show that you use Rye
  • License: MIT