Skip to content

Add plugin for Python poetry build tool - #725

Merged
rr3khan merged 7 commits into
1Password:mainfrom
acourtneybrown:add-poetry
Dec 4, 2026
Merged

rr3khan merged 7 commits into
1Password:mainfrom
acourtneybrown:add-poetry

Conversation

@acourtneybrown

Copy link
Copy Markdown
Contributor

Overview

Adds a shell plugin that provisions PyPI API tokens for the Python poetry build tool. It looks for envvars of the form POETRY_PYPI_TOKEN_* for import. Also imports existing credentials from Poetry's auth.toml file.

With the different source of credentials from the pypi plugin and handling of envvars based on the different Poetry repository (-r argument to poetry publish), it didn't seem like a good fit to attempt to shoehorn this change into the pypi plugin.

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

Related Issue(s)

  • Resolves: #
  • Relates: #

How To Test

poetry publish

Changelog

Authenticate poetry to publish to PyPI repositories using Touch ID and other unlock options with 1Password Shell Plugins.

Initial structure & code generated by Opencode.
* origin/main:
  Fix authentication injection in interactive Copilot CLI (1Password#715)
  feat(aws): add support for AWS IAM Identity Center (SSO) (1Password#622)
  feat(sdk): support plugins with more than one credential type (1Password#710)
* origin/main:
  feat: Create plugin for Railway CLI (1Password#481)
  fix(vercel): provide API token through VERCEL_TOKEN instead of --token (1Password#717)
  Add shell plugin for SonarQube CLI (1Password#628)
  Bump golang.org/x/mod from 0.42.0 to 0.43.0 (1Password#714)
  Bump step-security/harden-runner from 2.22.4 to 2.23.0 (1Password#718)
  Bump actions/create-github-app-token from 3.3.0 to 3.4.0 (1Password#719)
  Bump actions/setup-go from 7.0.0 to 7.1.0 (1Password#720)
  [automation]: Update Flake dependencies (1Password#716)
This change also fixes the import from `auth.toml` as the initial `struct`s didn't properly unmarshall from the `.toml` file.
Comment thread plugins/poetry/provisioner.go Resolved
acourtneybrown and others added 3 commits December 4, 2026 10:15
Co-authored-by: rr3khan <65298773+rr3khan@users.noreply.github.com>
It now generates two possible import candidates, one with the underscores
and another with the underscores replaced by dashes.
@acourtneybrown

Copy link
Copy Markdown
Contributor Author

@rr3khan Thanks for pointing out the dashes vs underscores. I hadn't seen that in practice myself, nor from the docs. It also made me realize that the env var import could present the inverse problem, so I've also updated that to generate 2 different possible import candidates.

@rr3khan rr3khan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @acourtneybrown approved and will merge. This plugin will be available in a future release of the cli.

@rr3khan
rr3khan merged commit 8783d91 into 1Password:main Dec 4, 2026
2 checks passed
@acourtneybrown
acourtneybrown deleted the add-poetry branch December 4, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants