Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

feat: add python to the list of clients generated #60

Merged
merged 3 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clients/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
java
objective-c
python
1,057 changes: 1,057 additions & 0 deletions clients/python/core_pb2.py

Large diffs are not rendered by default.

131 changes: 131 additions & 0 deletions clients/python/core_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

import core_pb2 as core__pb2


class CoreStub(object):
# missing associated documentation comment in .proto file
pass

def __init__(self, channel):
"""Constructor.

Args:
channel: A grpc.Channel.
"""
self.getStatus = channel.unary_unary(
'/org.dash.platform.dapi.v0.Core/getStatus',
request_serializer=core__pb2.GetStatusRequest.SerializeToString,
response_deserializer=core__pb2.GetStatusResponse.FromString,
)
self.getBlock = channel.unary_unary(
'/org.dash.platform.dapi.v0.Core/getBlock',
request_serializer=core__pb2.GetBlockRequest.SerializeToString,
response_deserializer=core__pb2.GetBlockResponse.FromString,
)
self.sendTransaction = channel.unary_unary(
'/org.dash.platform.dapi.v0.Core/sendTransaction',
request_serializer=core__pb2.SendTransactionRequest.SerializeToString,
response_deserializer=core__pb2.SendTransactionResponse.FromString,
)
self.getTransaction = channel.unary_unary(
'/org.dash.platform.dapi.v0.Core/getTransaction',
request_serializer=core__pb2.GetTransactionRequest.SerializeToString,
response_deserializer=core__pb2.GetTransactionResponse.FromString,
)
self.getEstimatedTransactionFee = channel.unary_unary(
'/org.dash.platform.dapi.v0.Core/getEstimatedTransactionFee',
request_serializer=core__pb2.GetEstimatedTransactionFeeRequest.SerializeToString,
response_deserializer=core__pb2.GetEstimatedTransactionFeeResponse.FromString,
)
self.subscribeToBlockHeadersWithChainLocks = channel.unary_stream(
'/org.dash.platform.dapi.v0.Core/subscribeToBlockHeadersWithChainLocks',
request_serializer=core__pb2.BlockHeadersWithChainLocksRequest.SerializeToString,
response_deserializer=core__pb2.BlockHeadersWithChainLocksResponse.FromString,
)


class CoreServicer(object):
# missing associated documentation comment in .proto file
pass

def getStatus(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 getBlock(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 sendTransaction(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 getTransaction(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 getEstimatedTransactionFee(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 subscribeToBlockHeadersWithChainLocks(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_CoreServicer_to_server(servicer, server):
rpc_method_handlers = {
'getStatus': grpc.unary_unary_rpc_method_handler(
servicer.getStatus,
request_deserializer=core__pb2.GetStatusRequest.FromString,
response_serializer=core__pb2.GetStatusResponse.SerializeToString,
),
'getBlock': grpc.unary_unary_rpc_method_handler(
servicer.getBlock,
request_deserializer=core__pb2.GetBlockRequest.FromString,
response_serializer=core__pb2.GetBlockResponse.SerializeToString,
),
'sendTransaction': grpc.unary_unary_rpc_method_handler(
servicer.sendTransaction,
request_deserializer=core__pb2.SendTransactionRequest.FromString,
response_serializer=core__pb2.SendTransactionResponse.SerializeToString,
),
'getTransaction': grpc.unary_unary_rpc_method_handler(
servicer.getTransaction,
request_deserializer=core__pb2.GetTransactionRequest.FromString,
response_serializer=core__pb2.GetTransactionResponse.SerializeToString,
),
'getEstimatedTransactionFee': grpc.unary_unary_rpc_method_handler(
servicer.getEstimatedTransactionFee,
request_deserializer=core__pb2.GetEstimatedTransactionFeeRequest.FromString,
response_serializer=core__pb2.GetEstimatedTransactionFeeResponse.SerializeToString,
),
'subscribeToBlockHeadersWithChainLocks': grpc.unary_stream_rpc_method_handler(
servicer.subscribeToBlockHeadersWithChainLocks,
request_deserializer=core__pb2.BlockHeadersWithChainLocksRequest.FromString,
response_serializer=core__pb2.BlockHeadersWithChainLocksResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'org.dash.platform.dapi.v0.Core', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
Loading