Skip to main content

A simple tool to migrate your Poetry project to rye

Project description

poetry2rye

A simple tool to migrate your Poetry project to rye.

Install

rye install poetry2rye

Usage

Migrate

poetry2rye mig [PATH]

Migrate path projects to rye.

This command does the following:

  • if the project is flat-layout, make it src-layout
  • remove poetry.lock
    • this doesn't respect the lock file (at this time)
  • change pyproject.toml
    • remove [tool.poetry] and [tool.poetry.*]
    • make [project] from [tool.poetry] and [tool.poetry.*]
    • change [build-system]
    • add [tool.rye]
    • add [tool.hatch.metadata]

Options

  • --ignore-src : use this flag to ignore creating src/ directory, so it won't change the project files layout.
  • --virtual : use this command to consider project as a virtual project (based on rye docs).

Virtual projects are projects which are themselves not installable Python packages, but that will sync their dependencies.

See full options with their descriptions with poetry2rye mig --help command,

Get Backup

poetry2rye get-backup [PATH]

Options:

  • -n [NUMBER]: The number of the backup to retrieve. If not specified, the last backup created will be used.
  • -y: Skip the confirmation prompt.

Retrieve the backup automatically created during migration and replace the project with the backup.

if NUMBER is not specified, the last backup created will be used.

The backup folder is .__p2r_backup_{project_name}_{number} format and placed in the same directory as the project directory (which is a child of the project parent directory).

Dockerfile

Since this tool does not support migration for Dockerfile (which is not rational to add), you've to migrate your Dockerfile manually based on rye documentation

Other

This tool is for personal use and should be used at your own risk. Backups will be made, but we cannot be held responsible for project corruption!

The license is the MIT License.

If you have any bugs, mistakes, feature suggestions, etc., issues and pull requests are welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poetry2rye-0.4.1.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poetry2rye-0.4.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file poetry2rye-0.4.1.tar.gz.

File metadata

  • Download URL: poetry2rye-0.4.1.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.24

File hashes

Hashes for poetry2rye-0.4.1.tar.gz
Algorithm Hash digest
SHA256 2cef9714e00bdc9b692ab978341fbc06a7fc12e2d2e529632c624232c7cc1855
MD5 a79acce4f8a5a577d8b935a729485966
BLAKE2b-256 4c16b9421bfe4bbe30f1e3f9cce759aa8302ac271cd42d26ac9ac4704729216e

See more details on using hashes here.

File details

Details for the file poetry2rye-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: poetry2rye-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.24

File hashes

Hashes for poetry2rye-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f363c927c70af09d7162cbb478aa1d02334169cb420c125f7b976fd7f2d93c1
MD5 8d4a13f28dfaf2526cf6a60ea71e5dfb
BLAKE2b-256 f8ecbb1bd4b23fad28b0c6d05bd6a06a722519a3f974fbf311c95fb2f6cfd723

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page