Skip to content

Commit

Permalink
external storage docs: python (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbugli authored Apr 15, 2024
2 parents 96b47f9 + 8a1fa80 commit 6fe383c
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions docusaurus/video/docusaurus/docs/api/recording/storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,25 @@ await call.startRecording({
<TabItem value="py" label="Python">

```py
// TODO: code example for Python
# 1. create a new storage with all the required parameters
aws_s3_config = S3Request(
s3_region='us-east-1',
s3_api_key='my-access-key',
s3_secret='my-secret',
)

response = client.video.create_external_storage(
name='my-s3',
storage_type='s3',
bucket='my-bucket',
path='directory_name/',
aws_s3=aws_s3_config
)
# 2. update the call type to use the new storage
client.video.update_call_type(name='allhands', external_storage= "my-s3")

# 3. alternative, specify the storage when starting call recording
call.start_recording(recording_external_storage= "my-s3")
```

</TabItem>
Expand Down Expand Up @@ -130,7 +148,11 @@ await call.startRecording({
<TabItem value="py" label="Python">

```py
# TODO: code example for Python
# 1. update the call type to use Stream S3 storage
client.video.update_call_type('my-call-type', external_storage="stream-s3")

# 2. specify Stream S3 storage when starting call recording
call.start_recording(recording_external_storage="my-storage")
```

</TabItem>
Expand Down Expand Up @@ -230,13 +252,21 @@ await serverSideClient.createExternalStorage({
```

</TabItem>

<TabItem value="py" label="Python">

```py
# TODO: code example for Python
response = client.video.create_external_storage(
name='my-gcs',
storage_type='gcs',
bucket='my-bucket',
path='directory_name/',
gcs_credentials="content of the service account file"
)
```

</TabItem>

<TabItem value="curl" label="cURL">

```bash
Expand Down

0 comments on commit 6fe383c

Please sign in to comment.