Skip to content

Commit

Permalink
Adding Python language client information. (#338)
Browse files Browse the repository at this point in the history
* 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
hayleycd authored Oct 29, 2024
1 parent 8896f1d commit 29e6125
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/en/language_clients/language_client_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Sigstore uses [cosign](../../cosign/signing/overview) to sign and verify package

Sigstore has clients for the following language ecosystems:

- [Python](https://github.com/sigstore/sigstore-python#sigstore-python)
- [Python](../python/overview)
- [Rust](https://github.com/sigstore/sigstore-rs#features)
- [Ruby](https://github.com/sigstore/sigstore-ruby#sigstore)
- [JavaScript](https://github.com/sigstore/sigstore-js#sigstore-js---)
- [Java](https://github.com/sigstore/sigstore-java#sigstore-java)
- [Go](https://github.com/sigstore/sigstore-go#sigstore-go)

Currently, language client documentation is hosted in the individual project repositories. This documentation is being migrated to the general sigstore docs.
Language client documentation is hosted in the individual project repositories. Project summaries are currently being added to the main Sigstore documentation.
11 changes: 11 additions & 0 deletions content/en/language_clients/python/_index.html
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
---
71 changes: 71 additions & 0 deletions content/en/language_clients/python/overview.md
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.

0 comments on commit 29e6125

Please sign in to comment.