Skip to content

Append vatly-fluent-python to the SDK User-Agent - #5

Merged
sandervanhooft merged 2 commits into
mainfrom
chained-user-agent
Nov 26, 2026
Merged

sandervanhooft merged 2 commits into
mainfrom
chained-user-agent

Conversation

@sandervanhooft

@sandervanhooft sandervanhooft commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Vatly(...) now appends vatly/vatly-fluent-python/<version> to the SDK client's User-Agent, using add_version_string from vatly/vatly-api-python#5. That is the chained format all Vatly SDKs use (vatly/vatly-api-php#84):

vatly/vatly-api-python/0.1.0a4 Python/3.12.14 httpx/0.28.1 vatly/vatly-fluent-python/0.1.0a4
  • The version comes from vatly_fluent.__version__, which moves to _version.py so client.py can import it; vatly_fluent.__version__ and the release check are unchanged.
  • The SDK skips tokens already present, so several Vatly facades on one shared client add the token once.
  • Non-breaking: with an SDK that has no add_version_string (the published 0.1.0a4), Fluent does nothing. Checked by installing the built wheel against PyPI's 0.1.0a4.
  • New test checks the header sent through a Fluent call: SDK, Python and httpx tokens, then Fluent's, once. It fails without the change.

Before releasing: pyproject.toml has a temporary [tool.uv.sources] entry pointing development and CI at the SDK's merge commit on main (9535226), because the method is not on PyPI yet. Package metadata still pins vatly-api-python==0.1.0a4. After the SDK release, remove the source, pin the release, and run uv lock (noted in docs/Development.md).

No version bump or release here.

Vatly(...) adds vatly/vatly-fluent-python/<version> to the SDK client's
User-Agent with add_version_string (vatly/vatly-api-python#5), the chained
format all Vatly SDKs use. The version moves to _version.py so the client
module can read it. SDKs without add_version_string are left unchanged.

Development and CI use the SDK PR commit through [tool.uv.sources] until
it is released; package metadata still pins vatly-api-python==0.1.0a4.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-57ff6642-71f4-41bc-a445-a2b9be732083
@sandervanhooft
sandervanhooft merged commit 00ae8c8 into main Nov 26, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant