Skip to main content

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.
  • operator(signals) returns ci, agent, interactive, or unknown; precedence is in that order.
  • Signals is the dataclass returned by detection.
  • sanitize_invoked_by(value) and classify_parent_name(raw) are exposed for tests and advanced consumers that need the shared contract helpers.

Development

python3 -m unittest

Metadata

Release files for client-signals 0.5.0

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

Source distribution (sdist)

Source distribution for client-signals 0.5.0
File Size Uploaded Provenance Actions
client_signals-0.5.0.tar.gz 3.9 kB With provenance Details for client_signals-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for client-signals 0.5.0
File Interpreter ABI Platform Actions
client_signals-0.5.0-py3-none-any.whl Python 3 none any Details for client_signals-0.5.0-py3-none-any.whl

Total release size: 8.2 kB

Release files / client_signals-0.5.0.tar.gz

Download URL client_signals-0.5.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d8a41242162d858959780757f5c22ecb77d668156bfe7ec0e0716d995e81e6db
BLAKE2b-256 checksum
How to use checksums
f1c239d3a5aee89961a77a1af668ac89b2e91feebfcdf4d140858f1a6803ee1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / client_signals-0.5.0-py3-none-any.whl

Download URL client_signals-0.5.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd04dcf9aaeb44af11cc83cef79e80353abc88c9fa2af81d7d07291ec9605e29
BLAKE2b-256 checksum
How to use checksums
1745ea24e401723aa592701734bfdf005a6c0cb3b58b77e5d7ed7003b611a7f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Security for client-signals 0.5.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for client_signals-0.5.0.tar.gz

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 Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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