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.
  • 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

client_signals-0.4.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

client_signals-0.4.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file client_signals-0.4.2.tar.gz.

File metadata

  • Download URL: client_signals-0.4.2.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

Hashes for client_signals-0.4.2.tar.gz
Algorithm Hash digest
SHA256 89fd4cd8e022fec2fd31fe7bffc57ca4f6d694744d6ca7793554244b3562643f
MD5 9fd708053708c29228cfb4d8941b96a4
BLAKE2b-256 0f14158e6fa1d6e4985b77c85d3b7ea4342212cc7fb99d409a4c4e83c4616f90

See more details on using hashes here.

Provenance

The following attestation bundles were made for client_signals-0.4.2.tar.gz:

Publisher: publish-python.yml on superfly/client-signals

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file client_signals-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: client_signals-0.4.2-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

Hashes for client_signals-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 745d1072b23f87af92769adfb92e629492bdc31020c1d9fb2082a637d3ffa52a
MD5 93ae09c6bd6dce58c4fbfa5fc1d707b1
BLAKE2b-256 6a788c18d551f52c4705009b1587a2ce05a1b7ff0f286cadad67b2dab4474d1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for client_signals-0.4.2-py3-none-any.whl:

Publisher: publish-python.yml on superfly/client-signals

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.4

2 files

0.4.3

2 files

This release

0.4.2 This release

2 files

0.4.1

2 files

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