Rye is Armin's personal one-stop-shop for all his Python needs.

Related tags

Machine learning rye
Overview

Rye

Rye is Armin's personal one-stop-shop for all his Python needs. It installs and manages Python installations, manages pyproject.toml files, installs and uninstalls dependencies, manages virtualenvs behind the scenes. It supports monorepos and global tool installations.

It is a wish of what Python was, with no guarantee to work for anyone else. It's an exploration, and it's far from perfect. Thus also the question: Should it exist?

Watch the instruction

Click on the thumbnail to watch a 9 minute introduction video

Installation

Rye is built in Rust. There is no binary distribution yet, it only works on Linux and macOS as of today:

$ cargo install --git https://github.com/mitsuhiko/rye rye

After installing rye, all you need to enjoy automatic management of everything is rye sync (and optionally rye pin to pick a specific Python version):

$ rye pin [email protected]
$ rye sync

The virtualenv that rye manages is placed in .venv next to your pyproject.toml. You can activate and work with it as normal with one notable exception: the Python installation in it does not contain pip.

Note that python will by default just be your regular Python. To have it automatically pick up the right Python without manually activating the virtualenv, you can add ~/.rye/shims to your PATH at higher preference than normal. If you operate outside of a rye managed project, the regular Python is picked up automatically. For the global tool installation you need to add the shims to the path.

Some of the things it does

It automatically installs and manages Python:

>>">
$ rye pin 3.11
$ rye run python
Python 3.11.1 (main, Jan 16 2023, 16:02:03) [Clang 15.0.7 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

Install tools in isolation globally:

$ rye install maturin

Manage dependencies of a local pyproject.toml and update the virtualenv automatically:

$ rye add flask
$ rye sync

Decisions Made

To understand why things are the way they are:

  • Virtualenvs: while I personally do not like virtualenvs that much, they are so widespread and have reasonable tooling support, so I chose this over __pypackages__.

  • No Default Dependencies: the virtualenvs when they come up are completely void of dependencies. Not even pip or setuptools are installed into it. Rye manages the virtualenv from outside the virtualenv.

  • No Core Non Standard Stuff: Rye (with the exception of it's own tool section in the pyproject.toml) uses standardized keys. That means it uses regular requirements as you would expect. It also does not use a custom lock file format and uses pip-tools behind the scenes.

  • No Pip: Rye uses pip, but it does not expose it. It manage dependencies in pyproject.toml only.

  • No System Python: I can't deal with any more linux distribution weird Python installations or whatever mess there is on macOS. I used to build my own Pythons that are the same everywhere, now I use indygreg's Python builds. Rye will automatically download and manage Python builds from there. No compiling, no divergence.

  • Project Local Shims: Rye maintains a python shim that auto discovers the current pyproject.toml and automatically operates below it. Just add the shims to your shell and you can run python and it will automatically always operate in the right project.

What Could Be?

There are a few shortcomings in the Python packaging world, largely as a result of lack of standardization. Here is what this project ran into over the years:

  • No Python Binary Distributions: CPython builds from python.org are completely inadequate. On some platforms you only get an .msi installer, on some you literally only get tarballs. The various Python distributions that became popular over the years are diverging greatly and cause all kinds of nonsense downstream. This is why this Project uses the indygreg standalone builds. I hope that with time someone will start distributing well maintained and reliable Python builds to replace the mess we are dealing with today.

  • No Dev Dependencies: Rye currently needs a custom section in the pyproject.toml to represent dev dependencies. There is no standard in the ecosystem for this. It really should be added.

  • No Local Dependency Overlays: There is no standard for how to represent local dependencies. Rust for this purpose has something like { path = "../foo" } which allows both remote and local references to co-exist and it rewrites them on publish.

  • No Exposed Pip: pip is intentionally not exposed. If you were to install something into the virtualenv, it disappears next time you sync. If you symlink rye to ~/.rye/shims/pip you can get access to pip without installing it into the virtualenv. There be dragons.

  • No Workspace Spec: for monorepos and things of that nature, the Python ecosystem would need a definition of workspaces. Today that does not exist which forces every tool to come up with it's own solutions to this problem.

  • No Basic Script Section: There should be a standard in pyproject.toml to represent scripts like rye does in rye.tools.scripts.

Adding Dependencies

To add a new dependency run rye add with the name of the package that you want to install. Additionally a proprietary extension to pyproject.toml exists to add development only packages. For those add --dev.

=2.0" $ rye add --dev black">
$ rye add "flask>=2.0"
$ rye add --dev black

Adding dependencies will not directly install them. To install them run rye sync again.

Workspaces

To have multiple projects share the same virtualenv, it's possible to declare workspaces in the pyproject.toml:

[tool.rye.workspace]
members = ["foo-*"]

When rye sync is run in a workspace, then all packages are installed at all times. This also means that they can inter-depend as they will all be installed editable by default.

Lockfiles

Rye does not try to re-invent the world (yet!). This means it uses pip-tools behind the scenes automatically. As neither pip nor pip-tools provide lockfiles today Rye uses generated requirements.txt files as replacement. Whenever you run rye sync it updates the requirements.lock and requirements-dev.lock files automatically.

Scripts

rye run can be used to invoke a binary from the virtualenv or a configured script. Rye allows you to define basic scripts in the pyproject.toml in the tool.rye.scripts section:

[tool.rye.scripts]
serve = "python -m http.server 8000"

They are only available via rye run . Each script can either be a string or an array where each item is an argument to the script. The scripts will be run with the virtualenv activated.

To see what's available, run rye run without arguments and it will list all scripts.

Python Distributions

Rye does not use system python installations. Instead it uses Gregory Szorc's standalone Python builds: python-build-standalone. This is done to create a unified experience of Python installations and to avoid incompatibilities created by different Python distributions. Most importantly this also means you never need to compile a Python any more, it just downloads prepared binaries.

Managing Python Toolchains

You can register custom Python toolchains with rye toolchain register:

$ rye toolchain register ~/Downloads/pypy3.9-v7.3.11-macos_arm64/bin/python
Registered /Users/mitsuhiko/Downloads/pypy3.9-v7.3.11-macos_arm64/bin/python as [email protected]

Afterwards you can pin it, in this case with rye pin [email protected]. The auto detection of the name might not be great, in which case you can provide an explicit name with --name. To remove downloaded or linked toolchains, you can use the rye toolchain remove command. To list what's available, use rye toolchain list.

Global Tools

If you want tools to be installed into isolated virtualenvs (like pipsi and pipx), you can use rye too (requires ~/.rye/shims to be on the path):

$ rye install pycowsay
$ pycowsay Wow

  ---
< Wow >
  ---
   \   ^__^
    \  (oo)\_______
       (__)\       )\/\
           ||----w |
           ||     ||

To uninstall run rye uninstall pycowsay again.

Using The Virtualenv

There are two ways to use the virtual environment. One is to just activate it like you would do normally:

$ . .venv/bin/activate

The other is to use rye run

Comments
  • rye mentions 3 different versions of Python, then fails at installing any

    rye mentions 3 different versions of Python, then fails at installing any

    On Ubuntu 20.04 with deadsnake:

    $ rye pin 3.11
    pinned [email protected] in /tmp/.python-version
     
    $ rye init
    success: Initialized project in /tmp/.
    $ cat pyproject.toml 
    [project]
    ...
    requires-python = ">= 3.8"
    ...
    $ rye run python
    Bootstrapping rye internals
    Downloading [email protected]
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 15.13 KiB/27.29 MiBtar: Archive is compressed. Use --zstd option
    tar: Error is not recoverable: exiting now
    thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', rye/src/bootstrap.rs:176:35
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    

    Rye mentions 3.11, 3.8 and 3.10, so I don't understand what's going on.

    Unfortunately, adding the backtrace doesn't give much more info:

    $ export RUST_BACKTRACE=1
    $ rye run python
    Bootstrapping rye internals
    error: No such file or directory (os error 2)
    
    bug 
    opened by ksamuel 8
  • Shim launches rye

    Shim launches rye

    I don't use the shims, but I just noticed that they're all pointing to the rye binary.

    ➜ ls -l ~/.rye/shims/
    total 0
    lrwxrwxrwx 1 abou_zeid hiwi 30 Apr 23 20:43 python -> /home/abou_zeid/.cargo/bin/rye*
    lrwxrwxrwx 1 abou_zeid hiwi 30 Apr 23 20:43 python3 -> /home/abou_zeid/.cargo/bin/rye*
    
    bug 
    opened by kabouzeid 6
  • rye sync fails when directory path contains space character

    rye sync fails when directory path contains space character

    When starting a new project

    ➜ rye init
    success: Initialized project in /Users/seba/Dropbox/MBA/Spring 2023/pm/hw6/.
    

    but sync fails because of the space character in the directory path.

    ➜ rye sync
    Initializing new virtualenv in /Users/seba/Dropbox/MBA/Spring 2023/pm/hw6/.venv
    Python version: [email protected]
    Generating production lockfile: /Users/seba/Dropbox/MBA/Spring 2023/pm/hw6/requirements.lock
    Traceback (most recent call last):
      File "/Users/seba/.rye/self/bin/pip-compile", line 8, in <module>
        sys.exit(cli())
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
        return self.main(*args, **kwargs)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/click/core.py", line 1055, in main
        rv = self.invoke(ctx)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/click/core.py", line 760, in invoke
        return __callback(*args, **kwargs)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
        return f(get_current_context(), *args, **kwargs)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/piptools/scripts/compile.py", line 517, in cli
        constraints.extend(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/piptools/_compat/pip_compat.py", line 36, in parse_requirements
        yield install_req_from_parsed_requirement(parsed_req, isolated=isolated)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/req/constructors.py", line 459, in install_req_from_parsed_requirement
        req = install_req_from_editable(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/req/constructors.py", line 214, in install_req_from_editable
        parts = parse_req_from_editable(editable_req)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/req/constructors.py", line 183, in parse_req_from_editable
        name, url, extras_override = parse_editable(editable_req)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/req/constructors.py", line 100, in parse_editable
        raise InstallationError(
    pip._internal.exceptions.InstallationError: /Users/seba/Dropbox/MBA/Spring is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).
    Error: could not write production lockfile for project
    
    Caused by:
        failed to generate lockfile
    
    bug 
    opened by sbarrios93 3
  • Enable anyhow's backtrace support

    Enable anyhow's backtrace support

    This change configures anyhow to automatically generate backtraces. This enables using RUST_BACKTRACE=1 to see a backtrace on any scenario where an unhandled Error is returned.

    opened by WhyNotHugo 2
  • rye install does not fetch

    rye install does not fetch

    I just installed rye on a Debian bullseye and tested a simple install:

    $ rye install platformio
    Bootstrapping rye internals
    Downloading [email protected]
    success: Downloaded [email protected]
    Upgrading pip
    Installing internal dependencies
    FileNotFoundError: [Errno 2] No such file or directory: '/home/ddouard/.rye/py/[email protected]/install/bin/python3'
    error: failed to initialize virtualenv
    

    notice the mixup between py 3.11 and py 3.10 here.

    PS: Installed rye v0.1.0 (https://github.com/mitsuhiko/rye#eaf12925) using rust 1.67.0 (fc594f156 2023-01-24) Note that I did not run any other command between the cargo install rye and the command above. After a rye fetch 3.11, the rye install command does work, but any rye sync or rye run command complains about the lack of a pyproject.toml file (which I don't expect to be necessary to install a python package 'globally').

    Thanks!

    bug 
    opened by douardda 1
  • sources.rs: fix test_get_download_url

    sources.rs: fix test_get_download_url

    From my testing, the test_get_download_url fails with:

         Running unittests src/main.rs (target/x86_64-unknown-linux-gnu/release/deps/rye-f2fb693ac01ef08b)
    
    running 1 test
    test sources::test_get_download_url ... FAILED
    
    failures:
    
    ---- sources::test_get_download_url stdout ----
    thread 'sources::test_get_download_url' panicked at 'assertion failed: `(left == right)`
      left: `Some((PythonVersion { kind: "cpython", major: 3, minor: 8, patch: 14 }, "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.8.14%2B20221002-aarch64-apple-darwin-pgo-full.tar.zst"))`,
     right: `Some((PythonVersion { kind: "cpython", major: 3, minor: 8, patch: 14 }, "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.8.14%2B20221002-aarch64-apple-darwin-debug-full.tar.zst"))`', rye/src/sources.rs:123:5
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    
    
    failures:
        sources::test_get_download_url
    
    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
    

    This PR changes the expected value for the URLs and hence fixes those tests. I am not sure rather this is correct though.

    opened by GaetanLepage 1
  • Should rye allow project folders with spaces in between?

    Should rye allow project folders with spaces in between?

    Related to #37, if the project folder contains spaces, then the project name in pyproject.toml will also contain names, which is not allowed.

    Should rye normalize the project name for projects which root folder contains spaces?

    ➜ rye init
    success: Initialized project in /private/tmp/test 1/.
    
    ➜ rye sync
    Initializing new virtualenv in /private/tmp/test 1/.venv
    Python version: [email protected]
    Generating production lockfile: /private/tmp/test 1/requirements.lock
        error: subprocess-exited-with-error
    
        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [20 lines of output]
            Traceback (most recent call last):
              File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                main()
              File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                json_out['return_val'] = hook(**hook_input['kwargs'])
              File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
                whl_basename = backend.build_wheel(metadata_directory, config_settings)
              File "/private/var/folders/xn/8rrz2r9s6gb_vbycdvs2t4f00000gn/T/pip-build-env-npq7zyua/overlay/lib/python3.10/site-packages/hatchling/build.py", line 56, in build_wheel
                return os.path.basename(next(builder.build(wheel_directory, ['standard'])))
              File "/private/var/folders/xn/8rrz2r9s6gb_vbycdvs2t4f00000gn/T/pip-build-env-npq7zyua/overlay/lib/python3.10/site-packages/hatchling/builders/plugin/interface.py", line 93, in build
                self.metadata.validate_fields()
              File "/private/var/folders/xn/8rrz2r9s6gb_vbycdvs2t4f00000gn/T/pip-build-env-npq7zyua/overlay/lib/python3.10/site-packages/hatchling/metadata/core.py", line 244, in validate_fields
                self.core.validate_fields()
              File "/private/var/folders/xn/8rrz2r9s6gb_vbycdvs2t4f00000gn/T/pip-build-env-npq7zyua/overlay/lib/python3.10/site-packages/hatchling/metadata/core.py", line 1325, in validate_fields
                getattr(self, attribute)
              File "/private/var/folders/xn/8rrz2r9s6gb_vbycdvs2t4f00000gn/T/pip-build-env-npq7zyua/overlay/lib/python3.10/site-packages/hatchling/metadata/core.py", line 409, in name
                self._name = normalize_project_name(self.raw_name)
              File "/private/var/folders/xn/8rrz2r9s6gb_vbycdvs2t4f00000gn/T/pip-build-env-npq7zyua/overlay/lib/python3.10/site-packages/hatchling/metadata/core.py", line 397, in raw_name
                raise ValueError(message)
            ValueError: Required field `project.name` must only contain ASCII letters/digits, underscores, hyphens, and periods, and must begin and end with ASCII letters/digits.
            [end of output]
    
        note: This error originates from a subprocess, and is likely not a problem with pip.
    Traceback (most recent call last):
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/operations/build/metadata.py", line 35, in generate_metadata
        distinfo_dir = backend.prepare_metadata_for_build_wheel(metadata_dir)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/utils/misc.py", line 713, in prepare_metadata_for_build_wheel
        return super().prepare_metadata_for_build_wheel(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 186, in prepare_metadata_for_build_wheel
        return self._call_hook('prepare_metadata_for_build_wheel', {
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 311, in _call_hook
        self._subprocess_runner(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/utils/subprocess.py", line 252, in runner
        call_subprocess(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/utils/subprocess.py", line 224, in call_subprocess
        raise error
    pip._internal.exceptions.InstallationSubprocessError: Preparing metadata (pyproject.toml) exited with 1
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/Users/seba/.rye/self/bin/pip-compile", line 8, in <module>
        sys.exit(cli())
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
        return self.main(*args, **kwargs)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/click/core.py", line 1055, in main
        rv = self.invoke(ctx)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/click/core.py", line 760, in invoke
        return __callback(*args, **kwargs)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
        return f(get_current_context(), *args, **kwargs)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/piptools/scripts/compile.py", line 592, in cli
        results = resolver.resolve(max_rounds=max_rounds)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/piptools/resolver.py", line 593, in resolve
        is_resolved = self._do_resolve(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/piptools/resolver.py", line 625, in _do_resolve
        resolver.resolve(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 73, in resolve
        collected = self.factory.collect_root_requirements(root_reqs)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 491, in collect_root_requirements
        req = self._make_requirement_from_install_req(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 453, in _make_requirement_from_install_req
        cand = self._make_candidate_from_link(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 185, in _make_candidate_from_link
        self._editable_candidate_cache[link] = EditableCandidate(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 318, in __init__
        super().__init__(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
        self.dist = self._prepare()
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
        dist = self._prepare_distribution()
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 328, in _prepare_distribution
        return self._factory.preparer.prepare_editable_requirement(self._ireq)
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 687, in prepare_editable_requirement
        dist = _get_prepared_distribution(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 69, in _get_prepared_distribution
        abstract_dist.prepare_distribution_metadata(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 61, in prepare_distribution_metadata
        self.req.prepare_metadata()
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 555, in prepare_metadata
        self.metadata_directory = generate_metadata(
      File "/Users/seba/.rye/self/lib/python3.10/site-packages/pip/_internal/operations/build/metadata.py", line 37, in generate_metadata
        raise MetadataGenerationFailed(package_details=details) from error
    pip._internal.exceptions.MetadataGenerationFailed: metadata generation failed
    Error: could not write production lockfile for project
    
    Caused by:
        failed to generate lockfile
    

    pyproject.toml

    [project]
    name = "test 1"
    version = "0.1.0"
    description = "Add a short description here"
    authors = [
        { name = "sbarrios93", email = "REDACTED" }
    ]
    dependencies = []
    readme = "README.md"
    requires-python = ">= 3.8"
    license = { text = "MIT" }
    
    [build-system]
    requires = ["hatchling"]
    build-backend = "hatchling.build"
    
    [tool.rye]
    managed = true
    
    opened by sbarrios93 0
  • Minor refactoring of README

    Minor refactoring of README

    Placed Some of the things it does after Installation. It makes sense to have installation come after describing a summary of what Ryeis. Most developers after reading the summary will rush to find out how to quickly install so found that something to refactor.

    opened by avosa 0
  • Requirements.lock uses the project's absolute path

    Requirements.lock uses the project's absolute path

    When adding a package e.g. requests and doing rye sync, the following is generated:

    -e file:///var/my/path/rye-test
    certifi==2022.12.7
    charset-normalizer==3.1.0
    idna==3.4
    requests==2.28.2
    urllib3==1.26.15
    

    The path used in the first line is the absolute path the project. This could cause problems with multiple users collaborating on the same project and sharing lock files.

    enhancement 
    opened by imbev 0
  • Add toolchain management

    Add toolchain management

    This restores the custom toolchain management that was there originally. It does not fix the issues that this command has, but at least it restores that functionality again.

    Refs #16

    opened by mitsuhiko 0
  • Update GitHub Actions CI

    Update GitHub Actions CI

    The following updates are performed:

    Still using the outdated / unmaintained actions will generate several warnings in CI runs, for example in https://github.com/mitsuhiko/rye/actions/runs/4780552270:

    Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions-rs/toolchain@v1. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

    The PR will get rid of those warnings.

    opened by striezel 0
  • Editable vs non Editable requirements.txt

    Editable vs non Editable requirements.txt

    Today the assumption rye makes is that you always want editable installs when using lockfiles. That works really well for my uses, but I can see that this is not helping others. I would be quite curious how people are generally dealing with this, particularly when working with monorepos.

    opened by mitsuhiko 0
  • `rye add atomicwrites` error: No such file or directory (os error 2)

    `rye add atomicwrites` error: No such file or directory (os error 2)

    $ rye add atomicwrites
    Bootstrapping rye internals
    error: No such file or directory (os error 2)
    

    With https://github.com/mitsuhiko/rye/pull/29 I get:

    Bootstrapping rye internals
    Error: error bootstrapping venv
    
    Caused by:
        0: unable to create self venv
        1: No such file or directory (os error 2)
    
    opened by WhyNotHugo 10
  • Plugin for Pycharm/IntelliJ

    Plugin for Pycharm/IntelliJ

    Integration with Pycharm and other Jetbrains IDEs can make usage of project management tools such as Rye more convenient.

    I'd like to suggest the following features in an IntelliJ plugin:

    • New project wizard/template
    • rye interpreter/environment management

    Although I'm inexperienced with creating plugins for IntelliJ, I'd still like to contribute towards this. I've created a repository to serve as a starting point at https://github.com/imbev/rye-pycharm-plugin

    help wanted 
    opened by imbev 1
  • Automatically download pypy

    Automatically download pypy

    PyPy has binary distributions, it should be possible to automatically download them: https://downloads.python.org/pypy/

    Since macOS pypy binaries are not notarized, this would require removing the quarantine flags after unpacking.

    enhancement 
    opened by mitsuhiko 0
Owner
Armin Ronacher
Software developer and Open Source nut. Creator of the Flask framework. Engineering at @getsentry. Other things of interest: @pallets and @rust-lang
Armin Ronacher
A Python CLI tool that finds all third-party packages imported into your Python project

python-third-party-imports This is a Python CLI tool built with Rust that finds all third-party packages imported into your Python project. Install Yo

Maksudul Haque 24 Feb 1, 2023
Personal experiments with genetic algorithms and neuroevolution, in Rust, with the Bevy engine.

The Tango Problem Personal experiments with genetic algorithms and neuroevolution, in Rust, with the Bevy engine. A number of "Psychics" are placed in

null 3 Nov 20, 2023
Msgpack serialization/deserialization library for Python, written in Rust using PyO3, and rust-msgpack. Reboot of orjson. msgpack.org[Python]

ormsgpack ormsgpack is a fast msgpack library for Python. It is a fork/reboot of orjson It serializes faster than msgpack-python and deserializes a bi

Aviram Hassan 139 Dec 30, 2022
A real-time implementation of "Ray Tracing in One Weekend" using nannou and rust-gpu.

Real-time Ray Tracing with nannou & rust-gpu An attempt at a real-time implementation of "Ray Tracing in One Weekend" by Peter Shirley. This was a per

null 89 Dec 23, 2022
A small game about solving a mystery aboard a train... if there even is one

Train Mystery A small game about solving a mystery aboard a train... if there even is one. ?? Jeu d'enquête gagnant du Palm'Hackaton 2023. ?? A propos

Aloïs RAUTUREAU 4 May 3, 2023
Are all senior engineers busy? Ask senior instead!

Senior Are all senior engineers busy? Ask senior instead! How to install Requires: openssl a openAI api token rust cargo install senior or brew insta

Bruno Rucy Carneiro Alves de Lima 6 Aug 7, 2023
Rust numeric library with R, MATLAB & Python syntax

Peroxide Rust numeric library contains linear algebra, numerical analysis, statistics and machine learning tools with R, MATLAB, Python like macros. W

Tae Geun Kim 351 Dec 29, 2022
Rust crate to create Anki decks. Based on the python library genanki

genanki-rs: A Rust Crate for Generating Anki Decks With genanki-rs you can easily generate decks for the popular open source flashcard platform Anki.

Yannick Funk 63 Dec 23, 2022
Locality Sensitive Hashing in Rust with Python bindings

lsh-rs (Locality Sensitive Hashing) Locality sensitive hashing can help retrieving Approximate Nearest Neighbors in sub-linear time. For more informat

Ritchie Vink 65 Jan 2, 2023
Python package to compute levensthein distance in rust

Contents Introduction Installation Usage License Introduction Rust implementation of levensthein distance (https://en.wikipedia.org/wiki/Levenshtein_d

Thibault Blanc 2 Feb 21, 2022
Pyxirr - Rust-powered collection of financial functions for Python.

PyXIRR Rust-powered collection of financial functions. PyXIRR stands for "Python XIRR" (for historical reasons), but contains many other financial fun

Alexander Volkovsky 82 Jan 2, 2023
Robust and Fast tokenizations alignment library for Rust and Python

Robust and Fast tokenizations alignment library for Rust and Python

Yohei Tamura 14 Dec 10, 2022
A high performance python technical analysis library written in Rust and the Numpy C API.

Panther A efficient, high-performance python technical analysis library written in Rust using PyO3 and rust-numpy. Indicators ATR CMF SMA EMA RSI MACD

Greg 210 Dec 22, 2022
Rust-port of spotify/annoy as a wrapper for Approximate Nearest Neighbors in C++/Python optimized for memory usage.

Rust-port of spotify/annoy as a wrapper for Approximate Nearest Neighbors in C++/Python optimized for memory usage.

Arthur·Thomas 13 Mar 10, 2022
Rust-port of spotify/annoy as a wrapper for Approximate Nearest Neighbors in C++/Python optimized for memory usage.

Fareast This library is a rust port of spotify/annoy , currently only index serving is supported. It also provides FFI bindings for jvm, dotnet and da

Arthur·Thomas 13 Mar 10, 2022
Python+Rust implementation of the Probabilistic Principal Component Analysis model

Probabilistic Principal Component Analysis (PPCA) model This project implements a PPCA model implemented in Rust for Python using pyO3 and maturin. In

FindHotel 11 Dec 16, 2022
Low effort scraping Python's pickle format in Rust. It is to complete pickle parsing as BeautifulSoup was to complete HTML parsing.

repugnant-pickle Because it is, isn't it? This is a Rust crate for dealing with the Python pickle format. It also has support for opening PyTorch file

Kerfuffle 7 Apr 7, 2023
Sample Python extension using Rust/PyO3/tch to interact with PyTorch

Python extensions using tch to interact with PyTorch This sample crate shows how to use tch to write a Python extension that manipulates PyTorch tenso

Laurent Mazare 5 Jun 10, 2023
One-Stop Solution for all boilerplate needs!

One Stop Solution for all boilerplate needs! Consider leaving a ⭐ if you found the project helpful. Templa-rs Templa-rs is a one-of-a-kind TUI tool wr

IEEE VIT Student Chapter 27 Aug 28, 2022
Tool that was built quickly for personal needs, you might find it useful though

COPYCAT Produced with stable-diffusion Clipboard (copy/paste) history buffer for terminal emulators, MAC OS gui and VIM* environment usage. Rrequireme

Dragan Jovanović 4 Dec 9, 2022