Skip to content

docs: replace the Stainless leftovers in the README with the Fern client - #60

Merged
antonwhop merged 1 commit into
mainfrom
anton/readme-fern-cutover
Aug 22, 2026
Merged

docs: replace the Stainless leftovers in the README with the Fern client#60
antonwhop merged 1 commit into
mainfrom
anton/readme-fern-cutover

Conversation

@antonwhop

@antonwhop antonwhop commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Why / Prompt

README.md still documents the Stainless client. The worst line is in the async example — api_key=os.environ.get("WHOP_API_KEY") — which the Fern client accepts as an unknown kwarg's absence and then sends unauthenticated requests, so a reader who copies it gets a 401 rather than an error.

The Fern client shipped as 1.0.11 in #59 while this was in progress; the README is rebased on it. Fern does own this file and rewrote it in #57, but it preserves sections it does not recognize, so eleven Stainless sections rode through the cutover untouched.

What changed?

  • Deleted the eleven Stainless sections; took Fern's generated text verbatim for the sections it owns.
  • Added hand-written sections Fern cannot generate: a 0.0.41 → Fern migration table, the missing env-var fallback, verify_user_token, and the aiohttp extra.
  • Corrected: api_key/webhook_key/app_id/version/default_headerstoken/api_version_date/headers; with_optionsrequest_options; APIStatusError/RateLimitError/… → ApiError + typed subclasses; to_json/to_dictmodel_dump_json/model_dump; api.mdreference.md; Python 3.9 → 3.10; dropped webhooks.unwrap and the Stainless MCP deeplinks.

Companion PR whopio/whop-monorepo#24853 adds a readme: block to sdks/fern/generators.yml so the generated half stays correct on its own.

Verified by execution

Installed this tree into a venv and ran every python block in the README: 17/17 parse, every client.<resource>.<method> path resolves against a real client, and four blocks reached api.whop.com and came back 401 — including the aiohttp path. Also confirmed against published whop-sdk==0.0.41 that every "Was" in the migration table really existed.

Fern owns README.md and rewrites its own sections on every regeneration, but it
preserves sections it does not recognize. The Stainless sections survived the
cutover that way and now document a client that no longer exists — most
dangerously an async example passing `api_key=os.environ.get("WHOP_API_KEY")`,
which the Fern client silently ignores and answers with a 401.

Drop the eleven stale sections, take Fern's generated text verbatim for the
sections it owns, and add hand-written sections for the things Fern cannot know
about: the 0.0.41 migration table, the absent env-var fallback, verify_user_token,
and the aiohttp extra.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XV1533iUUxKJxfn4FXptWz
@antonwhop
antonwhop force-pushed the anton/readme-fern-cutover branch from 3fdf1c0 to 2b4b9f6 Compare August 22, 2026 07:59
@antonwhop
antonwhop marked this pull request as ready for review August 22, 2026 08:01
@antonwhop
antonwhop merged commit 9631cc5 into main Aug 22, 2026
7 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