[#3] Added generate proto script

Signed-off-by: Ilyas Niyazov <i.niyazov@yadro.com>
This commit is contained in:
Ilyas Niyazov 2025-02-26 16:24:04 +03:00
parent 19282f13cc
commit 9a1b5d778b
5 changed files with 92 additions and 0 deletions

View file

@ -0,0 +1,23 @@
# Create channel and Stubs
import grpc
from frostfs_api.client.services.container import ContainerClient
class FrostfsClient:
def __init__(self, address):
self.channel = grpc.insecure_channel(address)
self.container = ContainerClient(self.channel)
def close(self):
self.channel.close()
if __name__ == "__main__":
client = FrostfsClient("localhost:50051")
create_response = client.container.create_container("my_container")
print("Container created:", create_response)
get_response = client.container.get_container(create_response)
print("Container details:", get_response)
client.close()