Skip to content

chore(python): show synchronous snippets #3832

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

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

shortcuts
Copy link
Member

@shortcuts shortcuts commented Sep 25, 2024

🧭 What and Why

🎟 JIRA Ticket: -

Changes included:

showcase synchronous snippets, and mention the asynchronous class, for broader usage coverage https://algolia.slack.com/archives/C05C3DRTVFU/p1727267587674509

@shortcuts shortcuts self-assigned this Sep 25, 2024
@shortcuts shortcuts requested a review from a team as a code owner September 25, 2024 12:41
@algolia-bot
Copy link
Collaborator

algolia-bot commented Sep 25, 2024

✔️ Code generated!

Name Link
🪓 Triggered by 14eab2916c21e6f9b6f67f3f5c6e04d9379f2b26
🍃 Generated commit 07f1735f64fab8f0898482c5d015be1e848e029f
🌲 Generated branch generated/chore/python-synchronous-snippets
📊 Benchmark results

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

Language Req/s
python 1012

@shortcuts shortcuts enabled auto-merge (squash) September 25, 2024 12:51
"""
Snippet for the {{method}} method.

{{{description}}}
"""
# >SEPARATOR {{method}} {{testName}}
# Initialize the client
client = {{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}}("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"{{#hasRegionalHost}}, "ALGOLIA_APPLICATION_REGION"{{/hasRegionalHost}})
# Initialize the client, in an asynchronous context, you can use {{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}} instead, which exposes the exact same methods.
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this comment shown in the doc ?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah no :( I guess it needs to be on a new line

Copy link
Member Author

Choose a reason for hiding this comment

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

i'll see if this is enough 30dab08

Copy link
Member Author

Choose a reason for hiding this comment

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

all good now

Copy link
Member Author

Choose a reason for hiding this comment

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

great catch gg

@shortcuts shortcuts disabled auto-merge September 25, 2024 12:55
@shortcuts shortcuts enabled auto-merge (squash) September 25, 2024 13:06
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.

gg to you

@shortcuts shortcuts merged commit 8b2fc0b into main Sep 25, 2024
16 checks passed
@shortcuts shortcuts deleted the chore/python-synchronous-snippets branch September 25, 2024 13:08
algolia-bot added a commit that referenced this pull request Sep 25, 2024
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