docs: improve Python SDK public docstrings#39
Merged
cesarenaldi merged 6 commits intoMay 25, 2026
Conversation
DEV-118 Open source the Python SDK repository
PlanStart with a clear intake funnel and widen it gradually as we understand the volume and team capacity. Initial open source launchMake the Python SDK repository public. This phase is already in progress. Before launch:
External contributionsOpen the repository to external contributions only once the SDK is stable and out of beta. Before accepting external PRs:
Public feedback channelDo not enable GitHub Discussions for the initial launch. Discussions may fragment the conversation. GitHub Issues should be the main public feedback channel for now. DEV-122 Improve Python SDK public docstrings for open source launch
ContextThe TypeScript SDK exposes rich TSDoc on public client methods and helpers. The Python SDK had strong typing but sparse docstrings on the user-facing surface, which reduced IDE discoverability for open source users. Completed in this session
Verification
|
…l-validation-test-switch-from-python-sdk fix: hide credential validation test switch
https://github.com/Polymarket/py-sdk into feature/dev-118-open-source-the-python-sdk-repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Linear
Verification
Note
Low Risk
Documentation and test-only factory calls; no production API or business-logic changes.
Overview
This PR improves public API documentation across the Python SDK without changing runtime behavior for callers who use the documented entry points.
Clients (
PublicClient,AsyncPublicClient,SecureClient,AsyncSecureClient): class-level docstrings, property docs, and method docstrings for discovery, market/CLOB reads, pagination, subscriptions, trading (sign/post/cancel), wallet approvals, gasless setup, and position lifecycle. Paginated methods document return types and include Examples on some async/sync list helpers.SecureClient.create/AsyncSecureClient.creategain full Args/Raises docs; factory logic stays on a new_createhelper used by tests to skip credential validation.Supporting modules:
Page,Paginator,AsyncPaginator, transaction handle types, and stream specs (MarketSpec,CommentsSpec, etc.) get clearer descriptions. Core models (OpenOrder,ClobTrade,Position,Marketnested types, etc.) get short class docstrings.Tests only switch from
createto_createwhere fake credentials are injected.Reviewed by Cursor Bugbot for commit b02b53e. Bugbot is set up for automated code reviews on this repo. Configure here.