Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9a1d62f

Browse files
feat(api): manual updates
1 parent df3edd8 commit 9a1d62f

File tree

33 files changed

+336
-361
lines changed
  • .stats.yml
  • README.md
  • api.md
  • src/chunkify
    • resources
      • files.py
    • types
      • __init__.py
      • file.py
      • file_retrieve_response.py
      • job_create_params.py
      • job_create_response.py
      • job_get_files_response.py
      • job_get_logs_response.py
      • job_get_transcoders_response.py
      • job_retrieve_response.py
      • mp4_h264_param.py
      • notification_create_response.py
      • notification_retrieve_response.py
      • project_create_response.py
      • project_list_response.py
      • project_retrieve_response.py
      • response_ok.py
      • source_create_response.py
      • source_retrieve_response.py
      • storage_create_response.py
      • storage_list_response.py
      • storage_retrieve_response.py
      • token_create_response.py
      • token_list_response.py
      • upload_create_response.py
      • upload_retrieve_response.py
      • webhook_create_response.py
      • webhook_list_response.py
      • webhook_retrieve_response.py
  • tests/api_resources
    • test_files.py

33 files changed

+336
-361
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 40
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/chunkify%2Fchunkify-46e3d9e17ead34ca5e12820fc5b50b9d865ef4ef697fab704e5820ebda2dbeec.yml
33
openapi_spec_hash: 33bbbf1b4c96ef060aaef7857c9ca70f
4-
config_hash: adb9fa87e175e10555229a2e4b286931
4+
config_hash: 81a390e03fe78dfb1ee41e6f9afe862f

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ job = client.jobs.create(
4949
"type": "8vCPU",
5050
},
5151
)
52+
print(job.data)
5253
```
5354

5455
While you can provide a `project_access_token` keyword argument,
@@ -85,6 +86,7 @@ async def main() -> None:
8586
"type": "8vCPU",
8687
},
8788
)
89+
print(job.data)
8890

8991

9092
asyncio.run(main())
@@ -130,6 +132,7 @@ async def main() -> None:
130132
"type": "8vCPU",
131133
},
132134
)
135+
print(job.data)
133136

134137

135138
asyncio.run(main())

api.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
Types:
44

55
```python
6-
from chunkify.types import APIFile, ResponseOk, FileRetrieveResponse
6+
from chunkify.types import File, FileRetrieveResponse
77
```
88

99
Methods:
1010

1111
- <code title="get /api/files/{fileId}">client.files.<a href="./src/chunkify/resources/files.py">retrievea>(file_id) -> <a href="./src/chunkify/types/file_retrieve_response.py">FileRetrieveResponsea>code>
12-
- <code title="get /api/files">client.files.<a href="./src/chunkify/resources/files.py">lista>(\*\*<a href="src/chunkify/types/file_list_params.py">paramsa>) -> <a href="./src/chunkify/types/api_file.py">SyncPaginatedResults[APIFile]a>code>
12+
- <code title="get /api/files">client.files.<a href="./src/chunkify/resources/files.py">lista>(\*\*<a href="src/chunkify/types/file_list_params.py">paramsa>) -> <a href="./src/chunkify/types/file.py">SyncPaginatedResults[File]a>code>
1313
- <code title="delete /api/files/{fileId}">client.files.<a href="./src/chunkify/resources/files.py">deletea>(file_id) -> Nonecode>
1414

1515
# Jobs
@@ -19,6 +19,7 @@ Types:
1919
```python
2020
from chunkify.types import (
2121
Job,
22+
MP4H264,
2223
JobCreateResponse,
2324
JobRetrieveResponse,
2425
JobGetFilesResponse,

src/chunkify/resources/files.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
async_to_streamed_response_wrapper,
1717
)
1818
from ..pagination import SyncPaginatedResults, AsyncPaginatedResults
19+
from ..types.file import File
1920
from .._base_client import AsyncPaginator, make_request_options
20-
from ..types.api_file import APIFile
2121
from ..types.file_retrieve_response import FileRetrieveResponse
2222

2323
__all__ = ["FilesResource", "AsyncFilesResource"]
@@ -100,7 +100,7 @@ def list(
100100
extra_query: Query | None = None,
101101
extra_body: Body | None = None,
102102
timeout: float | httpx.Timeout | None | NotGiven = not_given,
103-
) -> SyncPaginatedResults[APIFile]:
103+
) -> SyncPaginatedResults[File]:
104104
"""
105105
Retrieve a list of files with optional filtering and pagination
106106
@@ -131,7 +131,7 @@ def list(
131131
"""
132132
return self._get_api_list(
133133
"/api/files",
134-
page=SyncPaginatedResults[APIFile],
134+
page=SyncPaginatedResults[File],
135135
options=make_request_options(
136136
extra_headers=extra_headers,
137137
extra_query=extra_query,
@@ -157,7 +157,7 @@ def list(
157157
file_list_params.FileListParams,
158158
),
159159
),
160-
model=APIFile,
160+
model=File,
161161
)
162162

163163
def delete(
@@ -273,7 +273,7 @@ def list(
273273
extra_query: Query | None = None,
274274
extra_body: Body | None = None,
275275
timeout: float | httpx.Timeout | None | NotGiven = not_given,
276-
) -> AsyncPaginator[APIFile, AsyncPaginatedResults[APIFile]]:
276+
) -> AsyncPaginator[File, AsyncPaginatedResults[File]]:
277277
"""
278278
Retrieve a list of files with optional filtering and pagination
279279
@@ -304,7 +304,7 @@ def list(
304304
"""
305305
return self._get_api_list(
306306
"/api/files",
307-
page=AsyncPaginatedResults[APIFile],
307+
page=AsyncPaginatedResults[File],
308308
options=make_request_options(
309309
extra_headers=extra_headers,
310310
extra_query=extra_query,
@@ -330,7 +330,7 @@ def list(
330330
file_list_params.FileListParams,
331331
),
332332
),
333-
model=APIFile,
333+
model=File,
334334
)
335335

336336
async def delete(

src/chunkify/types/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
from __future__ import annotations
44

55
from .job import Job as Job
6+
from .file import File as File
67
from .token import Token as Token
78
from .source import Source as Source
89
from .upload import Upload as Upload
910
from .project import Project as Project
1011
from .storage import Storage as Storage
1112
from .webhook import Webhook as Webhook
12-
from .api_file import APIFile as APIFile
13-
from .response_ok import ResponseOk as ResponseOk
1413
from .notification import Notification as Notification
14+
from .mp4_h264_param import MP4H264Param as MP4H264Param
1515
from .job_list_params import JobListParams as JobListParams
1616
from .file_list_params import FileListParams as FileListParams
1717
from .job_create_params import JobCreateParams as JobCreateParams

src/chunkify/types/api_file.py renamed to src/chunkify/types/file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
from .._models import BaseModel
66

7-
__all__ = ["APIFile"]
7+
__all__ = ["File"]
88

99

10-
class APIFile(BaseModel):
10+
class File(BaseModel):
1111
id: Optional[str] = None
1212
"""Unique identifier of the file"""
1313

src/chunkify/types/file_retrieve_response.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
from typing import Optional
44

5-
from .api_file import APIFile
6-
from .response_ok import ResponseOk
5+
from .file import File
6+
from .._models import BaseModel
77

88
__all__ = ["FileRetrieveResponse"]
99

1010

11-
class FileRetrieveResponse(ResponseOk):
12-
data: Optional[APIFile] = None # type: ignore
11+
class FileRetrieveResponse(BaseModel):
12+
data: Optional[File] = None
13+
14+
status: Optional[str] = None
15+
"""Status indicates the response status "success" """

src/chunkify/types/job_create_params.py

Lines changed: 4 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from typing import Dict
66
from typing_extensions import Literal, Required, TypedDict
77

8+
from .mp4_h264_param import MP4H264Param
9+
810
__all__ = [
911
"JobCreateParams",
1012
"Format",
@@ -13,7 +15,6 @@
1315
"FormatHlsH265",
1416
"FormatJpg",
1517
"FormatMP4Av1",
16-
"FormatMP4H264",
1718
"FormatMP4H265",
1819
"FormatWebmVp9",
1920
"Storage",
@@ -785,161 +786,6 @@ class FormatMP4Av1(TypedDict, total=False):
785786
"""
786787

787788

788-
class FormatMP4H264(TypedDict, total=False):
789-
audio_bitrate: int
790-
"""
791-
AudioBitrate specifies the audio bitrate in bits per second. Must be between
792-
32Kbps and 512Kbps.
793-
"""
794-
795-
bufsize: int
796-
"""
797-
Bufsize specifies the video buffer size in bits. Must be between 100Kbps and
798-
50Mbps.
799-
"""
800-
801-
channels: Literal[1, 2, 5, 7]
802-
"""
803-
Channels specifies the number of audio channels. Valid values: 1 (mono), 2
804-
(stereo), 5 (5.1), 7 (7.1)
805-
"""
806-
807-
crf: int
808-
"""
809-
Crf (Constant Rate Factor) controls the quality of the output video. Lower
810-
values mean better quality but larger file size. Range: 16 to 35. Recommended
811-
values: 18-28 for high quality, 23-28 for good quality, 28-35 for acceptable
812-
quality.
813-
"""
814-
815-
disable_audio: bool
816-
"""DisableAudio indicates whether to disable audio processing."""
817-
818-
disable_video: bool
819-
"""DisableVideo indicates whether to disable video processing."""
820-
821-
duration: int
822-
"""
823-
Duration specifies the duration to process in seconds. Must be a positive value.
824-
"""
825-
826-
framerate: float
827-
"""
828-
Framerate specifies the output video frame rate. Must be between 15 and 120 fps.
829-
"""
830-
831-
gop: int
832-
"""Gop specifies the Group of Pictures (GOP) size. Must be between 1 and 300."""
833-
834-
height: int
835-
"""Height specifies the output video height in pixels. Must be between -2 and 7680.
836-
837-
Use -2 for automatic calculation while maintaining aspect ratio.
838-
"""
839-
840-
level: Literal[10, 11, 12, 13, 20, 21, 22, 30, 31, 32, 40, 41, 42, 50, 51]
841-
"""Level specifies the H.264 profile level.
842-
843-
Valid values: 10-13 (baseline), 20-22 (main), 30-32 (high), 40-42 (high), 50-51
844-
(high). Higher levels support higher resolutions and bitrates but require more
845-
processing power.
846-
"""
847-
848-
maxrate: int
849-
"""
850-
Maxrate specifies the maximum video bitrate in bits per second. Must be between
851-
100Kbps and 50Mbps.
852-
"""
853-
854-
minrate: int
855-
"""
856-
Minrate specifies the minimum video bitrate in bits per second. Must be between
857-
100Kbps and 50Mbps.
858-
"""
859-
860-
movflags: str
861-
862-
pixfmt: Literal[
863-
"yuv410p",
864-
"yuv411p",
865-
"yuv420p",
866-
"yuv422p",
867-
"yuv440p",
868-
"yuv444p",
869-
"yuvJ411p",
870-
"yuvJ420p",
871-
"yuvJ422p",
872-
"yuvJ440p",
873-
"yuvJ444p",
874-
"yuv420p10le",
875-
"yuv422p10le",
876-
"yuv440p10le",
877-
"yuv444p10le",
878-
"yuv420p12le",
879-
"yuv422p12le",
880-
"yuv440p12le",
881-
"yuv444p12le",
882-
"yuv420p10be",
883-
"yuv422p10be",
884-
"yuv440p10be",
885-
"yuv444p10be",
886-
"yuv420p12be",
887-
"yuv422p12be",
888-
"yuv440p12be",
889-
"yuv444p12be",
890-
]
891-
"""PixFmt specifies the pixel format. Valid value: yuv420p"""
892-
893-
preset: Literal["ultrafast", "superfast", "veryfast", "faster", "fast", "medium"]
894-
"""Preset specifies the encoding speed preset.
895-
896-
Valid values (from fastest to slowest):
897-
898-
- ultrafast: Fastest encoding, lowest quality
899-
- superfast: Very fast encoding, lower quality
900-
- veryfast: Fast encoding, moderate quality
901-
- faster: Faster encoding, good quality
902-
- fast: Fast encoding, better quality
903-
- medium: Balanced preset, best quality
904-
"""
905-
906-
profilev: Literal["baseline", "main", "high", "high10", "high422", "high444"]
907-
"""Profilev specifies the H.264 profile. Valid values:
908-
909-
- baseline: Basic profile, good for mobile devices
910-
- main: Main profile, good for most applications
911-
- high: High profile, best quality but requires more processing
912-
- high10: High 10-bit profile, supports 10-bit color
913-
- high422: High 4:2:2 profile, supports 4:2:2 color sampling
914-
- high444: High 4:4:4 profile, supports 4:4:4 color sampling
915-
"""
916-
917-
seek: int
918-
"""
919-
Seek specifies the timestamp to start processing from (in seconds). Must be a
920-
positive value.
921-
"""
922-
923-
video_bitrate: int
924-
"""
925-
VideoBitrate specifies the video bitrate in bits per second. Must be between
926-
100Kbps and 50Mbps.
927-
"""
928-
929-
width: int
930-
"""Width specifies the output video width in pixels. Must be between -2 and 7680.
931-
932-
Use -2 for automatic calculation while maintaining aspect ratio.
933-
"""
934-
935-
x264_keyint: int
936-
"""
937-
X264KeyInt specifies the maximum number of frames between keyframes for H.264
938-
encoding. Range: 1 to 300. Higher values can improve compression but may affect
939-
seeking.
940-
"""
941-
942-
943789
class FormatMP4H265(TypedDict, total=False):
944790
audio_bitrate: int
945791
"""
@@ -1237,8 +1083,8 @@ class Format(TypedDict, total=False):
12371083
mp4_av1: FormatMP4Av1
12381084
"""AV1 configuration"""
12391085

1240-
mp4_h264: FormatMP4H264
1241-
"""H264 configuration"""
1086+
mp4_h264: MP4H264Param
1087+
"""FFmpeg encoding parameters specific to MP4 with H.264 encoding."""
12421088

12431089
mp4_h265: FormatMP4H265
12441090
"""H265 configuration"""

src/chunkify/types/job_create_response.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
from typing import Optional
44

55
from .job import Job
6-
from .response_ok import ResponseOk
6+
from .._models import BaseModel
77

88
__all__ = ["JobCreateResponse"]
99

1010

11-
class JobCreateResponse(ResponseOk):
12-
data: Optional[Job] = None # type: ignore
11+
class JobCreateResponse(BaseModel):
12+
data: Optional[Job] = None
13+
14+
status: Optional[str] = None
15+
"""Status indicates the response status "success" """

src/chunkify/types/job_get_files_response.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Optional
3+
from typing import Optional
44

5-
from .api_file import APIFile
6-
from .response_ok import ResponseOk