Skip to main content

Library and CLI tool for retrieving PyPI project tokens

Project description

pypi-token-client

pipeline status docs pypi supported python versions

Library and CLI tool for retrieving PyPI project tokens.

Purpose

PyPI allows the creation of per-project tokens but doesn't currently have an API to do so. While integration with CI providers is planned, apparently there is no plan for an API that would allow one to create tokens from a local development machine.

This tool seeks to provide a client exposing this functionality anyway by whatever means necessary.

Operating principle

Because there is no API and I'm also too lazy to try and figure out the exact sequence of HTTP requests one would have to make to simulate what happens when requesting tokens on the PyPI website, for now this tool just uses Playwright to automate performing the necessary steps in an actual browser.

This might be overkill and brittle but it works for now 🤷

Installation

pip3 install pypi-token-client
# install the necessary browsers for Playwright
playwright install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypi_token_client-1.0.1.tar.gz (9.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page