Awesome Open Source
Awesome Open Source

Poetry PyCharm Plugin

CI JetBrains IntelliJ plugins JetBrains IntelliJ Plugins license

A JetBrains PyCharm plugin for poetry.

Help

See documentation for more details.

Demo

poetry_demo1

Quick Installation

The plugin is in JetBrains repository (Poetry Plugin Page)

You can install the stable version on PyCharm's Marketplace (Preference -> Plugins -> Marketplace) Official Document

I recommend PyCharm 2020.3 and the plugin version 1.0 or later to get all features and performance.

search plugin

Features

Implemented

  • add a new/existing poetry environment as a interpreter
  • install packages with pyproject.toml when add a interpreter
  • add a new pyproject.toml when it does not exists
  • install and import a package with poetry (QuickFix)
  • install packages from poetry.lock
  • update and lock with a popup
  • show a message and a link to fix settings (QuickFix)
  • install extras and run scripts by clicking a line marker (Toml plugin is required)
  • show a message for outdated version packages (Toml plugin is required)
  • install/uninstall packages from GUI
  • detect poetry project when open new project

Motivation

Poetry is a popular package manager of python.

However, PyCharm doesn't support poetry.

This plugin support poetry. This source code was forked from the Pipenv integration code in IntelliJ-community.

In this issue PY-30702, the feature is discussing. But, We need time to get the proper functionality in PyCharm.

The plugin has useful features like installing from poetry.lock.(you can watch demo video)

However, The feature is limited. PyCharm has to provided extension points for perfect features.

I guess if the plugin be used a lot of people, then JetBrains developers will implement extension points or poetry integration in PyCharm.

This project is currently in an experimental phase

This plugin supports minimum features to use poetry in PyCharm.

There is feature restrictions.

But, PyCharm team will add a few api to resolve the problem. The detail is in this issue.

PyCharm provides APIs that are for third-party package manager plugins.

The project needs any feedback and PRs. We're waiting for your feedback and PRs.

Feature Restrictions

The plugin can't provide some features for technical reasons.

Because PyCharm has not provided APIs to support third-party python package managers yet. (a.k.a extension points)

We will be able to implement the following features when JetBrains add extension points to PyCharms.

  • Create a new environment when creating a new project.
  • Use the Custom Icon for poetry. (Coming Soon)
  • Install/uninstall a package from GUI(settings)
  • And more.

Screen Shots

add_package new_sdk installed_package run_config update_lock quick_fix install_from_lock_file install_extras

Contribute

We are waiting for your contributions to poetry-pycharm-plugin.

Links


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (55,543
kotlin (3,775
plugin (812
pip (69
jetbrains (60
lock (47
pycharm (37
poetry (27