@@ -18,7 +18,7 @@ icon: python
18
18
Get the Livepeer Python SDK.
19
19
20
20
``` bash
21
- pip install livepeer
21
+ pip install git+https://github.com/ livepeer/livepeer-python.git
22
22
```
23
23
24
24
</Step >
@@ -28,10 +28,10 @@ The first step is to initialize the SDK with your Livepeer Studio API key.
28
28
29
29
``` python
30
30
import livepeer
31
- from livepeer.models import operations
31
+ from livepeer.models import components
32
32
33
- lpClient = livepeer.SDK (
34
- api_key = " " , # Your API key
33
+ lpClient = livepeer.Livepeer (
34
+ api_key = " <YOUR_BEARER_TOKEN_HERE> " ,
35
35
)
36
36
```
37
37
@@ -44,23 +44,31 @@ Let's create a stream.
44
44
import livepeer
45
45
from livepeer.models import components
46
46
47
- lpClient = livepeer.SDK (
48
- api_key = " " ,
47
+ lpClient = livepeer.Livepeer (
48
+ api_key = " <YOUR_BEARER_TOKEN_HERE> " ,
49
49
)
50
50
51
51
req = components.NewStreamPayload(
52
- name = ' test_stream'
52
+ name = ' test_stream' ,
53
53
)
54
54
55
55
res = lpClient.stream.create(req)
56
56
57
- if res.data is not None :
57
+ if res.stream is not None :
58
58
# handle response
59
59
pass
60
60
```
61
61
62
62
</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 >
64
72
</Steps >
65
73
66
74
## Next steps
0 commit comments