Skip to main content

id

CI PyPI version OpenSSF Scorecard SLSA

id is a Python tool for generating OIDC identities. It can automatically detect and produce OIDC credentials on a number of environments, including GitHub Actions, GitLab pipelines and Google Cloud.

Installation

id requires Python 3.8 or newer, and can be installed directly via pip:

python -m pip install id

Usage

You can run id as a Python module via python -m:

python -m id --help

Top-level:

usage: id [-h] [-V] [-v] [-d] audience

a tool for generating OIDC identities

positional arguments:
  audience       the OIDC audience to use

optional arguments:
  -h, --help     show this help message and exit
  -V, --version  show program's version number and exit
  -v, --verbose  run with additional debug logging; supply multiple times to
                 increase verbosity (default: 0)
  -d, --decode   decode the OIDC token into JSON (default: False)

For Python API usage, there is a single importable function, detect_credential:

>>> from id import detect_credential
>>> detect_credential(audience='something')
'<OIDC token>'

This function requires an audience parameter, which is used when generating the OIDC token. This should be set to the intended audience for the token.

If no supported environment is found, detect_credential returns None. If a supported environment is found but detect_credential fails to retrieve a token, it raises AmbientCredentialError.

Supported environments

id currently supports ambient credential detection in the following environments:

Tokens in environment variables

GitLab provides OIDC tokens through environment variables. The variable name must be <AUD>_ID_TOKEN where <AUD> is the uppercased audience argument where all characters outside of ASCII letters and digits are replaced with "_". A leading digit must also be replaced with a "_".

Licensing

id is licensed under the Apache 2.0 License.

Contributing

See the contributing docs for details.

SLSA Provenance

This project emits a SLSA provenance on its release! This enables you to verify the integrity of the downloaded artifacts and ensured that the binary's code really comes from this source code.

To do so, please follow the instructions here.

Release files for id 1.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for id 1.6.1
File Size Uploaded
id-1.6.1.tar.gz 18.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for id 1.6.1
File Interpreter ABI Platform
id-1.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 32.8 kB

Release files / id-1.6.1.tar.gz

Download URL id-1.6.1.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d0732d624fb46fd4e7bc4e5152f00214450953b9e772c182c1c22964def1a069
BLAKE2b-256 checksum
How to use checksums
6d04c2156091427636080787aac190019dc64096e56a23b7364d3c1764ee3a06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 4, 2026.

Transparency log

Release files / id-1.6.1-py3-none-any.whl

Download URL id-1.6.1-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5ec41ed2629a508f5d0988eda142e190c9c6da971100612c4de9ad9f9b237ca
BLAKE2b-256 checksum
How to use checksums
4277de194443bf38daed9452139e960c632b0ef9f9a5dd9ce605fdf18ca9f1b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.6.1 This release

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.1.0

2 release files

1.0.0

2 release 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