Skip to content

Add Python examples to the guides and learn pages that lacked them - #3115

Merged
ElliotFriend merged 2 commits into
mainfrom
docs-agent/1770-python
Nov 13, 2026
Merged

ElliotFriend merged 2 commits into
mainfrom
docs-agent/1770-python

Conversation

@stellar-doxie

@stellar-doxie stellar-doxie Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Automated message from the Stellar Triage Bot.

Refs #1770

Working this because @ElliotFriend approved the plan in #1770. This is PR 3 of the stack. It is based on #3114, so merge #3113 and #3114 first. It adds Python examples to the pages that had none.

What changed

  • Python tabs on 27 pages, next to every Stellar SDK example in JavaScript.
  • Tab order is JavaScript, Python, Go, Java. On send-and-receive-payments, the Java tabs moved after Go. Their content is unchanged.
  • Bare code blocks now sit in a <CodeGroup> with titled tabs.
  • Prose changed only where it named JavaScript alone, or named a JavaScript function.
  • Every transaction bids the capped fee-stats p90, like the other languages.
  • Where the Python SDK has no helper (getAccountEntry, requestAirdrop, returnValue), the code reads ledger entries, gets the Friendbot URL from get_network(), and reads the return value from the transaction meta.

Skipped

  • dapps/state-archival: all of its code is browser code that uses the Varial wallet. @ElliotFriend agreed to leave it as it is.
  • Blocks that are not SDK examples: output, JSON, shell, TypeScript type shapes, the raw fetch example on simulateTransaction-Deep-Dive, the Varial block on signing-soroban-invocations, and the block on pooled-accounts-muxed-accounts-memos that quotes a JavaScript SDK error.

Verified

  • Every Python symbol, field and return type against stellar-sdk (py-stellar-base) 17.0.1, the newest release. The pages pin no Python version.
  • pnpm check passes. pnpm check:links reports only the known broken links in .mintlify/skills/.

Not verified

  • The Python code did not run. py_compile and pip need approval in this lane.
  • On signing-soroban-invocations, Python ContractClient simulates with the null account as source. That account exists on testnet today.

Found in existing code, not fixed here

Six defects in the existing JavaScript, Go, Java and Python tabs on these pages. This PR only adds Python, so they are listed in #3119.

Overlaps

@stellar-doxie

stellar-doxie Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Reviewing because this is my own PR for #1770.

Checked every Python tab against stellar-sdk (Python) 17.0.1, the newest; the pages pin none. I fixed 3 defects: hello takes a String (both tabs passed a symbol), state-archival now reuses the guide's submit_tx, and NOT_FOUND after polling no longer reads as "failed".
Ready to merge after #3113 and #3114. CI runs once this PR targets main, and no live preview was available. Not run: the Python code. The two questions in the PR body do not block the merge.

@stellar-doxie stellar-doxie Bot added the bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge label Nov 12, 2026
@ElliotFriend
ElliotFriend added this pull request to stack #3118 November 12, 2026 16:50
@ElliotFriend

Copy link
Copy Markdown
Contributor

Not in this stack: keep these PRs to adding languages. Please open one issue listing the six defects with file paths, Refs #2531. A few aren't type errors, so that check won't catch them.

Agreed on dapps/state-archival: add it to the "left as they are" list.

@stellar-doxie

stellar-doxie Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Back on this because @ElliotFriend replied.

Ready to merge after #3113 and #3114. No live preview was available. Not run: the Python code (checked against stellar-sdk 17.0.1).

@ElliotFriend
ElliotFriend force-pushed the docs-agent/1770-python branch from 9ccf056 to 31a8a9e Compare November 12, 2026 18:35
@stellar-doxie

stellar-doxie Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Back on this because @ElliotFriend rebased the stack after #3113 merged.

  • The new head has the same patch as the head I verified (git patch-id match). The new base on main matches Drop the language from guide page names #3113's verified tree.
  • All checks pass at the new head. No live preview was available.
  • Checked against stellar-sdk 17.0.1 (newest on PyPI). Not run: the Python code.

Merge #3114 first, then this PR. Ready to merge.

Base automatically changed from docs-agent/1770-javascript to main November 12, 2026 18:58
@ElliotFriend
ElliotFriend force-pushed the docs-agent/1770-python branch from 31a8a9e to 2fbe36e Compare November 12, 2026 18:58
@mintlify

mintlify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
stellar-docs 🟢 Ready View Preview Nov 12, 2026, 6:59 PM

@stellar-doxie

stellar-doxie Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Back on this because @ElliotFriend merged #3114 and rebased this PR onto main.

  • The new head has the same tree as the head I verified (31a8a9ea). The content did not change.
  • All checks pass at the new head. No live preview was available.
  • Checked against stellar-sdk 17.0.1 (newest on PyPI); the pages pin none. Not run: the Python code.

Ready to merge.

@ElliotFriend ElliotFriend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving. Checked locally against stellar-sdk 17.0.1:

  • All 59 new Python blocks compile.
  • Joined per page, every undefined name is intentional: server and submit_tx from the submit guide, the send_transaction footnote helper, or placeholders that mirror the JS tab.
  • SDK calls type-check, apart from Optional narrowing noise. EventFilter(event_type=…, contract_ids=…) builds correctly at runtime, and prepare_transaction does keep an operation's own auth entries, as the comment says.
  • The rebuilt preview renders the Python tabs in the right order.

Not run on testnet. The six existing defects are tracked in #3119.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant