Skip to content

Commit

Permalink
update python example
Browse files Browse the repository at this point in the history
  • Loading branch information
kvcache committed Oct 15, 2024
1 parent 1c99cfc commit 9d8fa33
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 59 deletions.
55 changes: 33 additions & 22 deletions example-python/rmemstore_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 37 additions & 37 deletions example-python/rmemstore_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,40 @@ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Opti

DESCRIPTOR: _descriptor.FileDescriptor

class Get(_message.Message):
__slots__ = ["key"]
KEY_FIELD_NUMBER: _ClassVar[int]
key: bytes
def __init__(self, key: _Optional[bytes] = ...) -> None: ...
class Rpc(_message.Message):
__slots__ = ("id", "put", "get")
ID_FIELD_NUMBER: _ClassVar[int]
PUT_FIELD_NUMBER: _ClassVar[int]
GET_FIELD_NUMBER: _ClassVar[int]
id: int
put: Put
get: Get
def __init__(self, id: _Optional[int] = ..., put: _Optional[_Union[Put, _Mapping]] = ..., get: _Optional[_Union[Get, _Mapping]] = ...) -> None: ...

class Response(_message.Message):
__slots__ = ("id", "ok", "value")
ID_FIELD_NUMBER: _ClassVar[int]
OK_FIELD_NUMBER: _ClassVar[int]
VALUE_FIELD_NUMBER: _ClassVar[int]
id: int
ok: bool
value: Value
def __init__(self, id: _Optional[int] = ..., ok: bool = ..., value: _Optional[_Union[Value, _Mapping]] = ...) -> None: ...

class Value(_message.Message):
__slots__ = ("blob", "string", "map")
BLOB_FIELD_NUMBER: _ClassVar[int]
STRING_FIELD_NUMBER: _ClassVar[int]
MAP_FIELD_NUMBER: _ClassVar[int]
blob: bytes
string: str
map: Map
def __init__(self, blob: _Optional[bytes] = ..., string: _Optional[str] = ..., map: _Optional[_Union[Map, _Mapping]] = ...) -> None: ...

class Map(_message.Message):
__slots__ = ["map"]
__slots__ = ("map",)
class MapEntry(_message.Message):
__slots__ = ["key", "value"]
__slots__ = ("key", "value")
KEY_FIELD_NUMBER: _ClassVar[int]
VALUE_FIELD_NUMBER: _ClassVar[int]
key: str
Expand All @@ -25,39 +49,15 @@ class Map(_message.Message):
def __init__(self, map: _Optional[_Mapping[str, Value]] = ...) -> None: ...

class Put(_message.Message):
__slots__ = ["key", "value"]
__slots__ = ("key", "value")
KEY_FIELD_NUMBER: _ClassVar[int]
VALUE_FIELD_NUMBER: _ClassVar[int]
key: bytes
value: Value
def __init__(self, key: _Optional[bytes] = ..., value: _Optional[_Union[Value, _Mapping]] = ...) -> None: ...

class Response(_message.Message):
__slots__ = ["id", "ok", "value"]
ID_FIELD_NUMBER: _ClassVar[int]
OK_FIELD_NUMBER: _ClassVar[int]
VALUE_FIELD_NUMBER: _ClassVar[int]
id: int
ok: bool
value: Value
def __init__(self, id: _Optional[int] = ..., ok: bool = ..., value: _Optional[_Union[Value, _Mapping]] = ...) -> None: ...

class Rpc(_message.Message):
__slots__ = ["get", "id", "put"]
GET_FIELD_NUMBER: _ClassVar[int]
ID_FIELD_NUMBER: _ClassVar[int]
PUT_FIELD_NUMBER: _ClassVar[int]
get: Get
id: int
put: Put
def __init__(self, id: _Optional[int] = ..., put: _Optional[_Union[Put, _Mapping]] = ..., get: _Optional[_Union[Get, _Mapping]] = ...) -> None: ...

class Value(_message.Message):
__slots__ = ["blob", "map", "string"]
BLOB_FIELD_NUMBER: _ClassVar[int]
MAP_FIELD_NUMBER: _ClassVar[int]
STRING_FIELD_NUMBER: _ClassVar[int]
blob: bytes
map: Map
string: str
def __init__(self, blob: _Optional[bytes] = ..., string: _Optional[str] = ..., map: _Optional[_Union[Map, _Mapping]] = ...) -> None: ...
class Get(_message.Message):
__slots__ = ("key",)
KEY_FIELD_NUMBER: _ClassVar[int]
key: bytes
def __init__(self, key: _Optional[bytes] = ...) -> None: ...

0 comments on commit 9d8fa33

Please sign in to comment.