Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.3.1.post1 instead.
Reason given by maintainers: published wrong version by mistake

gcp-attest

Produce Digital Attestations and use PyPI Trusted Publishing using Google Cloud service accounts.

Setup

First, follow the setup guide.

# Build your package; e.g. with `python -m build`

# Sign files
gcp-attest sign dist/*

# Upload to PyPI incl. attestations
TWINE_USERNAME=__token__ \
TWINE_PASSWORD="$(gcp-attest exchange)" \
twine upload --attestations dist/*

Digital attestations

Run gcp-attest sign <FILES...> (alias: attest) in the same way you would run pypi-attestations sign. This will create attestations for all valid Python package files.

usage: gcp-attest attest [-h] [--staging] FILE [FILE ...]

positional arguments:
  FILE        file(s) to sign

options:
  -h, --help  show this help message and exit
  --staging   use the staging environment

PyPI uploading

Run gcp-attest exchange (alias: mint) to exchange a Google OIDC token for a PyPI upload token.

You can use --repository to specify a different repository (e.g. TestPyPI)

usage: gcp-attest exchange [-h] [--repository REPOSITORY]

options:
  -h, --help            show this help message and exit
  --repository, -r REPOSITORY
                        the repository (package index) to mint the token for

Why

PyPI encourages Trusted Publishing, but their supported platforms do not include Codeberg. This is understandable: Supporting a new platform means trusting it, and for a long time neither of Codeberg's CI options even had an option to issue OIDC tokens.

PyPI trusts Google's OIDC, though. All OIDC tokens issued by Google Cloud IAM can be exchanged against valid PyPI publishing tokens. The same applies to Sigstore and digital attestations.

Google Cloud OIDC tokens usually represent a service account. There are multiple ways to "log in" as said account to issue tokens:

  1. Inside a Google Cloud workflow. This is the expected way and already supported by di/id and pypi-attestations.
  2. Using a long-lived credentials key file.
  3. Using Workload Identity Federation

The last one is interesting, as it allows us to exchange OIDC tokens from any valid identity provider for Google Cloud tokens. This way, Google Cloud acts like a proxy between PyPI and not (yet) supported OIDC providers.

This project aims to simplify publishing process by offering APIs to create attestations and exchange tokens.

Licence

© 2026 Nikita Karamov
Licensed under the ISC License

Download files

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

Source Distribution

gcp_attest-0.3.1.post2.dev0.tar.gz (158.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gcp_attest-0.3.1.post2.dev0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file gcp_attest-0.3.1.post2.dev0.tar.gz.

File metadata

  • Download URL: gcp_attest-0.3.1.post2.dev0.tar.gz
  • Upload date:
  • Size: 158.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gcp_attest-0.3.1.post2.dev0.tar.gz
Algorithm Hash digest
SHA256 3a07fb71cd56f7485174cdce76fb0a298e0745fcec3a8ed312a44124c6d9313f
MD5 c11a9d1f2a146411a062f1b98086ba08
BLAKE2b-256 5c71f7c94c4f1e5474b81be0860c83f613e6c6204d809d1fda227476a043f1f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for gcp_attest-0.3.1.post2.dev0.tar.gz:

Publisher: pypi-publish@kytta-dev.iam.gserviceaccount.com

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.
  • Statement: Publication detail:
    • Token Issuer: https://accounts.google.com
    • Service Account: pypi-publish@kytta-dev.iam.gserviceaccount.com

File details

Details for the file gcp_attest-0.3.1.post2.dev0-py3-none-any.whl.

File metadata

  • Download URL: gcp_attest-0.3.1.post2.dev0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gcp_attest-0.3.1.post2.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 6bbcb0d2be64bfa7f8dd782cddfc63c61b565868d6a741d483acf2bb455186ac
MD5 5bc407da7eaa96d92c858367046ed7c0
BLAKE2b-256 ce60e75de9065d85d75a69d2b2b13730f1062e056c3d75a1fa1dd5da380c09be

See more details on using hashes here.

Provenance

The following attestation bundles were made for gcp_attest-0.3.1.post2.dev0-py3-none-any.whl:

Publisher: pypi-publish@kytta-dev.iam.gserviceaccount.com

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.
  • Statement: Publication detail:
    • Token Issuer: https://accounts.google.com
    • Service Account: pypi-publish@kytta-dev.iam.gserviceaccount.com

Release history Release notifications | RSS feed

This release

0.3.1.post2.dev0 This release

2 files

0.3.1.post1

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page