sauda 0.1.1__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sauda/__init__.py +158 -0
- sauda/_proto/__init__.py +0 -0
- sauda/_proto/jugaad_pb2.py +96 -0
- sauda/_proto/jugaad_pb2_grpc.py +517 -0
- sauda-0.1.1.data/scripts/jugaad-rpc.exe +0 -0
- sauda-0.1.1.dist-info/METADATA +34 -0
- sauda-0.1.1.dist-info/RECORD +9 -0
- sauda-0.1.1.dist-info/WHEEL +4 -0
- sauda-0.1.1.dist-info/sboms/jugaad-rpc.cyclonedx.json +9128 -0
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
from . import jugaad_pb2 as jugaad__pb2
|
|
7
|
+
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.71.2'
|
|
9
|
+
GRPC_VERSION = grpc.__version__
|
|
10
|
+
_version_not_supported = False
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from grpc._utilities import first_version_is_lower
|
|
14
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
15
|
+
except ImportError:
|
|
16
|
+
_version_not_supported = True
|
|
17
|
+
|
|
18
|
+
if _version_not_supported:
|
|
19
|
+
raise RuntimeError(
|
|
20
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
21
|
+
+ f' but the generated code in jugaad_pb2_grpc.py depends on'
|
|
22
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
23
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
24
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class JugaadStub(object):
|
|
29
|
+
"""Exposes jugaad-core over gRPC, for frontends written in languages other
|
|
30
|
+
than Rust. Starts with one symbol's live quote (unary + streamed) as
|
|
31
|
+
the first working slice - more of jugaad-core's surface gets added the
|
|
32
|
+
same way once this round-trips end to end.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__(self, channel):
|
|
36
|
+
"""Constructor.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
channel: A grpc.Channel.
|
|
40
|
+
"""
|
|
41
|
+
self.GetStockQuote = channel.unary_unary(
|
|
42
|
+
'/jugaad.Jugaad/GetStockQuote',
|
|
43
|
+
request_serializer=jugaad__pb2.StockQuoteRequest.SerializeToString,
|
|
44
|
+
response_deserializer=jugaad__pb2.StockQuote.FromString,
|
|
45
|
+
_registered_method=True)
|
|
46
|
+
self.WatchStockQuote = channel.unary_stream(
|
|
47
|
+
'/jugaad.Jugaad/WatchStockQuote',
|
|
48
|
+
request_serializer=jugaad__pb2.WatchStockQuoteRequest.SerializeToString,
|
|
49
|
+
response_deserializer=jugaad__pb2.StockQuote.FromString,
|
|
50
|
+
_registered_method=True)
|
|
51
|
+
self.GetStockHistory = channel.unary_unary(
|
|
52
|
+
'/jugaad.Jugaad/GetStockHistory',
|
|
53
|
+
request_serializer=jugaad__pb2.StockHistoryRequest.SerializeToString,
|
|
54
|
+
response_deserializer=jugaad__pb2.StockHistoryResponse.FromString,
|
|
55
|
+
_registered_method=True)
|
|
56
|
+
self.GetIndexHistory = channel.unary_unary(
|
|
57
|
+
'/jugaad.Jugaad/GetIndexHistory',
|
|
58
|
+
request_serializer=jugaad__pb2.IndexHistoryRequest.SerializeToString,
|
|
59
|
+
response_deserializer=jugaad__pb2.IndexHistoryResponse.FromString,
|
|
60
|
+
_registered_method=True)
|
|
61
|
+
self.GetIndexSnapshot = channel.unary_unary(
|
|
62
|
+
'/jugaad.Jugaad/GetIndexSnapshot',
|
|
63
|
+
request_serializer=jugaad__pb2.IndexSnapshotRequest.SerializeToString,
|
|
64
|
+
response_deserializer=jugaad__pb2.IndexSnapshotResponse.FromString,
|
|
65
|
+
_registered_method=True)
|
|
66
|
+
self.GetLargeDeals = channel.unary_unary(
|
|
67
|
+
'/jugaad.Jugaad/GetLargeDeals',
|
|
68
|
+
request_serializer=jugaad__pb2.LargeDealsRequest.SerializeToString,
|
|
69
|
+
response_deserializer=jugaad__pb2.LargeDealsResponse.FromString,
|
|
70
|
+
_registered_method=True)
|
|
71
|
+
self.GetMarketStatus = channel.unary_unary(
|
|
72
|
+
'/jugaad.Jugaad/GetMarketStatus',
|
|
73
|
+
request_serializer=jugaad__pb2.MarketStatusRequest.SerializeToString,
|
|
74
|
+
response_deserializer=jugaad__pb2.MarketStatusResponse.FromString,
|
|
75
|
+
_registered_method=True)
|
|
76
|
+
self.GetOptionChain = channel.unary_unary(
|
|
77
|
+
'/jugaad.Jugaad/GetOptionChain',
|
|
78
|
+
request_serializer=jugaad__pb2.OptionChainRequest.SerializeToString,
|
|
79
|
+
response_deserializer=jugaad__pb2.OptionChainResponse.FromString,
|
|
80
|
+
_registered_method=True)
|
|
81
|
+
self.GetOptionExpiries = channel.unary_unary(
|
|
82
|
+
'/jugaad.Jugaad/GetOptionExpiries',
|
|
83
|
+
request_serializer=jugaad__pb2.OptionExpiriesRequest.SerializeToString,
|
|
84
|
+
response_deserializer=jugaad__pb2.OptionExpiriesResponse.FromString,
|
|
85
|
+
_registered_method=True)
|
|
86
|
+
self.GetCorporateAnnouncements = channel.unary_unary(
|
|
87
|
+
'/jugaad.Jugaad/GetCorporateAnnouncements',
|
|
88
|
+
request_serializer=jugaad__pb2.CorporateAnnouncementsRequest.SerializeToString,
|
|
89
|
+
response_deserializer=jugaad__pb2.CorporateAnnouncementsResponse.FromString,
|
|
90
|
+
_registered_method=True)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class JugaadServicer(object):
|
|
94
|
+
"""Exposes jugaad-core over gRPC, for frontends written in languages other
|
|
95
|
+
than Rust. Starts with one symbol's live quote (unary + streamed) as
|
|
96
|
+
the first working slice - more of jugaad-core's surface gets added the
|
|
97
|
+
same way once this round-trips end to end.
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
def GetStockQuote(self, request, context):
|
|
101
|
+
"""Fetches a stock's live quote once.
|
|
102
|
+
"""
|
|
103
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
104
|
+
context.set_details('Method not implemented!')
|
|
105
|
+
raise NotImplementedError('Method not implemented!')
|
|
106
|
+
|
|
107
|
+
def WatchStockQuote(self, request, context):
|
|
108
|
+
"""Streams a stock's live quote, re-fetching every `interval_seconds`
|
|
109
|
+
(default 3 if unset) until the client disconnects.
|
|
110
|
+
"""
|
|
111
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
112
|
+
context.set_details('Method not implemented!')
|
|
113
|
+
raise NotImplementedError('Method not implemented!')
|
|
114
|
+
|
|
115
|
+
def GetStockHistory(self, request, context):
|
|
116
|
+
"""Daily OHLC/volume/delivery history for a stock over a date range.
|
|
117
|
+
"""
|
|
118
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
119
|
+
context.set_details('Method not implemented!')
|
|
120
|
+
raise NotImplementedError('Method not implemented!')
|
|
121
|
+
|
|
122
|
+
def GetIndexHistory(self, request, context):
|
|
123
|
+
"""Daily OHLC history for an NSE index (e.g. "NIFTY 50") over a date range.
|
|
124
|
+
"""
|
|
125
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
126
|
+
context.set_details('Method not implemented!')
|
|
127
|
+
raise NotImplementedError('Method not implemented!')
|
|
128
|
+
|
|
129
|
+
def GetIndexSnapshot(self, request, context):
|
|
130
|
+
"""Live snapshot of every NSE index (price/change, day + 52w range,
|
|
131
|
+
valuation ratios, market breadth) - covers NIFTY 50, NIFTY BANK,
|
|
132
|
+
SENSEX-equivalent and India VIX in one call.
|
|
133
|
+
"""
|
|
134
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
135
|
+
context.set_details('Method not implemented!')
|
|
136
|
+
raise NotImplementedError('Method not implemented!')
|
|
137
|
+
|
|
138
|
+
def GetLargeDeals(self, request, context):
|
|
139
|
+
"""Today's bulk/short/block deals - the nearest NSE equivalent of a daily
|
|
140
|
+
short-sale-volume file.
|
|
141
|
+
"""
|
|
142
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
143
|
+
context.set_details('Method not implemented!')
|
|
144
|
+
raise NotImplementedError('Method not implemented!')
|
|
145
|
+
|
|
146
|
+
def GetMarketStatus(self, request, context):
|
|
147
|
+
"""Live open/closed status per market segment (Capital Market, Currency,
|
|
148
|
+
Commodity, Debt), holiday-aware unlike a client-computed IST clock.
|
|
149
|
+
"""
|
|
150
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
151
|
+
context.set_details('Method not implemented!')
|
|
152
|
+
raise NotImplementedError('Method not implemented!')
|
|
153
|
+
|
|
154
|
+
def GetOptionChain(self, request, context):
|
|
155
|
+
"""Option chain for an index (NIFTY/BANKNIFTY/FINNIFTY) or equity symbol.
|
|
156
|
+
"""
|
|
157
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
158
|
+
context.set_details('Method not implemented!')
|
|
159
|
+
raise NotImplementedError('Method not implemented!')
|
|
160
|
+
|
|
161
|
+
def GetOptionExpiries(self, request, context):
|
|
162
|
+
"""Every available expiry date for a symbol's option chain, nearest
|
|
163
|
+
first - GetOptionChain only ever resolves one expiry per call (the
|
|
164
|
+
nearest one, or the one requested), so a caller wanting a picker of
|
|
165
|
+
upcoming dates needs this first.
|
|
166
|
+
"""
|
|
167
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
168
|
+
context.set_details('Method not implemented!')
|
|
169
|
+
raise NotImplementedError('Method not implemented!')
|
|
170
|
+
|
|
171
|
+
def GetCorporateAnnouncements(self, request, context):
|
|
172
|
+
"""Corporate announcements/disclosures for a segment (and optionally one
|
|
173
|
+
symbol) over a date range - general exchange disclosures, not
|
|
174
|
+
specifically SEBI insider-trading filings (no confirmed NSE endpoint
|
|
175
|
+
for those yet).
|
|
176
|
+
"""
|
|
177
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
178
|
+
context.set_details('Method not implemented!')
|
|
179
|
+
raise NotImplementedError('Method not implemented!')
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def add_JugaadServicer_to_server(servicer, server):
|
|
183
|
+
rpc_method_handlers = {
|
|
184
|
+
'GetStockQuote': grpc.unary_unary_rpc_method_handler(
|
|
185
|
+
servicer.GetStockQuote,
|
|
186
|
+
request_deserializer=jugaad__pb2.StockQuoteRequest.FromString,
|
|
187
|
+
response_serializer=jugaad__pb2.StockQuote.SerializeToString,
|
|
188
|
+
),
|
|
189
|
+
'WatchStockQuote': grpc.unary_stream_rpc_method_handler(
|
|
190
|
+
servicer.WatchStockQuote,
|
|
191
|
+
request_deserializer=jugaad__pb2.WatchStockQuoteRequest.FromString,
|
|
192
|
+
response_serializer=jugaad__pb2.StockQuote.SerializeToString,
|
|
193
|
+
),
|
|
194
|
+
'GetStockHistory': grpc.unary_unary_rpc_method_handler(
|
|
195
|
+
servicer.GetStockHistory,
|
|
196
|
+
request_deserializer=jugaad__pb2.StockHistoryRequest.FromString,
|
|
197
|
+
response_serializer=jugaad__pb2.StockHistoryResponse.SerializeToString,
|
|
198
|
+
),
|
|
199
|
+
'GetIndexHistory': grpc.unary_unary_rpc_method_handler(
|
|
200
|
+
servicer.GetIndexHistory,
|
|
201
|
+
request_deserializer=jugaad__pb2.IndexHistoryRequest.FromString,
|
|
202
|
+
response_serializer=jugaad__pb2.IndexHistoryResponse.SerializeToString,
|
|
203
|
+
),
|
|
204
|
+
'GetIndexSnapshot': grpc.unary_unary_rpc_method_handler(
|
|
205
|
+
servicer.GetIndexSnapshot,
|
|
206
|
+
request_deserializer=jugaad__pb2.IndexSnapshotRequest.FromString,
|
|
207
|
+
response_serializer=jugaad__pb2.IndexSnapshotResponse.SerializeToString,
|
|
208
|
+
),
|
|
209
|
+
'GetLargeDeals': grpc.unary_unary_rpc_method_handler(
|
|
210
|
+
servicer.GetLargeDeals,
|
|
211
|
+
request_deserializer=jugaad__pb2.LargeDealsRequest.FromString,
|
|
212
|
+
response_serializer=jugaad__pb2.LargeDealsResponse.SerializeToString,
|
|
213
|
+
),
|
|
214
|
+
'GetMarketStatus': grpc.unary_unary_rpc_method_handler(
|
|
215
|
+
servicer.GetMarketStatus,
|
|
216
|
+
request_deserializer=jugaad__pb2.MarketStatusRequest.FromString,
|
|
217
|
+
response_serializer=jugaad__pb2.MarketStatusResponse.SerializeToString,
|
|
218
|
+
),
|
|
219
|
+
'GetOptionChain': grpc.unary_unary_rpc_method_handler(
|
|
220
|
+
servicer.GetOptionChain,
|
|
221
|
+
request_deserializer=jugaad__pb2.OptionChainRequest.FromString,
|
|
222
|
+
response_serializer=jugaad__pb2.OptionChainResponse.SerializeToString,
|
|
223
|
+
),
|
|
224
|
+
'GetOptionExpiries': grpc.unary_unary_rpc_method_handler(
|
|
225
|
+
servicer.GetOptionExpiries,
|
|
226
|
+
request_deserializer=jugaad__pb2.OptionExpiriesRequest.FromString,
|
|
227
|
+
response_serializer=jugaad__pb2.OptionExpiriesResponse.SerializeToString,
|
|
228
|
+
),
|
|
229
|
+
'GetCorporateAnnouncements': grpc.unary_unary_rpc_method_handler(
|
|
230
|
+
servicer.GetCorporateAnnouncements,
|
|
231
|
+
request_deserializer=jugaad__pb2.CorporateAnnouncementsRequest.FromString,
|
|
232
|
+
response_serializer=jugaad__pb2.CorporateAnnouncementsResponse.SerializeToString,
|
|
233
|
+
),
|
|
234
|
+
}
|
|
235
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
236
|
+
'jugaad.Jugaad', rpc_method_handlers)
|
|
237
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
238
|
+
server.add_registered_method_handlers('jugaad.Jugaad', rpc_method_handlers)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
# This class is part of an EXPERIMENTAL API.
|
|
242
|
+
class Jugaad(object):
|
|
243
|
+
"""Exposes jugaad-core over gRPC, for frontends written in languages other
|
|
244
|
+
than Rust. Starts with one symbol's live quote (unary + streamed) as
|
|
245
|
+
the first working slice - more of jugaad-core's surface gets added the
|
|
246
|
+
same way once this round-trips end to end.
|
|
247
|
+
"""
|
|
248
|
+
|
|
249
|
+
@staticmethod
|
|
250
|
+
def GetStockQuote(request,
|
|
251
|
+
target,
|
|
252
|
+
options=(),
|
|
253
|
+
channel_credentials=None,
|
|
254
|
+
call_credentials=None,
|
|
255
|
+
insecure=False,
|
|
256
|
+
compression=None,
|
|
257
|
+
wait_for_ready=None,
|
|
258
|
+
timeout=None,
|
|
259
|
+
metadata=None):
|
|
260
|
+
return grpc.experimental.unary_unary(
|
|
261
|
+
request,
|
|
262
|
+
target,
|
|
263
|
+
'/jugaad.Jugaad/GetStockQuote',
|
|
264
|
+
jugaad__pb2.StockQuoteRequest.SerializeToString,
|
|
265
|
+
jugaad__pb2.StockQuote.FromString,
|
|
266
|
+
options,
|
|
267
|
+
channel_credentials,
|
|
268
|
+
insecure,
|
|
269
|
+
call_credentials,
|
|
270
|
+
compression,
|
|
271
|
+
wait_for_ready,
|
|
272
|
+
timeout,
|
|
273
|
+
metadata,
|
|
274
|
+
_registered_method=True)
|
|
275
|
+
|
|
276
|
+
@staticmethod
|
|
277
|
+
def WatchStockQuote(request,
|
|
278
|
+
target,
|
|
279
|
+
options=(),
|
|
280
|
+
channel_credentials=None,
|
|
281
|
+
call_credentials=None,
|
|
282
|
+
insecure=False,
|
|
283
|
+
compression=None,
|
|
284
|
+
wait_for_ready=None,
|
|
285
|
+
timeout=None,
|
|
286
|
+
metadata=None):
|
|
287
|
+
return grpc.experimental.unary_stream(
|
|
288
|
+
request,
|
|
289
|
+
target,
|
|
290
|
+
'/jugaad.Jugaad/WatchStockQuote',
|
|
291
|
+
jugaad__pb2.WatchStockQuoteRequest.SerializeToString,
|
|
292
|
+
jugaad__pb2.StockQuote.FromString,
|
|
293
|
+
options,
|
|
294
|
+
channel_credentials,
|
|
295
|
+
insecure,
|
|
296
|
+
call_credentials,
|
|
297
|
+
compression,
|
|
298
|
+
wait_for_ready,
|
|
299
|
+
timeout,
|
|
300
|
+
metadata,
|
|
301
|
+
_registered_method=True)
|
|
302
|
+
|
|
303
|
+
@staticmethod
|
|
304
|
+
def GetStockHistory(request,
|
|
305
|
+
target,
|
|
306
|
+
options=(),
|
|
307
|
+
channel_credentials=None,
|
|
308
|
+
call_credentials=None,
|
|
309
|
+
insecure=False,
|
|
310
|
+
compression=None,
|
|
311
|
+
wait_for_ready=None,
|
|
312
|
+
timeout=None,
|
|
313
|
+
metadata=None):
|
|
314
|
+
return grpc.experimental.unary_unary(
|
|
315
|
+
request,
|
|
316
|
+
target,
|
|
317
|
+
'/jugaad.Jugaad/GetStockHistory',
|
|
318
|
+
jugaad__pb2.StockHistoryRequest.SerializeToString,
|
|
319
|
+
jugaad__pb2.StockHistoryResponse.FromString,
|
|
320
|
+
options,
|
|
321
|
+
channel_credentials,
|
|
322
|
+
insecure,
|
|
323
|
+
call_credentials,
|
|
324
|
+
compression,
|
|
325
|
+
wait_for_ready,
|
|
326
|
+
timeout,
|
|
327
|
+
metadata,
|
|
328
|
+
_registered_method=True)
|
|
329
|
+
|
|
330
|
+
@staticmethod
|
|
331
|
+
def GetIndexHistory(request,
|
|
332
|
+
target,
|
|
333
|
+
options=(),
|
|
334
|
+
channel_credentials=None,
|
|
335
|
+
call_credentials=None,
|
|
336
|
+
insecure=False,
|
|
337
|
+
compression=None,
|
|
338
|
+
wait_for_ready=None,
|
|
339
|
+
timeout=None,
|
|
340
|
+
metadata=None):
|
|
341
|
+
return grpc.experimental.unary_unary(
|
|
342
|
+
request,
|
|
343
|
+
target,
|
|
344
|
+
'/jugaad.Jugaad/GetIndexHistory',
|
|
345
|
+
jugaad__pb2.IndexHistoryRequest.SerializeToString,
|
|
346
|
+
jugaad__pb2.IndexHistoryResponse.FromString,
|
|
347
|
+
options,
|
|
348
|
+
channel_credentials,
|
|
349
|
+
insecure,
|
|
350
|
+
call_credentials,
|
|
351
|
+
compression,
|
|
352
|
+
wait_for_ready,
|
|
353
|
+
timeout,
|
|
354
|
+
metadata,
|
|
355
|
+
_registered_method=True)
|
|
356
|
+
|
|
357
|
+
@staticmethod
|
|
358
|
+
def GetIndexSnapshot(request,
|
|
359
|
+
target,
|
|
360
|
+
options=(),
|
|
361
|
+
channel_credentials=None,
|
|
362
|
+
call_credentials=None,
|
|
363
|
+
insecure=False,
|
|
364
|
+
compression=None,
|
|
365
|
+
wait_for_ready=None,
|
|
366
|
+
timeout=None,
|
|
367
|
+
metadata=None):
|
|
368
|
+
return grpc.experimental.unary_unary(
|
|
369
|
+
request,
|
|
370
|
+
target,
|
|
371
|
+
'/jugaad.Jugaad/GetIndexSnapshot',
|
|
372
|
+
jugaad__pb2.IndexSnapshotRequest.SerializeToString,
|
|
373
|
+
jugaad__pb2.IndexSnapshotResponse.FromString,
|
|
374
|
+
options,
|
|
375
|
+
channel_credentials,
|
|
376
|
+
insecure,
|
|
377
|
+
call_credentials,
|
|
378
|
+
compression,
|
|
379
|
+
wait_for_ready,
|
|
380
|
+
timeout,
|
|
381
|
+
metadata,
|
|
382
|
+
_registered_method=True)
|
|
383
|
+
|
|
384
|
+
@staticmethod
|
|
385
|
+
def GetLargeDeals(request,
|
|
386
|
+
target,
|
|
387
|
+
options=(),
|
|
388
|
+
channel_credentials=None,
|
|
389
|
+
call_credentials=None,
|
|
390
|
+
insecure=False,
|
|
391
|
+
compression=None,
|
|
392
|
+
wait_for_ready=None,
|
|
393
|
+
timeout=None,
|
|
394
|
+
metadata=None):
|
|
395
|
+
return grpc.experimental.unary_unary(
|
|
396
|
+
request,
|
|
397
|
+
target,
|
|
398
|
+
'/jugaad.Jugaad/GetLargeDeals',
|
|
399
|
+
jugaad__pb2.LargeDealsRequest.SerializeToString,
|
|
400
|
+
jugaad__pb2.LargeDealsResponse.FromString,
|
|
401
|
+
options,
|
|
402
|
+
channel_credentials,
|
|
403
|
+
insecure,
|
|
404
|
+
call_credentials,
|
|
405
|
+
compression,
|
|
406
|
+
wait_for_ready,
|
|
407
|
+
timeout,
|
|
408
|
+
metadata,
|
|
409
|
+
_registered_method=True)
|
|
410
|
+
|
|
411
|
+
@staticmethod
|
|
412
|
+
def GetMarketStatus(request,
|
|
413
|
+
target,
|
|
414
|
+
options=(),
|
|
415
|
+
channel_credentials=None,
|
|
416
|
+
call_credentials=None,
|
|
417
|
+
insecure=False,
|
|
418
|
+
compression=None,
|
|
419
|
+
wait_for_ready=None,
|
|
420
|
+
timeout=None,
|
|
421
|
+
metadata=None):
|
|
422
|
+
return grpc.experimental.unary_unary(
|
|
423
|
+
request,
|
|
424
|
+
target,
|
|
425
|
+
'/jugaad.Jugaad/GetMarketStatus',
|
|
426
|
+
jugaad__pb2.MarketStatusRequest.SerializeToString,
|
|
427
|
+
jugaad__pb2.MarketStatusResponse.FromString,
|
|
428
|
+
options,
|
|
429
|
+
channel_credentials,
|
|
430
|
+
insecure,
|
|
431
|
+
call_credentials,
|
|
432
|
+
compression,
|
|
433
|
+
wait_for_ready,
|
|
434
|
+
timeout,
|
|
435
|
+
metadata,
|
|
436
|
+
_registered_method=True)
|
|
437
|
+
|
|
438
|
+
@staticmethod
|
|
439
|
+
def GetOptionChain(request,
|
|
440
|
+
target,
|
|
441
|
+
options=(),
|
|
442
|
+
channel_credentials=None,
|
|
443
|
+
call_credentials=None,
|
|
444
|
+
insecure=False,
|
|
445
|
+
compression=None,
|
|
446
|
+
wait_for_ready=None,
|
|
447
|
+
timeout=None,
|
|
448
|
+
metadata=None):
|
|
449
|
+
return grpc.experimental.unary_unary(
|
|
450
|
+
request,
|
|
451
|
+
target,
|
|
452
|
+
'/jugaad.Jugaad/GetOptionChain',
|
|
453
|
+
jugaad__pb2.OptionChainRequest.SerializeToString,
|
|
454
|
+
jugaad__pb2.OptionChainResponse.FromString,
|
|
455
|
+
options,
|
|
456
|
+
channel_credentials,
|
|
457
|
+
insecure,
|
|
458
|
+
call_credentials,
|
|
459
|
+
compression,
|
|
460
|
+
wait_for_ready,
|
|
461
|
+
timeout,
|
|
462
|
+
metadata,
|
|
463
|
+
_registered_method=True)
|
|
464
|
+
|
|
465
|
+
@staticmethod
|
|
466
|
+
def GetOptionExpiries(request,
|
|
467
|
+
target,
|
|
468
|
+
options=(),
|
|
469
|
+
channel_credentials=None,
|
|
470
|
+
call_credentials=None,
|
|
471
|
+
insecure=False,
|
|
472
|
+
compression=None,
|
|
473
|
+
wait_for_ready=None,
|
|
474
|
+
timeout=None,
|
|
475
|
+
metadata=None):
|
|
476
|
+
return grpc.experimental.unary_unary(
|
|
477
|
+
request,
|
|
478
|
+
target,
|
|
479
|
+
'/jugaad.Jugaad/GetOptionExpiries',
|
|
480
|
+
jugaad__pb2.OptionExpiriesRequest.SerializeToString,
|
|
481
|
+
jugaad__pb2.OptionExpiriesResponse.FromString,
|
|
482
|
+
options,
|
|
483
|
+
channel_credentials,
|
|
484
|
+
insecure,
|
|
485
|
+
call_credentials,
|
|
486
|
+
compression,
|
|
487
|
+
wait_for_ready,
|
|
488
|
+
timeout,
|
|
489
|
+
metadata,
|
|
490
|
+
_registered_method=True)
|
|
491
|
+
|
|
492
|
+
@staticmethod
|
|
493
|
+
def GetCorporateAnnouncements(request,
|
|
494
|
+
target,
|
|
495
|
+
options=(),
|
|
496
|
+
channel_credentials=None,
|
|
497
|
+
call_credentials=None,
|
|
498
|
+
insecure=False,
|
|
499
|
+
compression=None,
|
|
500
|
+
wait_for_ready=None,
|
|
501
|
+
timeout=None,
|
|
502
|
+
metadata=None):
|
|
503
|
+
return grpc.experimental.unary_unary(
|
|
504
|
+
request,
|
|
505
|
+
target,
|
|
506
|
+
'/jugaad.Jugaad/GetCorporateAnnouncements',
|
|
507
|
+
jugaad__pb2.CorporateAnnouncementsRequest.SerializeToString,
|
|
508
|
+
jugaad__pb2.CorporateAnnouncementsResponse.FromString,
|
|
509
|
+
options,
|
|
510
|
+
channel_credentials,
|
|
511
|
+
insecure,
|
|
512
|
+
call_credentials,
|
|
513
|
+
compression,
|
|
514
|
+
wait_for_ready,
|
|
515
|
+
timeout,
|
|
516
|
+
metadata,
|
|
517
|
+
_registered_method=True)
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sauda
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Requires-Dist: grpcio>=1.71.2
|
|
5
|
+
Requires-Dist: protobuf>=5.29
|
|
6
|
+
Summary: NSE market data for Python, backed by a bundled Rust gRPC server
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Requires-Python: >=3.9
|
|
9
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
10
|
+
Project-URL: Repository, https://github.com/Am1n1602/jugaad-rs
|
|
11
|
+
|
|
12
|
+
# sauda
|
|
13
|
+
|
|
14
|
+
NSE market data for Python. A thin client over [`jugaad-rpc`](https://github.com/Am1n1602/jugaad-rs/tree/main/crates/jugaad-rpc), the Rust gRPC server from the [jugaad-rs](https://github.com/Am1n1602/jugaad-rs) monorepo - the wheel bundles the server binary, so there is nothing else to install or run.
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
from sauda import Client
|
|
18
|
+
|
|
19
|
+
with Client() as c: # starts the bundled server on a loopback port
|
|
20
|
+
print(c.stock_quote("SBIN")["last_price"])
|
|
21
|
+
rows = c.stock_history("SBIN", "2026-01-01", "2026-01-31")
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The server stops when the client is closed, and also when your Python process dies (including a hard kill or a notebook kernel restart). `Client.stub` is the raw generated gRPC stub, which exposes every RPC the server offers.
|
|
25
|
+
|
|
26
|
+
## Development
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install -r requirements-gen.txt maturin
|
|
30
|
+
python generate.py # generate src/sauda/_proto from the shared .proto
|
|
31
|
+
maturin develop --release # build the server + install in the current venv
|
|
32
|
+
python smoke_test.py # offline end-to-end check
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
sauda/__init__.py,sha256=ilE8KkRKWe4wTvQbVmf2vg6D0Sx8HpZSUWhRR69jcwU,5055
|
|
2
|
+
sauda/_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
sauda/_proto/jugaad_pb2.py,sha256=AohH4J-iA0pqNRh76Q9QNRwmo5vsRI47a1XJUY6sJVA,13669
|
|
4
|
+
sauda/_proto/jugaad_pb2_grpc.py,sha256=Ti5oM1GdzTEebzdKK-oHZ-ji456bFJm43fxYu8YG-mE,20937
|
|
5
|
+
sauda-0.1.1.data/scripts/jugaad-rpc.exe,sha256=hzlFSuCW7n5qG52GEyOmcCsVY7bUWUynirD3zrDIbKQ,6062080
|
|
6
|
+
sauda-0.1.1.dist-info/METADATA,sha256=pzWaBpf8AZBUaxtVMkqAdFL1OQNcm-bfDJgymeelqYQ,1428
|
|
7
|
+
sauda-0.1.1.dist-info/WHEEL,sha256=8Aej0W0a6Cz6apA3IzJrTnxLRVLAt-w0Oh8SA3Con_c,94
|
|
8
|
+
sauda-0.1.1.dist-info/sboms/jugaad-rpc.cyclonedx.json,sha256=vUu_Uw6fibhT-pKRGIyNvecL0uzbkClMLVLqTvlWxw4,300364
|
|
9
|
+
sauda-0.1.1.dist-info/RECORD,,
|