Poetry.el
Python dependency management and packaging in Emacs
Install / Use
/learn @cybniv/Poetry.elREADME
[[https://github.com/cybniv/poetry.el/blob/master/LICENSE][https://img.shields.io/badge/license-GPL-brightgreen.svg]] [[https://www.python.org/download][https://img.shields.io/badge/python-3.7+-blue.svg]] [[https://melpa.org/#/poetry][file:https://melpa.org/packages/poetry-badge.svg]] [[https://stable.melpa.org/#/poetry][file:https://stable.melpa.org/packages/poetry-badge.svg]]
- Important notice
I recently took over maintaining this project. I actively use this package with GNU Emacs 29.3 and poetry 1.8.2 on macOS.
- poetry.el
[[https://python-poetry.org][Poetry]] in Emacs.
From Poetry documentation: "Poetry is a tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you."
~poetry.el~ is a wrapper around Poetry, offering a simple an intuitive interface in Emacs.
** Installation
*** From Melpa
poetry.el is available on Melpa, the most straightforward way of installing it is to use ~use-package~:
#+BEGIN_SRC elisp (use-package poetry :ensure t) #+END_SRC
*** Manually
-
Dependencies
poetry.el needs ~transient~ and ~pyvenv~ to be installed. These packages are both available on MELPA.
-
Clone the ~poetry.el~ repository:
#+BEGIN_SRC bash $ git clone https://github.com/cybniv/poetry.el /path/to/poetry.el #+END_SRC
-
Add the following lines to ~.emacs.el~ (or equivalent):
#+BEGIN_SRC elisp (add-to-list 'load-path "/path/to/poetry.el") (require 'poetry) #+END_SRC
** Usage
poetry.el uses [[https://github.com/magit/transient][transient]] to provide a magit-like interface. The entry point is simply: #+BEGIN_SRC elisp M-x poetry #+END_SRC The interface should then be pretty much self-explanatory for poetry users:
#+attr_html: :width 400px [[doc/screenshot1.png]]
For users not familiar with how ~Poetry~ works, the [[https://python-poetry.org/docs/][documentation]] is a great place to start.
*** Tracking Poetry virtualenv ~poetry.el~ also provides a global minor mode that automatically activate the correct virtualenv when visiting Poetry project files. You can activate this feature with: #+BEGIN_SRC elisp M-x poetry-tracking-mode #+END_SRC
By default, poetry.el checks if the virtualenv needs to be updated after every command. It has the advantage of always providing the right virtualenv, but can be annoyingly slow. You can change the strategy poetry.el uses through the ~poetry-tracking-strategy~.
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
84.6kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
341.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
