Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Python language client information. #338

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/gh-action-sigstore-python@v3.0.0
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 'my_email@example.com' \
--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.
Loading