Skip to content

Commit

Permalink
GRPC clients version 10.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
clarifai-prod committed Jan 18, 2024
1 parent 6155b6f commit 958a63f
Show file tree
Hide file tree
Showing 6 changed files with 198 additions and 116 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.3
10.0.4
2 changes: 1 addition & 1 deletion clarifai_grpc/channel/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from clarifai_grpc.channel.errors import ApiError

CLIENT_VERSION = "10.0.3"
CLIENT_VERSION = "10.0.4"
OS_VER = os.sys.platform
PYTHON_VERSION = ".".join(
map(
Expand Down
230 changes: 117 additions & 113 deletions clarifai_grpc/grpc/api/service_pb2.py

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions clarifai_grpc/grpc/api/service_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8078,6 +8078,50 @@ class PostModuleVersionsRequest(google.protobuf.message.Message):

global___PostModuleVersionsRequest = PostModuleVersionsRequest

@typing_extensions.final
class PatchModuleVersionsRequest(google.protobuf.message.Message):
"""PatchModuleVersionsRequest"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

USER_APP_ID_FIELD_NUMBER: builtins.int
MODULE_ID_FIELD_NUMBER: builtins.int
MODULE_VERSIONS_FIELD_NUMBER: builtins.int
ACTION_FIELD_NUMBER: builtins.int
@property
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet: ...
module_id: builtins.str
@property
def module_versions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[proto.clarifai.api.resources_pb2.ModuleVersion]:
"""This allows you to modify the module version details.
########## Supported fields ##########
- description
- id
- metadata.fields
- module_nav.module_sub_navs[].query_key
- module_nav.module_sub_navs[].query_value
- module_nav.module_sub_navs[].title
- module_nav.title
- notes
- visibility.gettable
"""
action: builtins.str
"""The action to perform on the patched objects
For now only action 'merge' is supported
"""
def __init__(
self,
*,
user_app_id: proto.clarifai.api.resources_pb2.UserAppIDSet | None = ...,
module_id: builtins.str = ...,
module_versions: collections.abc.Iterable[proto.clarifai.api.resources_pb2.ModuleVersion] | None = ...,
action: builtins.str = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["user_app_id", b"user_app_id"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["action", b"action", "module_id", b"module_id", "module_versions", b"module_versions", "user_app_id", b"user_app_id"]) -> None: ...

global___PatchModuleVersionsRequest = PatchModuleVersionsRequest

@typing_extensions.final
class DeleteModuleVersionsRequest(google.protobuf.message.Message):
"""Request to delete several module versions by the list of ids."""
Expand Down
34 changes: 34 additions & 0 deletions clarifai_grpc/grpc/api/service_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,11 @@ def __init__(self, channel):
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostModuleVersionsRequest.SerializeToString,
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_service__pb2.MultiModuleVersionResponse),
)
self.PatchModuleVersions = channel.unary_unary(
'/clarifai.api.V2/PatchModuleVersions',
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.PatchModuleVersionsRequest.SerializeToString,
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_service__pb2.MultiModuleVersionResponse),
)
self.DeleteModuleVersions = channel.unary_unary(
'/clarifai.api.V2/DeleteModuleVersions',
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.DeleteModuleVersionsRequest.SerializeToString,
Expand Down Expand Up @@ -2463,6 +2468,13 @@ def PostModuleVersions(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def PatchModuleVersions(self, request, context):
"""Modify details of an existing module version.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def DeleteModuleVersions(self, request, context):
"""Delete a multiple module version.
"""
Expand Down Expand Up @@ -3625,6 +3637,11 @@ def add_V2Servicer_to_server(servicer, server):
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostModuleVersionsRequest.FromString,
response_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.MultiModuleVersionResponse.SerializeToString,
),
'PatchModuleVersions': grpc.unary_unary_rpc_method_handler(
servicer.PatchModuleVersions,
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.PatchModuleVersionsRequest.FromString,
response_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.MultiModuleVersionResponse.SerializeToString,
),
'DeleteModuleVersions': grpc.unary_unary_rpc_method_handler(
servicer.DeleteModuleVersions,
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.DeleteModuleVersionsRequest.FromString,
Expand Down Expand Up @@ -6900,6 +6917,23 @@ def PostModuleVersions(request,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def PatchModuleVersions(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/clarifai.api.V2/PatchModuleVersions',
proto_dot_clarifai_dot_api_dot_service__pb2.PatchModuleVersionsRequest.SerializeToString,
proto_dot_clarifai_dot_api_dot_service__pb2.MultiModuleVersionResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def DeleteModuleVersions(request,
target,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="clarifai-grpc",
version="10.0.3",
version="10.0.4",
author="Clarifai",
author_email="[email protected]",
description="Clarifai gRPC API Client",
Expand Down

0 comments on commit 958a63f

Please sign in to comment.