-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Python language client information. (#338)
* Adding Python language client information. Signed-off-by: hayleycd <[email protected]> * Addressing linter items. Signed-off-by: hayleycd <[email protected]> --------- Signed-off-by: hayleycd <[email protected]>
- Loading branch information
Showing
3 changed files
with
84 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
type: docs | ||
title: "Python" | ||
description: "Python Language Client" | ||
lead: "Python Language Client" | ||
date: 2024-10-06T08:49:15+00:00 | ||
lastmod: 2024-10-06T08:49:15+00:00 | ||
draft: false | ||
images: [] | ||
weight: 30 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
type: docs | ||
category: Python | ||
title: Python Client Overview | ||
weight: 5 | ||
--- | ||
|
||
[`sigstore`](https://pypi.org/project/sigstore/) is a Python tool for generating and verifying Sigstore signatures. You can use it to sign and verify Python package distributions, or anything else! | ||
|
||
Full project documentation can be found in the [sigstore-python](https://github.com/sigstore/sigstore-python#sigstore-python) project README and our [API documentation](https://sigstore.github.io/sigstore-python). | ||
|
||
## Features | ||
|
||
* Support for keyless signature generation and verification with Sigstore | ||
* Support for signing with ["ambient" OpenID Connect identities](https://github.com/sigstore/sigstore-python#signing-with-ambient-credentials) | ||
* A comprehensive [CLI](https://github.com/sigstore/sigstore-python#usage) and corresponding [importable Python API](https://sigstore.github.io/sigstore-python) | ||
* An official [GitHub Action](https://github.com/sigstore/gh-action-sigstore-python) | ||
|
||
## Installation | ||
|
||
### Language client Installation | ||
|
||
`sigstore` requires Python 3.9 or newer, and can be installed directly via `pip`: | ||
|
||
```console | ||
python -m pip install sigstore | ||
``` | ||
|
||
Optionally, you can install `sigstore` and all its dependencies with [hash-checking mode](https://pip.pypa.io/en/stable/topics/secure-installs/#hash-checking-mode) enabled. Learn more about it in our [project documentation](https://github.com/sigstore/sigstore-python#installation) | ||
|
||
### GitHub Action Installation | ||
|
||
You can install the official sigstore-python [GitHub Action](https://github.com/sigstore/gh-action-sigstore-python) from the | ||
[GitHub Marketplace](https://github.com/marketplace/actions/gh-action-sigstore-python). | ||
|
||
You can also manually add the sigstore-python action to your CI: | ||
|
||
```yaml | ||
jobs: | ||
sigstore-python: | ||
steps: | ||
- uses: sigstore/[email protected] | ||
with: | ||
inputs: foo.txt | ||
``` | ||
## Example | ||
### Signing example | ||
For this example, we will sign a a file named `foo.txt`. [`sigstore`](https://pypi.org/project/sigstore/) will use OpenID Connect (OIDC) to veryify your email address. | ||
|
||
Use the following command to sign `foo.txt`: | ||
|
||
```console | ||
sigstore sign foo.txt | ||
``` | ||
|
||
### Verifying example | ||
|
||
To verify the signature on `foo.txt` run the following command: | ||
|
||
```console | ||
sigstore verify identity foo.txt \ | ||
--cert-identity '[email protected]' \ | ||
--cert-oidc-issuer 'oidc_issuer_URL' | ||
``` | ||
|
||
### Additional use cases | ||
|
||
Additional use cases can be found in the [sigstore-python](https://github.com/sigstore/sigstore-python#usage) project README. |