Skip to content

[codex] Fix Python SDK documentation examples#249

Draft
ayush-shah wants to merge 2 commits into
mainfrom
codex/fix-python-sdk-docs
Draft

[codex] Fix Python SDK documentation examples#249
ayush-shah wants to merge 2 commits into
mainfrom
codex/fix-python-sdk-docs

Conversation

@ayush-shah
Copy link
Copy Markdown
Member

@ayush-shah ayush-shah commented May 20, 2026

Summary

Fix Python SDK examples and API guide snippets across the 1.11, 1.12, and 1.13 docs to match the SDK facades exposed by current releases.

What changed

  • Updated Python SDK examples to use plural facade classes such as Tables, DatabaseServices, and DataContracts instead of missing singular classes.
  • Replaced stale list examples with EntityList.entities, after, and before, and removed references to missing helpers such as TableListParams and auto_paging_iterable().
  • Corrected update examples to call Tables.update(entity) rather than passing an ID separately.
  • Clarified that entity facade classes do not expose patch; low-level patch operations should use the configured OpenMetadata client.
  • Aligned connection examples around metadata.sdk.configure(...) and metadata.sdk.client().
  • Fixed lineage examples to use Lineage.get_entity_lineage(...), AddLineageRequest, EntitiesEdge, EntityReference, and Lineage.add_lineage_request(...).
  • Corrected version-specific gaps: 1.11 storage service docs use the raw configured client where the facade is absent, ML model service docs use raw client calls where MlModelServices is not exported, and Topic docs use the configured client because Topics is not exported by the Python SDK.
  • Added the shared CodeLayout component used by API reference pages.

Validation

  • Reviewed SDK exports/signatures against openmetadata-ingestion==1.11.13.0 and openmetadata-ingestion==1.12.8.8 in isolated Python 3.11 environments.
  • Confirmed the latest 1.12 release line is 1.12.8 and checked source behavior against OpenMetadata/openmetadata-collate refs for 1.11, 1.12, and 1.13.
  • Ran live sandbox smoke against https://sandbox-beta.open-metadata.org/api using the 1.12.8 SDK: Tables.list(limit=2, fields=["owners", "tags"]) returned an EntityList with entities and no data attribute.
  • git diff --check
  • Targeted stale-pattern scan for TableListParams, auto_paging_iterable, singular Table facade usage, incorrect Tables.update(str(...)), missing patch, stale get_client, and old EntityList text.
  • Changed-file MDX structure check for code fences, frontmatter, and cross-version absolute links.
  • Topic-specific checks: no Python Topics facade imports remain, Topic Python code fences parse, and CreateTopicRequest imports/construction were validated against 1.11.13.0 and 1.12.8.8.
  • Changed-file image/video accessibility scan.
  • rtk npm run broken-links
  • rtk mint openapi-check api-reference/openapi.json

Known repository-wide checks

  • rtk mint validate still fails with 217 existing warnings, mainly missing connector snippets under v1.13.x-SNAPSHOT and unsupported external snippet imports such as react/prop-types.
  • rtk mint a11y still fails repository-wide due the existing #6938EF dark-background contrast issue and 1244 pre-existing missing alt/label issues across generated/reference pages.

@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 20, 2026

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

Project Status Preview Updated (UTC)
openmetadata 🟢 Ready View Preview May 20, 2026, 4:40 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@ayush-shah
Copy link
Copy Markdown
Member Author

I found one semantic mismatch in the new Topic DELETE example while validating against the OpenMetadata service code.

In v1.13.x-SNAPSHOT/api-reference/data-assets/topics/delete.mdx, the delete-by-name hard-delete example sends hardDelete in the DELETE request body:

rest_client.delete(
    "/topics/name/sample_kafka.address_book",
    data={"hardDelete": True},
)

The API reads hardDelete as a query parameter on DELETE /v1/topics/name/{fqn}, not from the body, so this example would not perform the documented hard delete. Could we change it to a query-param form, for example:

rest_client.delete("/topics/name/sample_kafka.address_book?hardDelete=true")

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