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.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for poetry_plugin_shell-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2c2f878f2dbf488cdfd990fc7205af858280942f4ff766d7bbc5aa8b198a1762
MD5 19199fee8f5ecb729919b405ced059ca
BLAKE2b-256 7cdeeb51fa4f65050be11c73dd88de9b2b01c466910d843999d622b7be8ace29

See more details on using hashes here.

Provenance

The following attestation bundles were made for poetry_plugin_shell-1.0.1.tar.gz:

Publisher: release.yml on python-poetry/poetry-plugin-shell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for poetry_plugin_shell-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d862799a31fa710b5e52f91415ae3b9e3374e302b7646b3829c6d776ffe2c36
MD5 ddae143c5978776ea7d481dc0148e9e3
BLAKE2b-256 3ac6f94cabf9c8e46eda1aaa24962a0a6b84ed987b25e7ebcbe007bc689350c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for poetry_plugin_shell-1.0.1-py3-none-any.whl:

Publisher: release.yml on python-poetry/poetry-plugin-shell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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