Skip to content

Commit 126319a

Browse files
authored
update docs to include a local pattern, adjust SDK token language (#369)
* update docs to include a local pattern, adjust SDK token language
1 parent a26f7eb commit 126319a

File tree

1 file changed

+40
-7
lines changed

1 file changed

+40
-7
lines changed

docs/quix-platform.md

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,32 @@ Here is how to connect to the Quix Cloud Kafka brokers using Quix Streams:
2626

2727
If you are running your Quix Streams `Application` directly within Quix Cloud, it's configured automatically.
2828

29+
Just make sure `broker_address` is NOT set:
30+
31+
```python
32+
from quixstreams import Application
33+
34+
app = Application()
35+
```
36+
OR
37+
```python
38+
from quixstreams import Application
39+
40+
app = Application(broker_address=None)
41+
```
42+
2943
### Outside of Quix Cloud
3044

3145

32-
#### 1. Obtain Streaming Token
33-
First, [get your Streaming
34-
Token](https://quix.io/docs/develop/authentication/streaming-token.html#how-to-find) (also
35-
called `SDK Token`).
46+
#### 1. Obtain SDK Token
47+
First, [get your SDK Token](https://quix.io/docs/develop/authentication/streaming-token.html#how-to-find).
3648

3749
> NOTE: A `Personal Access Token` (PAT) is also accepted, but often requires more configuration
3850
> due to raised privileges. We recommend using the `SDK Token`.
3951
4052
<br>
4153

42-
#### 2. Pass Streaming Token to Application
54+
#### 2. Pass SDK Token to Application
4355
With your `SDK Token` and a Quix Streams `Application`, you can pass it using one of
4456
these approaches:
4557

@@ -50,7 +62,12 @@ these approaches:
5062
OR <br>
5163

5264
- **Application argument**
53-
- Just do `Application(quix_sdk_token="MY_TOKEN")`
65+
- Just do:
66+
```python
67+
from quixstreams import Application
68+
69+
app = Application(quix_sdk_token="MY_TOKEN")
70+
```
5471
> WARNING: This value is prioritized over `Quix__Sdk__Token`, which may cause ambiguity if both are set.
5572

5673
<br>
@@ -59,4 +76,20 @@ OR <br>
5976
When you initialize your `Application()`, a message should be logged letting
6077
you know it will connect to Quix Cloud when `Application.run()` is called.
6178

62-
If not, you'll need to double check your settings and try again!
79+
If not, you'll need to double check your settings and try again!
80+
81+
## Local Development to Quix Cloud
82+
83+
For those wanting to [develop with a local broker](tutorials/README.md#running-kafka-locally)
84+
and then migrate to Quix Cloud, here is a recommended example pattern that avoids code changes:
85+
86+
```python
87+
from quixstreams import Application
88+
import os
89+
90+
app = Application(broker_address=os.getenv("YOUR_ENV_VAR", None))
91+
```
92+
93+
Just pick an environment variable and set it to your local broker address!
94+
95+
In Quix Cloud it will default to `None` as desired and use the Quix Cloud environment.

0 commit comments

Comments
 (0)