Repository navigation
Chain package tokens in the User-Agent - #5
Merged
Merged
Conversation
The User-Agent is now vatly/vatly-api-python/<version> Python/<version> httpx/<version>, the format vatly-api-php uses (vatly-api-php#84). add_version_string() lets packages built on the SDK, such as vatly-fluent-python and vatly-django, append their own token so a request names every package involved. Repeated tokens are ignored, and a User-Agent in default_headers or RequestOptions.headers still wins. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-57ff6642-71f4-41bc-a445-a2b9be732083
This was referenced Nov 26, 2026
sandervanhooft
added a commit
to vatly/vatly-fluent-python
that referenced
this pull request
Nov 26, 2026
* Append vatly-fluent-python to the SDK User-Agent 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 * Point the SDK source at its main merge commit Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-57ff6642-71f4-41bc-a445-a2b9be732083 --------- Co-authored-by: Sander van Hooft <7265703+sandervanhooft@users.noreply.github.com> Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
User-Agentnow names every package involved, in the format vatly-api-php uses since vatly/vatly-api-php#84: onevendor/package/versiontoken per package.vatly/vatly-api-python/<version> Python/<version> httpx/<version>instead ofvatly-api-python/<version>. The version comes fromvatly.__version__.add_version_string(token)onVatlyClientandAsyncVatlyClient: a package or integration built on the SDK appends its own token, e.g.vatly/vatly-fluent-python/0.1.0a4. Whitespace becomes-, and a token already present is skipped, so wrapping one shared client many times does not grow the header.User-Agentindefault_headersorRequestOptions.headersstill replaces the header, as before.Vatly-Client-Infois unchanged.docs/, because those pages sync to docs.vatly.com and their examples run against the published 0.1.0a4 in CI; add it there after the release.main.Used by vatly-fluent-python and vatly-django in follow-up PRs. Example on the wire with both:
No version bump or release here.