TestPyPI · API token
How an agent gets a TestPyPI · API token key through KeyKeeper, what to choose on test.pypi.org, and how KeyKeeper verifies it.
| Template id | pypi-test |
|---|---|
| Field | twine-password → TWINE_PASSWORD · secret |
| Also | twine-username → TWINE_USERNAME · plain, confirmed by you |
| Key looks like | starts with pypi-, at least 90 characters, shown once when created |
| Created at | test.pypi.org |
| Verified by KeyKeeper | not verified |
| Template checked | 2026-09-15 |
What the agent does
keykeeper providers show pypi-test
keykeeper save --provider pypi-test --from-clipboard --create --purpose "what this task does"
keykeeper run -c pypi-test -- <your command>--provider pypi-test fills in the credential id and the fields. The environment
variables are the ones PyPI's own tools read, so nothing has to be mapped.
What only you can do
Sign in to the separate TestPyPI account
Create an API token
Choose the test project when it already exists
Copy the key, then approve the save in KeyKeeper's window.
What to choose
TestPyPI accounts and tokens are separate from production PyPI. Prefer a project-scoped token.
The agent is told the same thing. It opens the page for you and says what to pick; it never logs in, passes 2FA or pays on your behalf.
What KeyKeeper checks
- Before writing: the value must look like a TestPyPI · API token key (starts with
pypi-, at least 90 characters). A wrong paste is refused before anything is stored, and the agent is told why — without the value. - After saving: TestPyPI · API token offers no read-only endpoint KeyKeeper can use, so the first real call is the test.
Rotation and expiry
No universal expiry policy was confirmed for this credential type. Record the date shown by the provider, or leave it unknown. Rotate or revoke at test.pypi.org.