Privacy-safe client signals for CLI HTTP traffic.
Project description
client-signals for Python
Python implementation of the shared client-signals contract.
Installation
pip install client-signals
Import as client_signals.
Requires Python 3.9 or newer.
Usage
import client_signals
signals = client_signals.detect_once()
headers = {}
client_signals.apply_headers(headers, signals)
headers["User-Agent"] = f"my-cli/1.0 {client_signals.user_agent_suffix(signals)}"
Use a custom header prefix:
client_signals.apply_headers(headers, signals, prefix="Acme")
API
detect()computes fresh signals.detect_once()computes and caches process-wide signals.headers_for(signals, prefix="Fly")returns a header dictionary.apply_headers(target, signals, prefix="Fly")updates a mutable header mapping.user_agent_suffix(signals)returns the client-signals User-Agent token.Signalsis the dataclass returned by detection.sanitize_invoked_by(value)andclassify_parent_name(raw)are exposed for tests and advanced consumers that need the shared contract helpers.
Development
python3 -m unittest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file client_signals-0.4.1.tar.gz.
File metadata
- Download URL: client_signals-0.4.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9865d463c6ec39f3061093a5da09b7028b9175e0bfaf710c265168e06c8a250a
|
|
| MD5 |
e76fcdd3ae935269835bc0d971b865af
|
|
| BLAKE2b-256 |
75d85371aaf01e5afc3ed24c89eacb998307ede7471bdfba91d7bd50a05069d3
|
Provenance
The following attestation bundles were made for client_signals-0.4.1.tar.gz:
Publisher:
publish-python.yml on superfly/client-signals
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
client_signals-0.4.1.tar.gz -
Subject digest:
9865d463c6ec39f3061093a5da09b7028b9175e0bfaf710c265168e06c8a250a - Sigstore transparency entry: 2138462131
- Sigstore integration time:
-
Permalink:
superfly/client-signals@b3c6b8d15f043db3a8578e8ecad56cdd392d4b1d -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/superfly
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@b3c6b8d15f043db3a8578e8ecad56cdd392d4b1d -
Trigger Event:
push
-
Statement type:
File details
Details for the file client_signals-0.4.1-py3-none-any.whl.
File metadata
- Download URL: client_signals-0.4.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d7b64d9898a32ddacab94675ae530236c9d6080573adcb147d2780c1e0633ea
|
|
| MD5 |
dad0fc459f1e0e344e6f97d0cee99d94
|
|
| BLAKE2b-256 |
356f4c3f280688e8a38ae622ca49d97ce0cbf0e5fa45ccf9434bc1f6ebdc5c30
|
Provenance
The following attestation bundles were made for client_signals-0.4.1-py3-none-any.whl:
Publisher:
publish-python.yml on superfly/client-signals
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
client_signals-0.4.1-py3-none-any.whl -
Subject digest:
6d7b64d9898a32ddacab94675ae530236c9d6080573adcb147d2780c1e0633ea - Sigstore transparency entry: 2138462180
- Sigstore integration time:
-
Permalink:
superfly/client-signals@b3c6b8d15f043db3a8578e8ecad56cdd392d4b1d -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/superfly
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@b3c6b8d15f043db3a8578e8ecad56cdd392d4b1d -
Trigger Event:
push
-
Statement type: