Skip to main content

Poetry plugin to run subshell with virtual environment activated

Project description

Poetry Plugin: Shell

Poetry

[!NOTE] We are looking for maintainers, see the issue.

This package is a plugin that runs a subshell with virtual environment activated.

This plugin replaces the same feature as the shell command previously available in Poetry.

Installation

The easiest way to install the shell plugin is via the self add command of Poetry.

poetry self add poetry-plugin-shell

If you used pipx to install Poetry you can add the plugin via the pipx inject command.

pipx inject poetry poetry-plugin-shell

Otherwise, if you used pip to install Poetry you can add the plugin packages via the pip install command.

pip install poetry-plugin-shell

Usage

The plugin provides a shell command to run a subshell with virtual environment activated.

poetry shell

By default, the current active shell is detected and used. Failing that, the shell defined via the environment variable SHELL (on *nix) or COMSPEC (on Windows) is used.

If a virtual environment does not exist, it will be created.

Note that this command starts a new shell and activates the virtual environment.

As such, exit should be used to properly exit the shell and the virtual environment instead of deactivate.

[!NOTE] This plugin internally uses the Shellingham project to detect current active shell.

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

poetry_plugin_shell-1.0.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

poetry_plugin_shell-1.0.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file poetry_plugin_shell-1.0.0.tar.gz.

File metadata

  • Download URL: poetry_plugin_shell-1.0.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.7

File hashes

Hashes for poetry_plugin_shell-1.0.0.tar.gz
Algorithm Hash digest
SHA256 691932d0409b5ad0b9dc91c911fa621a360ebbd461b33c65f0f43c3e9b1fb6bc
MD5 9dee7cd75727702c620731682e949d36
BLAKE2b-256 88f148059713a5a4ec40770c1f907cc6448b60610fc3d64a2f093f95c6f56ddf

See more details on using hashes here.

File details

Details for the file poetry_plugin_shell-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_plugin_shell-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db6a4c26c584c4c8c87c1a0679dc5e947916004c73cccbe86dc78a8a7541b0fc
MD5 f84f2fd26676c8902d43aff2cafefcd2
BLAKE2b-256 61629620cfd53ce1647e9700fc782d85cca0e7010fb005ff510bfc882642007e

See more details on using hashes here.

Supported by

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