Update Pinecone class docstrings#550
Merged
jhamon merged 2 commits intorelease-candidate/2025-10pinecone-io/pinecone-python-client:release-candidate/2025-10from Nov 17, 2025
2025-11-17-wky9-Ww98Upinecone-io/pinecone-python-client:2025-11-17-wky9-Ww98UCopy head branch name to clipboard
Merged
Update Pinecone class docstrings#550jhamon merged 2 commits intorelease-candidate/2025-10pinecone-io/pinecone-python-client:release-candidate/2025-10from 2025-11-17-wky9-Ww98Upinecone-io/pinecone-python-client:2025-11-17-wky9-Ww98UCopy head branch name to clipboard
jhamon merged 2 commits intorelease-candidate/2025-10pinecone-io/pinecone-python-client:release-candidate/2025-10from
2025-11-17-wky9-Ww98Upinecone-io/pinecone-python-client:2025-11-17-wky9-Ww98UCopy head branch name to clipboard
Conversation
- Fix incorrect import statements: change 'import urllib3 import make_headers' to 'from urllib3.util import make_headers' - Remove extra blank lines in docstrings for proper Sphinx rendering
f4e20e1 to
bd78337
Compare
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.
Improve Docstring Documentation and Remove Redundant Interface
Summary
This PR comprehensively reviews and updates all method docstrings in the
Pineconeclass and underlying interface classes to ensure they use proper RST syntax, include code-block usage examples, and have correct whitespace formatting for Sphinx rendering. Additionally, this PR removes the redundantLegacyPineconeDBControlInterfaceclass that was creating maintenance overhead and sync risks.Problem
Incomplete Documentation: Many methods in the
Pineconeclass lacked comprehensive docstrings with usage examples, making it difficult for users to understand how to use the SDK effectively.Inconsistent Formatting: Some docstrings used different formats (e.g.,
Args:vs:param:), and code-block examples lacked proper whitespace formatting required for Sphinx to render correctly.Redundant Interface: The
LegacyPineconeDBControlInterfaceclass served primarily as a docstring container, creating duplication and the risk of documentation falling out of sync with implementations.Unrealistic Examples: Some code examples (particularly in the
inferenceproperty) used placeholder content that didn't demonstrate real-world usage patterns.Solution
Added Comprehensive Docstrings: Added complete RST-formatted docstrings with code-block examples to all
Pineconeclass methods that were missing them, including:create_index,delete_index,list_indexes,describe_index,has_index,configure_index)create_collection,list_collections,delete_collection,describe_collection)create_backup,list_backups,describe_backup,delete_backup,list_restore_jobs,describe_restore_job)Index,IndexAsyncio)inference,db)Standardized RST Format: Converted all docstrings to use consistent RST syntax with
:param:and:type:directives instead of mixed formats.Fixed Code-Block Formatting: Ensured all code-block examples have proper whitespace (empty line after code blocks) for correct Sphinx rendering.
Improved Examples: Updated examples to be more realistic and demonstrate actual usage patterns, including:
inferenceproperty example to show realistic embedding and reranking operations with actual document contentRemoved Redundant Interface: Deleted
LegacyPineconeDBControlInterfacesince:Pineconeclass implementation (single source of truth)Pineconeand provided no additional valueUpdated Interface Classes: Enhanced docstrings in
IndexInterfacewith proper RST formatting and added missing code-block examples (e.g.,upsert_from_dataframe).User-Facing Impact
Positive Changes
Pineconeclass methodsBreaking Changes
None - This is a documentation-only change. All method signatures and behavior remain unchanged.
Usage Examples
Before
After
Improved Inference Example
The
inferenceproperty now shows realistic usage:Technical Details
LegacyPineconeDBControlInterfaceclass and its filePineconeclass to no longer inherit from the removed interfaceIndexInterfacedocstrings with proper formatting and examples