Skip to content
Merged
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
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ import certstream
def print_callback(message, context):
print("Received messaged -> {}".format(message))

def on_open(instance):
# Instance is the CertStreamClient instance that was opened
def on_open():
print("Connection successfully established!")

def on_error(instance, exception):
Expand All @@ -80,6 +79,14 @@ certstream.listen_for_events(print_callback, url='wss://certstream.calidog.io/',

Need more connection options? Take a look at `**kwargs` in `certstream.listen_for_events`. We pass it to `run_forever` method of [websocket-client](https://github.com/websocket-client/websocket-client/blob/87861f951d1a65ed5d9080f7aaaf44310f376c56/websocket/_app.py#L169-L192).

e.g. to skip SSL/TLS verification
```python
import certstream
import ssl

certstream.listen_for_events(print_callback, url='wss://certstream.calidog.io/', sslopt={"cert_reqs":ssl.CERT_NONE})
```

# Example data structure

The data structure coming from CertStream looks like this:
Expand Down