Skip to content
Snippets Groups Projects
Commit 590503d3 authored by Georgiy Eterevskiy's avatar Georgiy Eterevskiy
Browse files

Rename generated package `collections` to `contentcollections`. Add example...

Rename generated package `collections` to `contentcollections`. Add example `contentcollections_client`
parent 1ab3eb45
Branches
Tags
No related merge requests found
import asyncio
import logging
import grpc
from contentcollections.collections_pb2 import GetRequest
from contentcollections.collections_pb2_grpc import CollectionsStub
async def main() -> None:
async with grpc.aio.insecure_channel('localhost:50051') as channel:
stub = CollectionsStub(channel)
collections = await stub.List()
print('List collections', collections)
collection = await stub.Get(GetRequest(space_id='1', env_id='1', collection_id='1'))
print('Retrieve collection', collection)
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
asyncio.get_event_loop().run_until_complete(main())
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"""Client and server classes corresponding to protobuf-defined services.""" """Client and server classes corresponding to protobuf-defined services."""
import grpc import grpc
from collections import collections_pb2 as collections_dot_collections__pb2 from contentcollections import collections_pb2 as collections_dot_collections__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment