Commit 80bf69db authored by Wei Shoulin's avatar Wei Shoulin
Browse files

initial commit

parents
This diff is collapsed.
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from ifs.reffits import reffits_pb2 as ifs_dot_reffits_dot_reffits__pb2
class RefFitsSrvStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.find = channel.unary_unary(
'/ifs.reffits.RefFitsSrv/find',
request_serializer=ifs_dot_reffits_dot_reffits__pb2.FindRefFitsReq.SerializeToString,
response_deserializer=ifs_dot_reffits_dot_reffits__pb2.FindRefFitsResp.FromString,
)
self.get = channel.unary_unary(
'/ifs.reffits.RefFitsSrv/get',
request_serializer=ifs_dot_reffits_dot_reffits__pb2.GetRefFitsReq.SerializeToString,
response_deserializer=ifs_dot_reffits_dot_reffits__pb2.GetRefFitsResp.FromString,
)
self.read = channel.unary_stream(
'/ifs.reffits.RefFitsSrv/read',
request_serializer=ifs_dot_reffits_dot_reffits__pb2.ReadRefFitsReq.SerializeToString,
response_deserializer=ifs_dot_reffits_dot_reffits__pb2.ReadRefFitsResp.FromString,
)
self.write = channel.stream_unary(
'/ifs.reffits.RefFitsSrv/write',
request_serializer=ifs_dot_reffits_dot_reffits__pb2.WriteRefFitsReq.SerializeToString,
response_deserializer=ifs_dot_reffits_dot_reffits__pb2.WriteRefFitsResp.FromString,
)
self.update_status = channel.unary_unary(
'/ifs.reffits.RefFitsSrv/update_status',
request_serializer=ifs_dot_reffits_dot_reffits__pb2.UpdateStatusReq.SerializeToString,
response_deserializer=ifs_dot_reffits_dot_reffits__pb2.UpdateStatusResp.FromString,
)
class RefFitsSrvServicer(object):
# missing associated documentation comment in .proto file
pass
def find(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def get(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def read(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def write(self, request_iterator, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def update_status(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_RefFitsSrvServicer_to_server(servicer, server):
rpc_method_handlers = {
'find': grpc.unary_unary_rpc_method_handler(
servicer.find,
request_deserializer=ifs_dot_reffits_dot_reffits__pb2.FindRefFitsReq.FromString,
response_serializer=ifs_dot_reffits_dot_reffits__pb2.FindRefFitsResp.SerializeToString,
),
'get': grpc.unary_unary_rpc_method_handler(
servicer.get,
request_deserializer=ifs_dot_reffits_dot_reffits__pb2.GetRefFitsReq.FromString,
response_serializer=ifs_dot_reffits_dot_reffits__pb2.GetRefFitsResp.SerializeToString,
),
'read': grpc.unary_stream_rpc_method_handler(
servicer.read,
request_deserializer=ifs_dot_reffits_dot_reffits__pb2.ReadRefFitsReq.FromString,
response_serializer=ifs_dot_reffits_dot_reffits__pb2.ReadRefFitsResp.SerializeToString,
),
'write': grpc.stream_unary_rpc_method_handler(
servicer.write,
request_deserializer=ifs_dot_reffits_dot_reffits__pb2.WriteRefFitsReq.FromString,
response_serializer=ifs_dot_reffits_dot_reffits__pb2.WriteRefFitsResp.SerializeToString,
),
'update_status': grpc.unary_unary_rpc_method_handler(
servicer.update_status,
request_deserializer=ifs_dot_reffits_dot_reffits__pb2.UpdateStatusReq.FromString,
response_serializer=ifs_dot_reffits_dot_reffits__pb2.UpdateStatusResp.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'ifs.reffits.RefFitsSrv', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
This diff is collapsed.
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from ifs.result0 import result0_pb2 as ifs_dot_result0_dot_result0__pb2
class Result0SrvStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.find = channel.unary_unary(
'/ifs.result0.Result0Srv/find',
request_serializer=ifs_dot_result0_dot_result0__pb2.FindResult0Req.SerializeToString,
response_deserializer=ifs_dot_result0_dot_result0__pb2.FindResult0Resp.FromString,
)
self.get = channel.unary_unary(
'/ifs.result0.Result0Srv/get',
request_serializer=ifs_dot_result0_dot_result0__pb2.GetResult0Req.SerializeToString,
response_deserializer=ifs_dot_result0_dot_result0__pb2.GetResult0Resp.FromString,
)
self.read = channel.unary_stream(
'/ifs.result0.Result0Srv/read',
request_serializer=ifs_dot_result0_dot_result0__pb2.ReadResult0Req.SerializeToString,
response_deserializer=ifs_dot_result0_dot_result0__pb2.ReadResult0Resp.FromString,
)
self.write = channel.stream_unary(
'/ifs.result0.Result0Srv/write',
request_serializer=ifs_dot_result0_dot_result0__pb2.WriteResult0Req.SerializeToString,
response_deserializer=ifs_dot_result0_dot_result0__pb2.WriteResult0Resp.FromString,
)
class Result0SrvServicer(object):
# missing associated documentation comment in .proto file
pass
def find(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def get(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def read(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def write(self, request_iterator, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_Result0SrvServicer_to_server(servicer, server):
rpc_method_handlers = {
'find': grpc.unary_unary_rpc_method_handler(
servicer.find,
request_deserializer=ifs_dot_result0_dot_result0__pb2.FindResult0Req.FromString,
response_serializer=ifs_dot_result0_dot_result0__pb2.FindResult0Resp.SerializeToString,
),
'get': grpc.unary_unary_rpc_method_handler(
servicer.get,
request_deserializer=ifs_dot_result0_dot_result0__pb2.GetResult0Req.FromString,
response_serializer=ifs_dot_result0_dot_result0__pb2.GetResult0Resp.SerializeToString,
),
'read': grpc.unary_stream_rpc_method_handler(
servicer.read,
request_deserializer=ifs_dot_result0_dot_result0__pb2.ReadResult0Req.FromString,
response_serializer=ifs_dot_result0_dot_result0__pb2.ReadResult0Resp.SerializeToString,
),
'write': grpc.stream_unary_rpc_method_handler(
servicer.write,
request_deserializer=ifs_dot_result0_dot_result0__pb2.WriteResult0Req.FromString,
response_serializer=ifs_dot_result0_dot_result0__pb2.WriteResult0Resp.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'ifs.result0.Result0Srv', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
This diff is collapsed.
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from ifs.result1 import result1_pb2 as ifs_dot_result1_dot_result1__pb2
class Result1SrvStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.find = channel.unary_unary(
'/ifs.result1.Result1Srv/find',
request_serializer=ifs_dot_result1_dot_result1__pb2.FindResult1Req.SerializeToString,
response_deserializer=ifs_dot_result1_dot_result1__pb2.FindResult1Resp.FromString,
)
self.get = channel.unary_unary(
'/ifs.result1.Result1Srv/get',
request_serializer=ifs_dot_result1_dot_result1__pb2.GetResult1Req.SerializeToString,
response_deserializer=ifs_dot_result1_dot_result1__pb2.GetResult1Resp.FromString,
)
self.read = channel.unary_stream(
'/ifs.result1.Result1Srv/read',
request_serializer=ifs_dot_result1_dot_result1__pb2.ReadResult1Req.SerializeToString,
response_deserializer=ifs_dot_result1_dot_result1__pb2.ReadResult1Resp.FromString,
)
self.write = channel.stream_unary(
'/ifs.result1.Result1Srv/write',
request_serializer=ifs_dot_result1_dot_result1__pb2.WriteResult1Req.SerializeToString,
response_deserializer=ifs_dot_result1_dot_result1__pb2.WriteResult1Resp.FromString,
)
class Result1SrvServicer(object):
# missing associated documentation comment in .proto file
pass
def find(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def get(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def read(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def write(self, request_iterator, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_Result1SrvServicer_to_server(servicer, server):
rpc_method_handlers = {
'find': grpc.unary_unary_rpc_method_handler(
servicer.find,
request_deserializer=ifs_dot_result1_dot_result1__pb2.FindResult1Req.FromString,
response_serializer=ifs_dot_result1_dot_result1__pb2.FindResult1Resp.SerializeToString,
),
'get': grpc.unary_unary_rpc_method_handler(
servicer.get,
request_deserializer=ifs_dot_result1_dot_result1__pb2.GetResult1Req.FromString,
response_serializer=ifs_dot_result1_dot_result1__pb2.GetResult1Resp.SerializeToString,
),
'read': grpc.unary_stream_rpc_method_handler(
servicer.read,
request_deserializer=ifs_dot_result1_dot_result1__pb2.ReadResult1Req.FromString,
response_serializer=ifs_dot_result1_dot_result1__pb2.ReadResult1Resp.SerializeToString,
),
'write': grpc.stream_unary_rpc_method_handler(
servicer.write,
request_deserializer=ifs_dot_result1_dot_result1__pb2.WriteResult1Req.FromString,
response_serializer=ifs_dot_result1_dot_result1__pb2.WriteResult1Resp.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'ifs.result1.Result1Srv', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
"""Runs protoc with the gRPC plugin to generate messages and gRPC stubs."""
from grpc_tools import protoc
protoc.main((
'',
'-I./',
'--python_out=.',
'--grpc_python_out=.',
'./fits.proto',
))
# coding: utf-8
"""Setup config file to package the configuration database."""
from os import walk, listdir
from setuptools import find_packages
from os.path import join
from setuptools import setup
import csst_proto
def package_files(directory):
"""Get list of data files to add to the package."""
paths = []
for (path, _, file_names) in walk(directory):
for filename in file_names:
paths.append(join('..', path, filename))
return paths
with open('README.md', 'r') as file:
LONG_DESCRIPTION = file.read()
setup(name='csst_dfs_proto',
version=csst_proto.__version__,
author='CSST DFS team.',
description='CSST DFS Base Proto library.',
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
url='',
packages=find_packages(exclude=('test', 'test.*', 'fabfile')),
install_requires=[
'grpcio==1.28.1'
],
zip_safe=False,
classifiers=[
"Programming Language :: Python :: 3 :: Only",
"Development Status :: 1 - Planning",
"License :: OSI Approved :: BSD License"
]
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment