Skip to content

Commit

Permalink
Rename _Index class back to Index
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamon committed Dec 16, 2024
1 parent bb9d9c4 commit 8e0de62
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 29 deletions.
10 changes: 9 additions & 1 deletion pinecone/data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
from .index import *
from .index import (
Index as _Index,
FetchResponse,
QueryResponse,
DescribeIndexStatsResponse,
UpsertResponse,
SparseValues,
Vector,
)
from .import_error import Index, IndexClientInstantiationError
from .errors import (
VectorDictionaryMissingKeysError,
Expand Down
29 changes: 1 addition & 28 deletions pinecone/data/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,10 @@
from pinecone.core.openapi.db_data import API_VERSION
from pinecone.core.openapi.db_data.models import (
FetchResponse,
QueryRequest,
QueryResponse,
RpcStatus,
ScoredVector,
SingleQueryResults,
IndexDescription as DescribeIndexStatsResponse,
UpsertRequest,
UpsertResponse,
Vector,
DeleteRequest,
UpdateRequest,
DescribeIndexStatsRequest,
ListResponse,
SparseValues,
)
Expand All @@ -45,32 +37,13 @@

logger = logging.getLogger(__name__)

__all__ = [
"_Index",
"FetchResponse",
"QueryRequest",
"QueryResponse",
"RpcStatus",
"ScoredVector",
"SingleQueryResults",
"DescribeIndexStatsResponse",
"UpsertRequest",
"UpsertResponse",
"UpdateRequest",
"Vector",
"DeleteRequest",
"UpdateRequest",
"DescribeIndexStatsRequest",
"SparseValues",
]


def parse_query_response(response: QueryResponse):
response._data_store.pop("results", None)
return response


class _Index(IndexInterface, ImportFeatureMixin):
class Index(IndexInterface, ImportFeatureMixin):
"""
A client for interacting with a Pinecone index via REST API.
For improved performance, use the Pinecone GRPC index client.
Expand Down

0 comments on commit 8e0de62

Please sign in to comment.