Skip to content

docs: add env-endpoints example snippet - #147

Merged
sgbalogh merged 1 commit into
mainfrom
devin/1791326615-env-endpoints-snippet
Oct 6, 2026
Merged

sgbalogh merged 1 commit into
mainfrom
devin/1791326615-env-endpoints-snippet

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Adds an env-endpoints anchor to examples/docs/configuration.py showing the opt-in Endpoints.from_env() helper, for injection into the docs' SDK endpoints page.

client = S2(os.environ["S2_ACCESS_TOKEN"], endpoints=Endpoints.from_env())

The example only runs this block when both endpoint vars are set, because from_env() raises otherwise.

Link to Devin session: https://app.devin.ai/sessions/522186735fc44e9db3831d13d57cf724
Open in Devin Desktop: https://app.devin.ai/desktop/session/522186735fc44e9db3831d13d57cf724?variant=devin
Requested by: @sgbalogh

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@sgbalogh
sgbalogh marked this pull request as ready for review October 6, 2026 22:52
@sgbalogh
sgbalogh requested a review from a team as a code owner October 6, 2026 22:52
@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low risk] Adds example code snippet to documentation.

The PR appears safe to merge.

What we checked:

  • Missing endpoint variables: The example checks both variables before calling Endpoints.from_env(), matching the helper’s requirement.

Summary

Adds an env-endpoints snippet showing how to pass Endpoints.from_env() to S2.

  • Runs the example only when both endpoint variables are set.
  • Closes the client after construction.
  • No actionable issues found.

Reviews (1) · Last reviewed commit: "docs: add env-endpoints example snippet"

@sgbalogh
sgbalogh merged commit 745c1de into main Oct 6, 2026
10 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