Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(python): expose user_agent on the config #4141

Merged
merged 7 commits into from
Nov 22, 2024
Merged

Conversation

shortcuts
Copy link
Member

🧭 What and Why

🎟 JIRA Ticket: -

Changes included:

there's no easy way to just get the user agent or just add segments to it, rather than keeping it local to the config we could just expose it so it's easier to play with

@shortcuts shortcuts self-assigned this Nov 21, 2024
@shortcuts shortcuts requested a review from a team as a code owner November 21, 2024 14:45
@algolia-bot
Copy link
Collaborator

algolia-bot commented Nov 21, 2024

✔️ Code generated!

Name Link
🪓 Triggered by f7ce3f27a62c5aa4f680bf90b1b8e3206a3a2663
🍃 Generated commit afdb96dc201f4d344a9cd1bb4669fc5ccd618e23
🌲 Generated branch generated/fix/python-user-agent
📊 Benchmark results

Benchmarks performed on the method using a mock server, the results might not reflect the real-world performance.

Language Req/s
python 1085

Comment on lines 16 to 18
client._config.user_agent.add("playground")

print("user_agent", client._config.user_agent.get())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this adds

user_agent Algolia for Python (4.9.2); Python (3.11.6); Search (4.9.2); playground (4.9.2)

@shortcuts shortcuts requested a review from millotp November 22, 2024 09:27
@shortcuts shortcuts enabled auto-merge (squash) November 22, 2024 09:30
@shortcuts shortcuts force-pushed the fix/python-user-agent branch from ae10ad0 to 4d7811a Compare November 22, 2024 10:05
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gggg

@shortcuts shortcuts merged commit abb8202 into main Nov 22, 2024
16 checks passed
@shortcuts shortcuts deleted the fix/python-user-agent branch November 22, 2024 10:25
algolia-bot added a commit that referenced this pull request Nov 22, 2024
…kip ci]

Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-python that referenced this pull request Nov 22, 2024
algolia/api-clients-automation#4141

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
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.

3 participants