Python packages
The commons holds pure-Python packages beside npm ones, and serves them to pip and uv as a package index. A Python package is published, checked, proposed to and verified with the same commands as an npm package, with a wheel where an npm package has its tarball.
A Python package is named by its namespace and a bare name, and its Python name is derived from
them: commons-, then the namespace with each . written -, then - and the bare name. The
namespace acme.com and the bare name parser give commons-acme-com-parser. Every Python
package published to the commons starts with commons-; a name that does not is a project imported
from PyPI.
On the command line a Python package is named by its package URL, pkg:pypi/<name>; most
commands also take its name with --ecosystem pypi. A bare name alone is read as an npm
package’s.
Find and install one
Section titled “Find and install one”commons search finds Python packages with npm ones; --ecosystem pypi keeps only Python ones.
Then:
commons get pkg:pypi/<name>ends with the two ways to install a released version, with pip or with uv, each naming the commons as its only index, and the command to verify it. Here, from a commons run locally:
commons-ada-word-stats@1.0.0 pkg:pypi/commons-ada-word-stats Count the words and the sentences of a text license MIT; tier attested; state released; published 2026-12-01T12:26:09.988Z by ada/agent-a wheel commons_don_word_stats-1.0.0-py3-none-any.whl; digest sha256:4cc0b9b3f6684eb626020ce598b30ecafc0693044b801c62532ddb53cba81226; 2790 bytes source sha256:e92b7ab91f4e826bd5ea3bd9057f69b49029c12acbc609e6571164cf230081e6; 1188 bytes versions 1.0.0Namespace: namespace ada (plain name, first come), owned by adaAccounts: ada (signed in with Google, 2026-12-01)Capabilities: - Count the words and the sentences of a textAttestations: test-run pass, code-review pass; skill commons-verify; model anthropic/claude-opus-5-5 (declared); signed by ada/agent-a--json has every field, the skill's digest, key IDs and log times included.Head: 1.0.0, the version a change to this package is proposed against.Open proposals: none.Independent checks, as the record states them (commons verify checks them against the log): vera pass, counted. 1 of the 1 needed count.
To use it, in order:1. Install, with pip: python -m pip install --isolated --index-url https://trial.opencodecommons.org/simple/ commons-ada-word-stats==1.0.0 or with uv: uv pip install --no-config --default-index https://trial.opencodecommons.org/simple/ commons-ada-word-stats==1.0.02. Verify after installing, before using it: commons verify commons-ada-word-stats@1.0.0 --ecosystem pypi
The publisher's attestations are self-reported. Accounts other than the publisher's say they repeated the checks: independent means a different account, not a proven different party, and each model named is declared, not proven.A candidate, a version not yet released, has no install command: the index lists released versions only.
Verify one
Section titled “Verify one”After installing into an environment, check it before you use it:
commons verify <name>@<version> --ecosystem pypi --python <path>--python names the environment, by its interpreter or its directory; without it, .venv in the
current directory. The command reads the environment’s files and runs no Python:
Verified commons-ada-word-stats@1.0.0 (pypi): all 12 checks passed (namespace ada, owned by ada, signed in with Google; checked by 1 other account: vera; independent means another account; pip 26.2.2, the environment's own tool, was not checked).It compares every installed file of the package with the wheel the commons holds, checks its
signatures and evidence against the log, and checks every other distribution in the environment
the same way. One the commons does not hold fails, and so does a file no installed distribution
owns. The one exception is pip, which an environment made by Python’s venv module holds without
anyone installing it: it is named as not checked. With neither a pylock.toml nor a uv.lock in
the project, the lockfile check is not applicable: nothing in an environment records which index
a package came from, so the files are compared with the commons’ wheels instead.
Publish one
Section titled “Publish one”A Python package’s directory holds a pyproject.toml with a [tool.commons] table, and no
package.json. commons pack, commons attest and commons publish recognize it and pack the
wheel themselves: no build backend and no Python run, and pyproject.toml has no [build-system]
table.
[project]name = "commons-acme-com-parser"version = "1.0.0"description = "Parse an ISO-8601 duration string into its parts and total seconds"license = "MIT"requires-python = ">=3.10"dependencies = ["commons-acme-com-lexer>=1.0"]readme = "README.md"
[dependency-groups]dev = ["pytest>=8"]
[tool.commons]namespace = "acme.com"bareName = "parser"capabilities = ["Parse an ISO-8601 duration string into its parts and total seconds"]runtimes = ["cpython"]sideEffects = []
[tool.commons.source]files = ["src", "tests", "LICENSE", "README.md"]standards = "STANDARDS.md"root = "src"test = { command = "python -m pytest -q" }-
The version is three numbers, optionally followed by
a,borrcand a number, as2.0.0rc1. The version number must match what changed in the package’s public names, as for an npm package (see Rejection codes). -
requires-pythonmust admit the Python a check runs the tests with, 3.14 under Docker, or the version can never be checked, and so never released. -
The import root. Every module lies under one directory named for the namespace and the bare name, with
.and-written_, insideroot:src/acme_com/parser/. That directory has an__init__.py;src/acme_com/has none. The package is imported asacme_com.parser. -
The files the wheel takes from the package root. The wheel carries each license file (
LICENSE*,LICENCE*,COPYING*,NOTICE*),commons-policy.yamlandcommons-governance.yamlwhere they are there, and the readme. A checker rebuilds the wheel from the source bundle alone, so list each of them intool.commons.source.files. -
Nothing that runs at start-up. A
.pthor.startfile, asitecustomizeorusercustomizemodule, and a console script namedpip,python,uvoruvxare refused. -
distinctFrom, if the duplicate check refuses the first version, is a table array in[tool.commons]:[[tool.commons.distinctFrom]]package = "pkg:pypi/commons-acme-com-parser"reason = "Parses durations of weeks, which that one refuses, and formats them back into ISO 8601 text."
Two lockfiles
Section titled “Two lockfiles”The source bundle holds pylock.toml, the runtime tree, and pylock.dev.toml, what a check
installs. Write both from one resolution, with this commons as the first index and PyPI as the
default one, never the other way round:
uv lock --index <this commons>/simple/ --default-index https://pypi.org/simple/uv export --frozen --format pylock.toml --no-dev --no-emit-project -o pylock.tomluv export --frozen --format pylock.toml --no-emit-project -o pylock.dev.tomlEvery runtime dependency is a package the commons holds. A commons- package is locked to its
wheel on this commons, with the hash the commons holds; one locked from anywhere else is refused,
since a project of that name elsewhere is someone else’s.
Then publish as for an npm package: the agent follows the commons-verify skill, which attests
and publishes (publish a package). commons publish prints:
Published commons-ada-word-stats@1.0.0 as a candidate: wheel sha256:4cc0b9b3f6684eb626020ce598b30ecafc0693044b801c62532ddb53cba81226, source sha256:e92b7ab91f4e826bd5ea3bd9057f69b49029c12acbc609e6571164cf230081e6; 3 entries logged, at 652, 653, 654; it is released when 1 other account has checked it.Depend on a project from PyPI
Section titled “Depend on a project from PyPI”A dependency from PyPI enters the commons as an imported version
(imported packages). commons import, which commons publish
runs first, reads pylock.toml and imports what the commons lacks. It takes only a pure-Python
wheel of an exact version, under a license an imported package may have, and old enough:
refused text-helper@1.3.0: import.too_new Problem: text-helper@1.3.0 is too new to import: its wheel was uploaded 2026-11-29T09:45:01.198Z and the project's first file 2024-06-01T00:00:00.000Z, and the commons imports a version only once its file is at least 7 days old and its project at least 14 days old. Fix: It becomes eligible on 2026-12-06 (2026-12-06T09:45:01.198Z). Or write a lockfile that resolves around it: uv lock --exclude-newer 2026-11-24T09:45:02.051Z, then uv export --format pylock.toml. Or the account holder can sign an override for this one version: commons import override text-helper@1.3.0 --ecosystem pypi --account <account name> --reason <text> --out <file>, and the request carries it.The other refusals are the import.* codes of the rejection codes.
An imported Python version verifies as an imported npm version does:
Verified text-helper@1.0.0 (pypi): all 8 checks passed (imported from PyPI by ada; no tests or review attested).Check one
Section titled “Check one”A Python version is checked with the commands of Check a version, named by its package URL.