poetry-pycharm-plugin
A JetBrains PyCharm plugin for poetry
.
This plugin has been merged into PyCharm source code🎉
PyCharm 2021.3 or later provide poetry integration as a built-in feature😎
If you have any questions then please crate an issue on JetBrains youtrack
JetBrains maintains the poetry feature in PyCharm.
Sponsors
Help
See documentation for more details.
Demo
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.
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
Contribute
We are waiting for your contributions to poetry-pycharm-plugin
.
Links
- A JetBrains PyCharm plugin for
pydantic
. - I got interviewed about creating a plugin for JetBrains' PyCharm Blog.