Skip to content

Commit bbcdc4c

Browse files
Merge pull request #23 from Nasdaq/release-0.2.x
0.2.0 release
2 parents 076227f + cf52b56 commit bbcdc4c

File tree

10 files changed

+96
-264
lines changed

10 files changed

+96
-264
lines changed

README.md

+9-24
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Nasdaq Cloud Data Service (NCDS) provides a modern and efficient method of deliv
66
### Equities
77
#### The Nasdaq Stock Market
88
- [Nasdaq Basic](http://www.nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NasdaqBasic-Cloud.pdf)
9-
- [Nasdaq Last Sale+](http://www.nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NLSPlus-cloud.pdf)
9+
- [Nasdaq Last Sale+](http://www.nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NLSPlus-cloud.pdf)
1010
- [Nasdaq TotalView](http://www.nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/Totalview-ITCH-cloud.pdf)
1111
- [Nasdaq Consolidated Quotes and Trades](https://github.com/Nasdaq/CloudDataService/raw/master/specs/CQT-cloud.pdf)
1212
#### Nasdaq BX
@@ -21,13 +21,11 @@ Nasdaq Cloud Data Service (NCDS) provides a modern and efficient method of deliv
2121
- [Global Index Data Service](http://www.nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/GIDS_Cloud.pdf)
2222
### Options
2323
#### Nasdaq U.S. Derivatives
24-
- [Nasdaq Smart Options](http://nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NCDSSmartOptions.pdf)
24+
- [Nasdaq Smart Options](http://nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NCDSSmartOptions.pdf)
2525
### Mutual Funds
26-
- [Nasdaq Fund Network](http://www.nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NFNDS_NCDS.pdf)
26+
- [Nasdaq Fund Network](http://www.nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NFNDS_NCDS.pdf)
2727
### News
28-
- [Financial News](http://nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/MTNewswires-cloud.pdf)
29-
30-
28+
- [Financial News](http://nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/MTNewswires-cloud.pdf)
3129

3230
# Items To Note
3331

@@ -45,7 +43,7 @@ Nasdaq Cloud Data Service (NCDS) provides a modern and efficient method of deliv
4543
The SDK currently supports Python 3.9 and above
4644

4745
### Get the SDK
48-
The source code is currently hosted on GitHub at: https://github.com/Nasdaq/NasdaqCloudDataService-SDK-Python
46+
The source code is currently hosted on GitHub at: https://github.com/Nasdaq/NasdaqCloudDataService-SDK-Python
4947
- Clone the repository: ```git clone https://github.com/Nasdaq/NasdaqCloudDataService-SDK-Python.git```
5048
- Move into the directory ```cd NasdaqCloudDataService-SDK-Python```
5149
- Install the library and its dependencies from local source with ```pip install -e .```
@@ -55,31 +53,21 @@ Optional: to use the Jupyter notebook provided,
5553
- To run the notebook, use the command ```jupyter notebook``` and the Notebook Dashboard will open in your browser
5654
- Select the file ```python_sdk_examples.ipynb```
5755

58-
### Retrieving certificates
59-
60-
Run `ncdssdk_client/src/main/python/ncdsclient/NCDSSession.py` with arguments, which takes the path where the certificate should be installed.
61-
62-
For example:
63-
```python3.9 ncdssdk_client/src/main/python/ncdsclient/NCDSSession.py -opt INSTALLCERTS -path /my/trusted/store/ncdsinstallcerts```
64-
6556
### Stream configuration
6657

67-
Replace example stream properties in the file **kafka-config.json** (https://github.com/Nasdaq/NasdaqCloudDataService-SDK-Python/blob/master/ncdssdk_client/src/main/python/resources/kafka-config.json) with provided values during on-boarding.
58+
Replace example stream properties in the file **kafka-config.json** (https://github.com/Nasdaq/NasdaqCloudDataService-SDK-Python/blob/master/ncdssdk_client/src/main/python/resources/kafka-config.json) with provided values during on-boarding.
6859

69-
**Note**: Ensure that the full path to the ca.crt file is provided. If the certificate was installed in the directory
70-
`/my/trusted/store/ncdsinstallcerts`, then the full path would be `/my/trusted/store/ncdsinstallcerts/ca.crt`
60+
Required kafka configuration
7161

7262
```properties
73-
"bootstrap.servers": "{streams_endpoint_url}:9094"
74-
"ssl.ca.location": "/path/to/dir/ca.crt"
63+
"bootstrap.servers": {streams_endpoint_url}:9094
7564
```
7665

7766
For optional consumer configurations see: https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md
7867

7968
### Client Authentication configuration
8069

81-
Replace example client authentication properties in the file **client-authentication-config.json** (https://github.com/Nasdaq/NasdaqCloudDataService-SDK-Python/blob/master/ncdssdk_client/src/main/python/resources/client-authentication-config.json) with valid credentials provided during on-boarding.
82-
70+
Replace example client authentication properties in the file **client-authentication-config.json** (https://github.com/Nasdaq/NasdaqCloudDataService-SDK-Python/blob/master/ncdssdk_client/src/main/python/resources/client-authentication-config.json) with valid credentials provided during on-boarding.
8371

8472
```properties
8573
oauth.token.endpoint.uri: "https://{auth_endpoint_url}/auth/realms/pro-realm/protocol/openid-connect/token"
@@ -97,7 +85,6 @@ oauth.client.secret: "client_secret"
9785
" * METRICS - Display the Metrics for the topic\n" +
9886
" * TOPICS - List of streams available on Nasdaq Cloud DataService\n" +
9987
" * GETMSG - Get one example message for the given message name\n" +
100-
" * INSTALLCERTS - Install certificate to keystore\n" +
10188
" * CONTSTREAM - Retrieve continuous stream \n" +
10289
" * FILTERSTREAM - Retrieve continuous stream filtered by symbols and/or msgtypes \n" +
10390
" * HELP - help \n" +
@@ -108,7 +95,6 @@ oauth.client.secret: "client_secret"
10895
"-kafkaprops -- Provide Kafka Properties File path --- For using different set of Kafka Properties \n" +
10996
"-n -- Provide number of messages to retrieve --- REQUIRED for TOP \n" +
11097
"-msgName -- Provide name of message based on schema --- REQUIRED for GETMSG \n" +
111-
"-path -- Provide the path for key store --- REQUIRED for INSTALLCERTS \n" +
11298
"-timestamp -- Provide timestamp in milliseconds --- OPTIONAL for TOP, CONTSTREAM and FILTERSTREAM\n"
11399
```
114100

@@ -138,7 +124,6 @@ security_cfg = {
138124
}
139125
kafka_cfg = {
140126
"bootstrap.servers": "{streams_endpoint_url}:9094",
141-
"ssl.ca.location": "ca.crt",
142127
"auto.offset.reset": "earliest"
143128
}
144129
```

ncdssdk/src/main/python/ncdsclient/internal/utils/InstallCertificates.py

-48
This file was deleted.

ncdssdk/src/main/python/ncdsclient/internal/utils/KafkaConfigLoader.py

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def nasdaq_specific_config(p):
3131
p["security.protocol"] = "SASL_SSL"
3232
p["sasl.mechanism"] = "OAUTHBEARER"
3333
p["ssl.endpoint.identification.algorithm"] = "https"
34-
p["enable.ssl.certificate.verification"] = False
3534

3635
return p
3736

ncdssdk/src/tests/unit-tests/test_InstallCertificates.py

-32
This file was deleted.

ncdssdk_client/src/main/python/ncdsclient/NCDSSession.py

-11
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import sys
44
import logging
55
from ncdssdk.src.main.python.ncdsclient.NCDSClient import NCDSClient
6-
from ncdssdk.src.main.python.ncdsclient.internal.utils.InstallCertificates import InstallCertificates
76
from ncdssdk_client.src.main.python.ncdsclient.utils.ValidateInput import ValidateInput
87
from confluent_kafka import KafkaException
98
from importlib import resources
@@ -22,7 +21,6 @@ def __init__(self, cmd):
2221
self.symbols = cmd['symbols']
2322
self.msgnames = cmd['msgnames']
2423
self.message_name = cmd['msgname']
25-
self.certificate_path = cmd['path']
2624
self.num_top_messages = cmd['n']
2725
self.timestamp = cmd['timestamp']
2826

@@ -79,15 +77,6 @@ def main(self):
7977
ncds_client.get_sample_messages(
8078
self.topic, self.message_name, True)
8179

82-
elif self.test_option == "INSTALLCERTS":
83-
try:
84-
print("Installing Certificates")
85-
# TODO: This could return the name of the full path of the certificate
86-
InstallCertificates(self.certificate_path).install()
87-
print(f"Installed certificate at: {self.certificate_path}")
88-
except Exception as e:
89-
logging.exception(f"Error in installing certificates {e}")
90-
9180
elif self.test_option == "TOPICS":
9281
ncds_client = NCDSClient(self.security_cfg, self.kafka_cfg)
9382
self.topics = ncds_client.list_topics_for_client()

ncdssdk_client/src/main/python/ncdsclient/utils/PrintHelpMessage.py

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ def print_help_message():
55
" * METRICS - Display the Metrics for the topic\n" +
66
" * TOPICS - List of streams available on Nasdaq Cloud DataService\n" +
77
" * GETMSG - Get one example message for the given message name\n" +
8-
" * INSTALLCERTS - Install certificate to keystore\n" +
98
" * CONTSTREAM - Retrieve continuous stream \n" +
109
" * FILTERSTREAM - Retrieve continuous stream filtered by symbols and/or msgtypes \n" +
1110
" * HELP - help \n" +
@@ -16,6 +15,5 @@ def print_help_message():
1615
"-kafkaprops -- Provide Kafka Properties File path --- For using different set of Kafka Properties \n" +
1716
"-n -- Provide number of messages to retrieve --- REQUIRED for TOP \n" +
1817
"-msgName -- Provide name of message based on schema --- REQUIRED for GETMSG \n" +
19-
"-path -- Provide the path for key store --- REQUIRED for INSTALLCERTS \n" +
2018
"-timestamp -- Provide timestamp in milliseconds --- OPTIONAL for TOP, CONTSTREAM and FILTERSTREAM\n"
2119
)

ncdssdk_client/src/main/python/ncdsclient/utils/ValidateInput.py

-7
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ def validate_user_input(self):
4141
print_help_message()
4242
sys.exit()
4343

44-
elif self.test_option == "INSTALLCERTS":
45-
if not self.certificate_path:
46-
print(
47-
"You must provide -path (Directory path) for getting example message")
48-
print_help_message()
49-
sys.exit()
50-
5144
elif self.test_option == "CONTSTREAM":
5245
if not self.topic:
5346
print("You must provide -topic")
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
22
"bootstrap.servers": "bootstrap-server-endpoint",
3-
"ssl.ca.location": "ncdscert.crt",
43
"auto.offset.reset": "earliest"
54
}

0 commit comments

Comments
 (0)