Skip to content

Commit de56db5

Browse files
committed
[EN-1570] docstrings back
1 parent 06cf170 commit de56db5

File tree

3 files changed

+40
-21
lines changed

3 files changed

+40
-21
lines changed

dxfeed/core/utils/handler.pyx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ from typing import Iterable
55

66

77
cdef class EventHandler:
8+
"""
9+
Master class for user defined event handlers. `update` method should be considered as abstract.
10+
11+
Attributes
12+
----------
13+
columns: list
14+
After attaching listener the field contains one-word descriptors of the values in upcoming event the order
15+
coincides
16+
"""
817
def __init__(self):
9-
"""
10-
Master class for user defined event handlers. `update` method should be considered as abstract.
11-
12-
Attributes
13-
----------
14-
columns: list
15-
After attaching listener the field contains one-word descriptors of the values in upcoming event the order
16-
coincides
17-
"""
1818
self.columns = list()
1919

2020
cdef void cython_internal_update_method(self, event) nogil:

dxfeed/wrappers/endpoint.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@
44

55

66
class Endpoint(object):
7+
"""
8+
Class for connection management. After successful creation Instance will be connected to server
9+
with provided credentials
10+
11+
Attributes
12+
----------
13+
connection_status: str
14+
Status of current connection
15+
address: str
16+
Current connection endpoint address
17+
18+
"""
719
def __init__(self, connection_address: str = 'demo.dxfeed.com:7300', connect: bool = True):
820
"""
9-
Class for connection management. After successful creation Instance will be connected to server
10-
with provided credentials
11-
12-
Attributes
21+
Parameters
1322
----------
1423
connection_address: str
1524
One of possible connection addresses:

dxfeed/wrappers/subscription.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,27 @@
66

77

88
class Subscription(object):
9+
"""
10+
Class for subscription management. Recommended to be created only via create_subscription method in Endpoint class.
11+
Also stores incoming events
12+
13+
Attributes
14+
----------
15+
event_type: str
16+
One of possible event types: 'Trade', 'Quote', 'Summary', 'Profile', 'Order', 'TimeAndSale', 'Candle',
17+
'TradeETH', 'SpreadOrder', 'Greeks', 'TheoPrice', 'Underlying', 'Series', 'Configuration' or ''
18+
symbols: Iterable
19+
Symbols of current subscription.
20+
21+
Note
22+
----
23+
Some event types (e.g. Candle) support only timed subscription.
24+
25+
"""
926
def __init__(self, connection, event_type: str, date_time: Union[str, datetime], exact_format: bool = True):
1027
"""
11-
Class for subscription management. Recommended to be created only via create_subscription method in Endpoint class.
12-
Also stores incoming events
1328
14-
Attributes
29+
Parameters
1530
----------
1631
connection: dxfeed.core.DXFeedPy.ConnectionClass
1732
Core class written in cython, that handle connection related details on the low level
@@ -23,11 +38,6 @@ def __init__(self, connection, event_type: str, date_time: Union[str, datetime],
2338
%Y-%m-%d %H:%M:%S.%f. If None - stream subscription will be created (non-conflated). Default - None.
2439
exact_format: bool
2540
If False no warning will be thrown in case of incomplete date_time parameter. Default - True
26-
27-
Note
28-
----
29-
Some event types (e.g. Candle) support only timed subscription.
30-
3141
"""
3242
self.__event_type = event_type
3343
if date_time is None:

0 commit comments

Comments
 (0)