python-poetry / python-poetry/poetry

Expose stable Python API

Open
#3,416 1 comment 2 reactions 1 assignee View on GitHub

@Secrus is already working on this.

Since Sep 26, 2024.

kind/feature status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

Howdy folks,

Our build system is mostly written in Python, so it'd be nice if I could consume poetry's CLI from Python.

As an example, I'd love to be able to do things like:

import poetry.poetry

project = poetry.poetry.Poetry("./my/path")
project.lock()  # Mirrors 'poetry lock'
project.add(...)  # I think you get the idea

(This would also be helpful for my test suites operating on fake projects, as I can generate them on-the-fly).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.