Skip to content

Commit 3fc9286

Browse files
authored
docs: update python sdk guide (#560)
1 parent 2cb963c commit 3fc9286

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

sdks/python.mdx

+17-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ icon: python
1818
Get the Livepeer Python SDK.
1919

2020
```bash
21-
pip install livepeer
21+
pip install git+https://github.com/livepeer/livepeer-python.git
2222
```
2323

2424
</Step>
@@ -28,10 +28,10 @@ The first step is to initialize the SDK with your Livepeer Studio API key.
2828

2929
```python
3030
import livepeer
31-
from livepeer.models import operations
31+
from livepeer.models import components
3232

33-
lpClient = livepeer.SDK(
34-
api_key="", # Your API key
33+
lpClient = livepeer.Livepeer(
34+
api_key="<YOUR_BEARER_TOKEN_HERE>",
3535
)
3636
```
3737

@@ -44,23 +44,31 @@ Let's create a stream.
4444
import livepeer
4545
from livepeer.models import components
4646

47-
lpClient = livepeer.SDK(
48-
api_key="",
47+
lpClient = livepeer.Livepeer(
48+
api_key="<YOUR_BEARER_TOKEN_HERE>",
4949
)
5050

5151
req = components.NewStreamPayload(
52-
name='test_stream'
52+
name='test_stream',
5353
)
5454

5555
res = lpClient.stream.create(req)
5656

57-
if res.data is not None:
57+
if res.stream is not None:
5858
# handle response
5959
pass
6060
```
6161

6262
</Step>
63-
63+
<Step title="Try it yourself">
64+
<Card
65+
title="Python Example"
66+
href="https://github.com/livepeer/livepeer-python/tree/main/example"
67+
icon="arrow-up-right-from-square"
68+
>
69+
See an example on GitHub.
70+
</Card>
71+
</Step>
6472
</Steps>
6573

6674
## Next steps

0 commit comments

Comments
 (0)