Consuming Streaming Stocks Data with Python, Websockets and Pulsar
Published: 2022-12-30 21:19:40

---
title: Consuming Streaming Stocks Data with Python, Websockets and Pulsar
published: true
date: 2022-12-30 21:19:00 UTC
tags: 
canonical_url: 
---

[ https://medium.com/@tspann/lets-check-our-stocks-from-finnhub-and-do-some-real-time-analytics-1b7963008e19](https://medium.com/@tspann/lets-check-our-stocks-from-finnhub-and-do-some-real-time-analytics-1b7963008e19)

<section style="box-sizing: inherit;"><div style="box-sizing: inherit;"><div style="box-sizing: inherit; overflow-wrap: break-word; word-break: break-word;">
<div style="box-sizing: inherit;"><h1 data-selectable-paragraph="" id="f4d6" style='box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 32px; letter-spacing: -0.016em; line-height: 40px; margin: 0.6em 0px -0.27em;'>Let’s Check Our Stocks From FinnHub and Do Some Real-Time Analytics</h1></div>
<p data-selectable-paragraph="" id="66a7" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'><span style="box-sizing: inherit; font-weight: 700;">Code</span>: <a href="https://github.com/tspannhw/FLiPN-Py-Stocks" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">https://github.com/tspannhw/FLiPN-Py-Stocks</a></p>
<p data-selectable-paragraph="" id="64db" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'>The easiest application to build is a simple Python application since finnhub includes the basics in their documentation. We are going to use their free <span style="box-sizing: inherit; font-weight: 700;">WEBSOCKET</span> interface to Trades so we can get real-time events as they happen. We will get <span style="box-sizing: inherit; font-weight: 700;">JSON</span> data for each trade triggered.</p>
<div style="box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; margin-top: 32px;"><a href="https://finnhub.io/docs/api/websocket-trades" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit; text-decoration-line: none;" target="_blank"><div style="box-sizing: inherit; display: flex; flex: 0 0 auto; padding: 0px;">
<div style="box-sizing: inherit; display: flex; flex-direction: column; flex: 1 1 auto; justify-content: center; padding: 16px 20px;">
<h2 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #292929; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>Finnhub - Free realtime APIs for stock, forex and cryptocurrency.</h2>
<div style="box-sizing: inherit; margin-top: 8px;"><h3 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>Finnhub - Free APIs for realtime stock, forex, and cryptocurrency. Company fundamentals, Economic data, and Alternative…</h3></div>
<div style="box-sizing: inherit; margin-top: 12px;"><p style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>finnhub.io</p></div>
</div>
<div style="box-sizing: inherit; width: 160px;"><div style='background-image: url("https://miro.medium.com/max/320/0*iV00Ydhhffq56Gmz"); background-origin: border-box; background-position: 50% 50%; background-size: cover; box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; height: 167px; max-width: 100%; width: 160px;'></div></div>
</div></a></div>
<h1 data-selectable-paragraph="" id="7e22" style='box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;'>Python App</h1>
<p data-selectable-paragraph="" id="6d64" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 0.86em 0px -0.46em; word-break: break-word;'>Python application receives websocket stream of JSON arrays and sends individual JSON messages with a JSON schema.</p>
<p style="box-sizing: inherit; clear: both; margin: 56px auto 0px;"></p>
<div role="button" style="box-sizing: inherit; cursor: zoom-in; position: relative; transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) 0s; width: 680px; z-index: auto;" tabindex="0"><div style="box-sizing: inherit; margin-left: auto; margin-right: auto; max-width: 2600px;"><img alt="" height="144" loading="lazy" role="presentation" src="https://miro.medium.com/max/1400/0*O765zQsziWwPnuNO.png" style="background-color: white; box-sizing: inherit; height: auto; max-width: 100%; vertical-align: middle; width: 680px;" width="700"></div></div>
<figcaption data-selectable-paragraph="" style='box-sizing: inherit; color: #757575; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; margin-left: auto; margin-right: auto; margin-top: 10px; max-width: 728px; text-align: center;'>architecture</figcaption>
<h1 data-selectable-paragraph="" id="6ed9" style='box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;'>Raw Data</h1>
<pre style='background: rgb(249, 249, 249); border-radius: 4px; border: 1px solid rgb(107, 107, 107); box-sizing: inherit; color: #292929; font-family: source-code-pro, Menlo, Monaco, "Courier New", Courier, monospace; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 32px;'><span data-selectable-paragraph="" id="16e8" style="box-sizing: inherit; display: block; font-size: 14px; letter-spacing: -0.022em; line-height: 1.4; margin-bottom: -0.2em; margin-top: -0.2em; min-width: fit-content;"><span style="box-sizing: inherit;">{</span><span style="box-sizing: inherit; color: #836c28;">"data"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit;">[</span><span style="box-sizing: inherit;">{</span><span style="box-sizing: inherit; color: #836c28;">"c"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit;">[</span><span style="box-sizing: inherit; color: #c41a16;">"1"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"8"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"24"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"12"</span><span style="box-sizing: inherit;">]</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"p"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">122.1</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"s"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #c41a16;">"TSLA"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"t"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1672348887195</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"v"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1</span><span style="box-sizing: inherit;">}</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit;">{</span><span style="box-sizing: inherit; color: #836c28;">"c"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit;">[</span><span style="box-sizing: inherit; color: #c41a16;">"1"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"8"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"24"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"12"</span><span style="box-sizing: inherit;">]</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"p"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">122.09</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"s"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #c41a16;">"TSLA"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"t"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1672348887196</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"v"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">4</span><span style="box-sizing: inherit;">}</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit;">{</span><span style="box-sizing: inherit; color: #836c28;">"c"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit;">[</span><span style="box-sizing: inherit; color: #c41a16;">"1"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"8"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"24"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"12"</span><span style="box-sizing: inherit;">]</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"p"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">122.09</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"s"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #c41a16;">"TSLA"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"t"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1672348887196</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"v"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">10</span><span style="box-sizing: inherit;">}</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit;">{</span><span style="box-sizing: inherit; color: #836c28;">"c"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit;">[</span><span style="box-sizing: inherit; color: #c41a16;">"1"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"8"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"24"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"12"</span><span style="box-sizing: inherit;">]</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"p"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">122.1</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"s"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #c41a16;">"TSLA"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"t"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1672348887196</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"v"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1</span><span style="box-sizing: inherit;">}</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit;">{</span><span style="box-sizing: inherit; color: #836c28;">"c"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit;">[</span><span style="box-sizing: inherit; color: #c41a16;">"1"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"8"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"24"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"12"</span><span style="box-sizing: inherit;">]</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"p"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">122.1</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"s"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #c41a16;">"TSLA"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"t"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1672348887196</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"v"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">2</span><span style="box-sizing: inherit;">}</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit;">{</span><span style="box-sizing: inherit; color: #836c28;">"c"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit;">[</span><span style="box-sizing: inherit; color: #c41a16;">"1"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"8"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"24"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"12"</span><span style="box-sizing: inherit;">]</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"p"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">122.1</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"s"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #c41a16;">"TSLA"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"t"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1672348887196</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"v"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">10</span><span style="box-sizing: inherit;">}</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit;">{</span><span style="box-sizing: inherit; color: #836c28;">"c"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit;">[</span><span style="box-sizing: inherit; color: #c41a16;">"1"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"8"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"24"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"12"</span><span style="box-sizing: inherit;">]</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"p"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">122.1</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"s"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #c41a16;">"TSLA"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"t"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1672348887198</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"v"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">79</span><span style="box-sizing: inherit;">}</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit;">{</span><span style="box-sizing: inherit; color: #836c28;">"c"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit;">[</span><span style="box-sizing: inherit; color: #c41a16;">"1"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"24"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"12"</span><span style="box-sizing: inherit;">]</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"p"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">129.58</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"s"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #c41a16;">"AAPL"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"t"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1672348887666</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"v"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1</span><span style="box-sizing: inherit;">}</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit;">{</span><span style="box-sizing: inherit; color: #836c28;">"c"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit;">[</span><span style="box-sizing: inherit; color: #c41a16;">"1"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"24"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #c41a16;">"12"</span><span style="box-sizing: inherit;">]</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"p"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">129.575</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"s"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #c41a16;">"AAPL"</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"t"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1672348887785</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"v"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #1c00cf;">1</span><span style="box-sizing: inherit;">}</span><span style="box-sizing: inherit;">]</span><span style="box-sizing: inherit;">,</span><span style="box-sizing: inherit; color: #836c28;">"type"</span><span style="box-sizing: inherit;">:</span><span style="box-sizing: inherit; color: #c41a16;">"trade"</span><span style="box-sizing: inherit;">}</span></span></pre>
<pre style='background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; color: #292929; font-family: source-code-pro, Menlo, Monaco, "Courier New", Courier, monospace; margin-bottom: 0px; margin-top: 16px; overflow-x: auto; padding: 20px;'><span data-selectable-paragraph="" id="3ec7" style="box-sizing: inherit; display: block; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content; white-space: pre-wrap;">{"c":["1","8","24","12"],"p":122.1,"s":"TSLA","t":1672348887195,"v":1}</span></pre>
<h1 data-selectable-paragraph="" id="d91e" style='box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;'>Data Description</h1>
<pre style='background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; color: #292929; font-family: source-code-pro, Menlo, Monaco, "Courier New", Courier, monospace; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;'><span data-selectable-paragraph="" id="1be6" style="box-sizing: inherit; display: block; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content; white-space: pre-wrap;">data<br style="box-sizing: inherit;">List of trades or price updates.</span><span data-selectable-paragraph="" id="1825" style="box-sizing: inherit; display: block; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 0.91em; min-width: fit-content; white-space: pre-wrap;">s<br style="box-sizing: inherit;">Symbol.</span><span data-selectable-paragraph="" id="ac6b" style="box-sizing: inherit; display: block; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 0.91em; min-width: fit-content; white-space: pre-wrap;">p<br style="box-sizing: inherit;">Last price.</span><span data-selectable-paragraph="" id="d02a" style="box-sizing: inherit; display: block; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 0.91em; min-width: fit-content; white-space: pre-wrap;">t<br style="box-sizing: inherit;">UNIX milliseconds timestamp.</span><span data-selectable-paragraph="" id="ec22" style="box-sizing: inherit; display: block; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 0.91em; min-width: fit-content; white-space: pre-wrap;">v<br style="box-sizing: inherit;">Volume.</span><span data-selectable-paragraph="" id="64a6" style="box-sizing: inherit; display: block; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 0.91em; min-width: fit-content; white-space: pre-wrap;">c<br style="box-sizing: inherit;">List of trade conditions. A comprehensive list of trade conditions code can be found here</span></pre>
<p data-selectable-paragraph="" id="f26b" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'>Let’s Build a Schema for our JSON data. Once we have a class definied for it in Python, we can send that to an Apache Pulsar cluster and it will generate the first version of our schema for us. When we have a schema it lets us treat that data as a table in Trino, Spark SQL and Flink SQL. So this is awesome.</p>
<p data-selectable-paragraph="" id="bf93" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'>By defining our data and making it fully structured with a schema even though it is still semi-structured JSON, it makes it very easy to work with. We know what we are getting. This will make it easier to stream into Apache Pinot, Apache Iceberg, Delta Lake or another analytics system.</p>
<blockquote style="box-shadow: rgb(41, 41, 41) 3px 0px 0px 0px inset; box-sizing: inherit; margin: 0px 0px 0px -20px; padding-left: 23px;"><p data-selectable-paragraph="" id="0ecc" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; font-style: italic; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'>class Stock (Record):<br style="box-sizing: inherit;">symbol = String()<br style="box-sizing: inherit;">ts = Float()<br style="box-sizing: inherit;">currentts = Float()<br style="box-sizing: inherit;">volume = Float()<br style="box-sizing: inherit;">price = Float()<br style="box-sizing: inherit;">tradeconditions = String()<br style="box-sizing: inherit;">uuid = String()</p></blockquote>
<p data-selectable-paragraph="" id="88fd" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'>We then connect to our Pulsar cluster, very easy in Python.</p>
<blockquote style="box-shadow: rgb(41, 41, 41) 3px 0px 0px 0px inset; box-sizing: inherit; margin: 0px 0px 0px -20px; padding-left: 23px;"><p data-selectable-paragraph="" id="9cfe" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; font-style: italic; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'>client = pulsar.Client(‘pulsar://<span style="box-sizing: inherit; font-weight: 700;">localhost</span>:6650’)<br style="box-sizing: inherit;">producer = client.create_producer(topic=’persistent://public/default/<span style="box-sizing: inherit; font-weight: 700;">stocks</span>’ ,schema=JsonSchema(Stock),properties={“producer-name”: “py-stocks”,”producer-id”: “pystocks1” })</p></blockquote>
<p data-selectable-paragraph="" id="549a" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'>If we have never used this topic before, Pulsar will create it for you. For best practices, build your tenant, namespace and topic before your application while you are defining schemas and data contracts.</p>
<p data-selectable-paragraph="" id="63aa" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'>For more information on the Python interface for Pulsar, check out this <a href="https://streamnative.io/pulsar-python/" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">link</a>.</p>
<p data-selectable-paragraph="" id="3947" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'><span style="box-sizing: inherit; font-weight: 700;">NEWBIE HINT:</span></p>
<blockquote style="box-shadow: rgb(41, 41, 41) 3px 0px 0px 0px inset; box-sizing: inherit; margin: 0px 0px 0px -20px; padding-left: 23px;"><p data-selectable-paragraph="" id="50dd" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; font-style: italic; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'>For a free cluster and training, check out this training <a href="https://www.academy.streamnative.io/" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">academy</a>.</p></blockquote>
<p data-selectable-paragraph="" id="1c24" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'><span style="box-sizing: inherit; font-weight: 700;">Example Python Projects</span></p>
<div style="box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; margin-top: 32px;"><a href="https://github.com/tspannhw/FLiP-Py-Pi-EnviroPlus" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit; text-decoration-line: none;" target="_blank"><div style="box-sizing: inherit; display: flex; flex: 0 0 auto; padding: 0px;">
<div style="box-sizing: inherit; display: flex; flex-direction: column; flex: 1 1 auto; justify-content: center; padding: 16px 20px;">
<h2 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #292929; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>GitHub - tspannhw/FLiP-Py-Pi-EnviroPlus: FLiP-Py-Pi-EnviroPlus. Apache Flink, Apache Pulsar, Apache…</h2>
<div style="box-sizing: inherit; margin-top: 8px;"><h3 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>FLiP-Py-Pi-EnviroPlus. Apache Flink, Apache Pulsar, Apache Spark, Python, Raspberry Pi, Enviro+ sensors. Tim…</h3></div>
<div style="box-sizing: inherit; margin-top: 12px;"><p style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>github.com</p></div>
</div>
<div style="box-sizing: inherit; width: 160px;"><div style='background-image: url("https://miro.medium.com/max/320/0*GL900U-Q_9xL1C-9"); background-origin: border-box; background-position: 50% 50%; background-size: cover; box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; height: 167px; max-width: 100%; width: 160px;'></div></div>
</div></a></div>
<div style="box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; margin-top: 32px;"><a href="https://github.com/streamnative/streamnative-academy/tree/master/iot-examples/python3" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit; text-decoration-line: none;" target="_blank"><div style="box-sizing: inherit; display: flex; flex: 0 0 auto; padding: 0px;">
<div style="box-sizing: inherit; display: flex; flex-direction: column; flex: 1 1 auto; justify-content: center; padding: 16px 20px;">
<h2 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #292929; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>streamnative-academy/iot-examples/python3 at master · streamnative/streamnative-academy</h2>
<div style="box-sizing: inherit; margin-top: 8px;"><h3 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…</h3></div>
<div style="box-sizing: inherit; margin-top: 12px;"><p style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>github.com</p></div>
</div>
<div style="box-sizing: inherit; width: 160px;"><div style='background-image: url("https://miro.medium.com/max/320/0*_8h_AWNqElgekH5B"); background-origin: border-box; background-position: 50% 50%; background-size: cover; box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; height: 167px; max-width: 100%; width: 160px;'></div></div>
</div></a></div>
<div style="box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; margin-top: 32px;"><a href="https://github.com/tspannhw/FLiP-Py-Jetson-Sensors" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit; text-decoration-line: none;" target="_blank"><div style="box-sizing: inherit; display: flex; flex: 0 0 auto; padding: 0px;">
<div style="box-sizing: inherit; display: flex; flex-direction: column; flex: 1 1 auto; justify-content: center; padding: 16px 20px;">
<h2 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #292929; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>GitHub - tspannhw/FLiP-Py-Jetson-Sensors: Waveshare Environmental Sensor Board on Jetson Nano 2GB …</h2>
<div style="box-sizing: inherit; margin-top: 8px;"><h3 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>Waveshare Environmental Sensor Board on Jetson Nano 2GB - Apache Pulsar - Python 3.10 - Ubuntu 18.04 - GitHub …</h3></div>
<div style="box-sizing: inherit; margin-top: 12px;"><p style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>github.com</p></div>
</div>
<div style="box-sizing: inherit; width: 160px;"><div style='background-image: url("https://miro.medium.com/max/320/0*bfNf1Y0_hyLKJSHt"); background-origin: border-box; background-position: 50% 50%; background-size: cover; box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; height: 167px; max-width: 100%; width: 160px;'></div></div>
</div></a></div>
<div style="box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; margin-top: 32px;"><a href="https://github.com/tspannhw/FLiP-Py-Pi-Nano1" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit; text-decoration-line: none;" target="_blank"><div style="box-sizing: inherit; display: flex; flex: 0 0 auto; padding: 0px;">
<div style="box-sizing: inherit; display: flex; flex-direction: column; flex: 1 1 auto; justify-content: center; padding: 16px 20px;">
<h2 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #292929; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>GitHub - tspannhw/FLiP-Py-Pi-Nano1: FLiP-Py-Pi-Nano2: Apache Pulsar, Python 3.9, Raspberry Pi 4 …</h2>
<div style="box-sizing: inherit; margin-top: 8px;"><h3 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>FLiP-Py-Pi-Nano2: Apache Pulsar, Python 3.9, Raspberry Pi 4 - 2GB, Nano1 - BME688, MICS6814, SGP30, Breakout Garden …</h3></div>
<div style="box-sizing: inherit; margin-top: 12px;"><p style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>github.com</p></div>
</div>
<div style="box-sizing: inherit; width: 160px;"><div style='background-image: url("https://miro.medium.com/max/320/0*o6Qw5CIpIuIaL3O4"); background-origin: border-box; background-position: 50% 50%; background-size: cover; box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; height: 167px; max-width: 100%; width: 160px;'></div></div>
</div></a></div>
<div style="box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; margin-top: 32px;"><a href="https://github.com/tspannhw/FLiP-Py-BreakoutGarden" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit; text-decoration-line: none;" target="_blank"><div style="box-sizing: inherit; display: flex; flex: 0 0 auto; padding: 0px;">
<div style="box-sizing: inherit; display: flex; flex-direction: column; flex: 1 1 auto; justify-content: center; padding: 16px 20px;">
<h2 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #292929; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>GitHub - tspannhw/FLiP-Py-BreakoutGarden: Pimoroni Breakout Garden with Raspberry Pi 4 - 2GB RAM …</h2>
<div style="box-sizing: inherit; margin-top: 8px;"><h3 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>Pimoroni Breakout Garden with Raspberry Pi 4 - 2GB RAM - Apache Pulsar - Python 3.10 - GitHub …</h3></div>
<div style="box-sizing: inherit; margin-top: 12px;"><p style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>github.com</p></div>
</div>
<div style="box-sizing: inherit; width: 160px;"><div style='background-image: url("https://miro.medium.com/max/320/0*wXuU2Vsl7sIv0tle"); background-origin: border-box; background-position: 50% 50%; background-size: cover; box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; height: 167px; max-width: 100%; width: 160px;'></div></div>
</div></a></div>
<div style="box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; margin-top: 32px;"><a href="https://github.com/tspannhw/FLiP-PulsarDevPython101" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit; text-decoration-line: none;" target="_blank"><div style="box-sizing: inherit; display: flex; flex: 0 0 auto; padding: 0px;">
<div style="box-sizing: inherit; display: flex; flex-direction: column; flex: 1 1 auto; justify-content: center; padding: 16px 20px;">
<h2 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #292929; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>GitHub - tspannhw/FLiP-PulsarDevPython101: Apache Pulsar Development 101 with Python</h2>
<div style="box-sizing: inherit; margin-top: 8px;"><h3 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>Apache Pulsar Development 101 with Python. Contribute to tspannhw/FLiP-PulsarDevPython101 development by creating an…</h3></div>
<div style="box-sizing: inherit; margin-top: 12px;"><p style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>github.com</p></div>
</div>
<div style="box-sizing: inherit; width: 160px;"><div style='background-image: url("https://miro.medium.com/max/320/0*oHMSrFb8iy2mkzZ5"); background-origin: border-box; background-position: 50% 50%; background-size: cover; box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; height: 167px; max-width: 100%; width: 160px;'></div></div>
</div></a></div>
<div style="box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; margin-top: 32px;"><a href="https://github.com/tspannhw/awesome-apachepulsar-python" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit; text-decoration-line: none;" target="_blank"><div style="box-sizing: inherit; display: flex; flex: 0 0 auto; padding: 0px;">
<div style="box-sizing: inherit; display: flex; flex-direction: column; flex: 1 1 auto; justify-content: center; padding: 16px 20px;">
<h2 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #292929; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>GitHub - tspannhw/awesome-apachepulsar-python: All the resources for using Python with Apache…</h2>
<div style="box-sizing: inherit; margin-top: 8px;"><h3 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>All the resources for using Python with Apache Pulsar Apache Pulsar Development 101 with Python In this session I will…</h3></div>
<div style="box-sizing: inherit; margin-top: 12px;"><p style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>github.com</p></div>
</div>
<div style="box-sizing: inherit; width: 160px;"><div style='background-image: url("https://miro.medium.com/max/320/0*eWCljv5eQMcd3DPo"); background-origin: border-box; background-position: 50% 50%; background-size: cover; box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; height: 167px; max-width: 100%; width: 160px;'></div></div>
</div></a></div>
<p style="box-sizing: inherit; clear: both; margin: 56px 0px 0px;"></p>
<div style="box-sizing: inherit; margin: auto; overflow: hidden; position: relative;"><div style="box-sizing: inherit; height: 0px; padding-bottom: 566.664px;"><iframe allowfullscreen="" frameborder="0" height="500" scrolling="auto" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.slideshare.net%2Fslideshow%2Fembed_code%2Fkey%2FlcGxm9YdrLsoCP&amp;display_name=SlideShare&amp;url=https%3A%2F%2Fwww.slideshare.net%2Fbunkertor%2Fapache-pulsar-development-101-with-python&amp;image=https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fapachepulsardevelopment101withpythonps2022ecosystemv0-220818223937-5eca2ca3-thumbnail.jpg%3Fwidth%3D640%26amp%3Bheight%3D640%26amp%3Bfit%3Dbounds&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=slideshare" style="box-sizing: inherit; height: 566.664px; left: 0px; position: absolute; top: 0px; width: 680px;" title="Apache Pulsar Development 101 with Python" width="600"></iframe></div></div>
<p style="box-sizing: inherit; clear: both; margin: 56px 0px 0px;"></p>
<div style="box-sizing: inherit; margin: auto; overflow: hidden; position: relative;"><div style="box-sizing: inherit; height: 0px; padding-bottom: 382.195px;"><iframe allowfullscreen="" frameborder="0" height="480" scrolling="auto" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FH88re4p-DoU%3Fstart%3D2036%26feature%3Doembed%26start%3D2036&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DH88re4p-DoU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FH88re4p-DoU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" style="box-sizing: inherit; height: 382.195px; left: 0px; position: absolute; top: 0px; width: 680px;" title="Apache Pulsar Development 101 with Python by Timothy Spann" width="854"></iframe></div></div>
<p style="box-sizing: inherit; clear: both; margin: 56px 0px 0px;"></p>
<div style="box-sizing: inherit; margin: auto; overflow: hidden; position: relative;"><div style="box-sizing: inherit; height: 0px; padding-bottom: 382.195px;"><iframe allowfullscreen="" frameborder="0" height="480" scrolling="auto" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FRFdafFaLvBw%3Fstart%3D1306%26feature%3Doembed%26start%3D1306&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DRFdafFaLvBw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FRFdafFaLvBw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" style="box-sizing: inherit; height: 382.195px; left: 0px; position: absolute; top: 0px; width: 680px;" title="Cloud Native Apache Pulsar Development 101 with Python | Tim Spann | Conf42 Cloud Native 2022" width="854"></iframe></div></div>
<p style="box-sizing: inherit; clear: both; margin: 56px 0px 0px;"></p>
<div style="box-sizing: inherit; margin: auto; overflow: hidden; position: relative;"><div style="box-sizing: inherit; height: 0px; padding-bottom: 382.195px;"><iframe allowfullscreen="" frameborder="0" height="480" scrolling="auto" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FvJdbdTemBnQ%3Fstart%3D403%26feature%3Doembed%26start%3D403&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DvJdbdTemBnQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FvJdbdTemBnQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" style="box-sizing: inherit; height: 382.195px; left: 0px; position: absolute; top: 0px; width: 680px;" title="Timothy Spann - Deep Dive Into Building Streaming Applications with Apache Pulsar" width="854"></iframe></div></div>
<p data-selectable-paragraph="" id="bd83" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;'>For all the real newbies, here is the real getting started.</p>
<div style="box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; margin-top: 32px;"><a href="https://github.com/tspannhw/Meetup-YourFirstEventDrivenApp" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit; text-decoration-line: none;" target="_blank"><div style="box-sizing: inherit; display: flex; flex: 0 0 auto; padding: 0px;">
<div style="box-sizing: inherit; display: flex; flex-direction: column; flex: 1 1 auto; justify-content: center; padding: 16px 20px;">
<h2 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #292929; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>GitHub - tspannhw/Meetup-YourFirstEventDrivenApp: NJ Meetup - Build an event-driven architecture…</h2>
<div style="box-sizing: inherit; margin-top: 8px;"><h3 style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>NJ Meetup - Build an event-driven architecture with Apache Pulsar - GitHub - tspannhw/Meetup-YourFirstEventDrivenApp…</h3></div>
<div style="box-sizing: inherit; margin-top: 12px;"><p style='-webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: inherit; color: #757575; display: -webkit-box; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; margin: 0px; max-height: 40px; overflow: hidden; text-overflow: ellipsis;'>github.com</p></div>
</div>
<div style="box-sizing: inherit; width: 160px;"><div style='background-image: url("https://miro.medium.com/max/320/0*DCyO4eE73aYQA88a"); background-origin: border-box; background-position: 50% 50%; background-size: cover; box-shadow: rgb(230, 230, 230) 0px 0px 0px 1px inset; box-sizing: inherit; height: 167px; max-width: 100%; width: 160px;'></div></div>
</div></a></div>
<h1 data-selectable-paragraph="" id="52aa" style='box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;'>Consume Pulsar Data</h1>
<pre style='background: rgb(249, 249, 249); border-radius: 4px; border: 1px solid rgb(107, 107, 107); box-sizing: inherit; color: #292929; font-family: source-code-pro, Menlo, Monaco, "Courier New", Courier, monospace; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 32px;'><span data-selectable-paragraph="" id="44ee" style="box-sizing: inherit; display: block; font-size: 14px; letter-spacing: -0.022em; line-height: 1.4; margin-bottom: -0.2em; margin-top: -0.2em; min-width: fit-content;">bin/pulsar-client consume <span style="box-sizing: inherit; color: #c41a16;">"persistent://public/default/stocks"</span> -s stocks-reader -n 0<br style="box-sizing: inherit;"></span></pre>
<pre style='background: rgb(242, 242, 242); border-radius: 0px; border: none; box-sizing: inherit; color: #292929; font-family: source-code-pro, Menlo, Monaco, "Courier New", Courier, monospace; margin-bottom: 0px; margin-top: 16px; overflow-x: auto; padding: 20px;'><span data-selectable-paragraph="" id="a9e8" style="box-sizing: inherit; display: block; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; min-width: fit-content; white-space: pre-wrap;">----- got message -----<br style="box-sizing: inherit;">key:[20221230191756_42a4752d-5f66-4245-8153-a5ec8478f738], properties:[], content:{<br style="box-sizing: inherit;"> "symbol": "AAPL",<br style="box-sizing: inherit;"> "ts": 1672427874976.0,<br style="box-sizing: inherit;"> "currentts": 20221230191756.0,<br style="box-sizing: inherit;"> "volume": 10.0,<br style="box-sizing: inherit;"> "price": 128.055,<br style="box-sizing: inherit;"> "tradeconditions": "1 12",<br style="box-sizing: inherit;"> "uuid": "20221230191756_42a4752d-5f66-4245-8153-a5ec8478f738"<br style="box-sizing: inherit;">}<br style="box-sizing: inherit;">----- got message -----<br style="box-sizing: inherit;">key:[20221230191756_a560a594-7c12-42e7-a76d-6650a48533e0], properties:[], content:{<br style="box-sizing: inherit;"> "symbol": "TSLA",<br style="box-sizing: inherit;"> "ts": 1672427874974.0,<br style="box-sizing: inherit;"> "currentts": 20221230191756.0,<br style="box-sizing: inherit;"> "volume": 100.0,<br style="box-sizing: inherit;"> "price": 120.94,<br style="box-sizing: inherit;"> "tradeconditions": "",<br style="box-sizing: inherit;"> "uuid": "20221230191756_a560a594-7c12-42e7-a76d-6650a48533e0"<br style="box-sizing: inherit;">}</span></pre>
<h1 data-selectable-paragraph="" id="b152" style='box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;'>References</h1>
<ul style="box-sizing: inherit; list-style: none none; margin: 0px; padding: 0px;">
<li data-selectable-paragraph="" id="d997" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: disc; margin-bottom: -0.46em; margin-left: 30px; margin-top: 0.94em; padding-left: 0px;'><a href="https://finnhub.io/docs/api/authentication" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">https://finnhub.io/docs/api/authentication</a></li>
<li data-selectable-paragraph="" id="ec37" style='box-sizing: inherit; color: #292929; font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: disc; margin-bottom: -0.46em; margin-left: 30px; margin-top: 1.14em; padding-left: 0px;'><a href="https://finnhub.io/docs/api/websocket-trades" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">https://finnhub.io/docs/api/websocket-trades</a></li>
</ul>
</div></div></section>

[
Apache Pulsar
](https://medium.com/tag/apache-pulsar?source=post_page-----1b7963008e19---------------apache_pulsar-----------------)

[
Python
](https://medium.com/tag/python?source=post_page-----1b7963008e19---------------python-----------------)

[
Python Programming
](https://medium.com/tag/python-programming?source=post_page-----1b7963008e19---------------python_programming-----------------)