Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.6.0"
".": "1.6.1"
}
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## [1.6.1](https://github.com/gumlet/python-sdk/compare/v1.6.0...v1.6.1) (2026-11-24)


### ⚠ BREAKING CHANGES

* **api:** 3 breaking changes to the SDK surface.
- method-name POST video/assets/upload — method names differ (breaking: renamed; the old spelling no longer resolves)
- path-params POST video/assets/upload — path parameter missing on one side (breaking: changed in a way existing callers can observe)
- request-shape POST video/assets/upload.file — field only in after (breaking: new required request member; existing calls lack it)
* **api:** 3 breaking changes to the SDK surface.
- method-name POST video/assets/{p}/thumbnail — method names differ (breaking: renamed; the old spelling no longer resolves)
- types-files types/video_asset_upload_thumbnail_file_response.py — type file only in before (1 member: 0 matched by name and kind elsewhere in after, 1 not found) (breaking: removed; video_asset_upload_thumbnail_response.py appeared in its place, likely a rename)
- types-classes types/__init__.py:VideoAssetUploadThumbnailFileResponse — reexport only in before (breaking: removed; VideoAssetUploadThumbnailResponse appeared in its place, likely a rename)
* **api:** 5 breaking changes to the SDK surface.
- method-name POST video/assets/{p}/thumbnail — method names differ (breaking: renamed; the old spelling no longer resolves)
- path-params POST video/assets/{p}/thumbnail — path parameter missing on one side (breaking: changed in a way existing callers can observe)
- request-shape POST video/assets/{p}/thumbnail.file — field only in after (breaking: new required request member; existing calls lack it)
- types-files types/video_asset_thumbnail_upload_response.py — type file only in before (1 member: 0 matched by name and kind elsewhere in after, 1 not found) (breaking: removed; video_asset_upload_thumbnail_file_response.py appeared in its place, likely a rename)
- types-classes types/__init__.py:VideoAssetThumbnailUploadResponse — reexport only in before (breaking: removed; VideoAssetUploadThumbnailFileResponse appeared in its place, likely a rename)

### Features

* **api:** update SDK surface (2 changes) ([de6129e](https://github.com/gumlet/python-sdk/commit/de6129ef4f205fffeed9d90f71ff46e06b460331))
* **api:** update SDK surface (5 changes) ([8a894b8](https://github.com/gumlet/python-sdk/commit/8a894b820c9c57d565378060f9c3f9cf2f94aaaf))
* **api:** update SDK surface (7 changes) ([b667221](https://github.com/gumlet/python-sdk/commit/b667221b3a612844112fe3e862e1221b245910d6))
* **api:** update SDK surface (7 changes) ([34b2533](https://github.com/gumlet/python-sdk/commit/34b25338de94f693b44becff3c643689ea230f42))


### Chores

* **api:** update generated SDK content ([b8d812d](https://github.com/gumlet/python-sdk/commit/b8d812d61ddc9adeff26c8718602e0bdca9baf3a))
* release 1.6.1 ([a3ac8bb](https://github.com/gumlet/python-sdk/commit/a3ac8bbb6a8d7efe7e7a210988e48671e22173f9))

## [1.6.0](https://github.com/gumlet/python-sdk/compare/v1.5.2...v1.6.0) (2026-11-23)


Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The REST API documentation can be found on [docs.gumlet.com](https://docs.gumlet
- [Usage](#usage)
- [API Reference](./api.md)
- [Async](#async)
- [File uploads](#file-uploads)
- [Authentication](#authentication)
- [Errors](#errors)
- [Client Options](#client-options)
Expand Down Expand Up @@ -85,6 +86,20 @@ asyncio.run(main())

<br />

## File uploads

Some methods upload a file to a pre-signed URL the API returns, usually on another host, then confirm the upload where the API asks for that. The upload goes out on a short-lived HTTP client of its own, carrying only the file, its content type and the headers the API named for it: none of the client's credentials, default headers, default query or cookies, and none of the `auth`, headers, cookies, params or event hooks of a custom `http_client`. The client's retries and timeout apply. The upload URL must be `https:` (plain `http:` only to this machine), and a redirect from the upload host is refused rather than followed.

Without an `http_client`, the upload goes out on httpx's defaults: it takes its proxy and CA settings from the environment (`HTTPS_PROXY`, `SSL_CERT_FILE` and the like) when it is sent. With one you pass, the upload uses that client's proxy and TLS settings — `proxy=`, `mounts=`, `verify=` (`verify=False` included) and `cert=`, so a corporate proxy or a private CA works for uploads too, and a client certificate is presented to the upload host — when the transport the client would send the upload URL through is httpx's own `httpx.HTTPTransport` (`httpx.AsyncHTTPTransport` on the async client). Any other transport class, such as a subclass of your own or `DefaultAioHttpClient`'s, sends the request itself and could add headers, credentials or cookies, so with one the upload falls back to httpx's defaults as if no `http_client` were passed. So does an httpx transport bound to a Unix socket (`uds=`).

When your proxy or TLS setup lives only in a transport class of your own, opt that transport in by inheriting `SignedUploadTransport` (`from gumlet import SignedUploadTransport`), as in `class CorporateTransport(SignedUploadTransport, httpx.HTTPTransport)`. Inheriting it declares that the transport sends a request as handed over: it adds no credentials, cookies or headers of its own, keeps no session or cookie jar that would, is bound to no Unix socket, follows no redirects and honours the timeout httpx hands it with each request, which is the only way the upload's timeout reaches it. The upload then goes through it, still carrying only the file, its type and the headers the API named. The SDK checks the marker, not what it promises, and reads it off the transport the client routes the upload URL to, so a wrapper around another transport has to inherit it itself.

The same goes the other way: an `http_client` that trusts only a private CA, or whose proxy reaches only the API, applies that to the upload host too. Mount the transport the upload host needs, such as `mounts={"https://uploads.example.com": httpx.HTTPTransport()}` (`httpx.AsyncHTTPTransport()` on the async client) for httpx's default CA bundle and no proxy, and the upload uses that mount.

A transport the upload borrows this way is used as the client built it. Its proxy routing and its trusted CAs are the ones the client settled on when it was created, environment variables included, as for its API calls, so a change to `HTTPS_PROXY`, `NO_PROXY`, `SSL_CERT_FILE` or `SSL_CERT_DIR` after that does not reach the upload. The upload also takes a connection from the client's pool, so it counts against the client's `limits` and, when the pool is full, waits for a free connection within its timeout like any other request. The timeout counts time without progress while the file goes out, but once the operating system has accepted the last of it, the wait for the upload host's answer is a single read. On a slow link that read can include the seconds the system still needs to send what it buffered, so keep an upload's timeout well above a few seconds.

<br />

## Authentication

Pass credentials to the generated client constructor. Environment variables are read automatically when supported by the target runtime.
Expand Down
56 changes: 35 additions & 21 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Complete reference of every operation, grouped by resource. See [the README](./R
- [Bulk Delete](#bulk-delete)
- [Bulk Tag](#bulk-tag)
- [Asset Analytics](#asset-analytics)
- [Create Asset Direct Upload](#create-asset-direct-upload-1)
- [Upload a thumbnail file](#upload-a-thumbnail-file)
- [`SubtitleUpload`](#subtitleupload)
- [Upload Subtitles](#upload-subtitles)
- [Complete Subtitle Upload](#complete-subtitle-upload)
Expand Down Expand Up @@ -165,27 +167,6 @@ This endpoint creates a video asset allowing upload of a video from the local fi

```python
video_asset = client.video_assets.upload(
collection_id="646df1c9173a4a2fcac180b4",
profile_id="646df1c9173a4a2fcac180b7",
format="ABR",
tag=["ball"],
description="some description",
metadata={"headermeta": "metavalue"},
call_to_actions=[
{
"start_time": 1,
"end_time": 90,
"text": "some test",
"url": "https://some-url.com",
"position_from_top": 11,
"position_from_right": 23,
"border_radius": "11",
"font_color": "#000001",
"background_color": "#ffffff",
}
],
playlist_id="6597acd5ed6f26a9c5ca9633",
folder="697375fbfa2d1037283140e4",
workspace_id="646df1c9173a4a2fcac180b4",
idempotency_key="",
)
Expand Down Expand Up @@ -393,6 +374,39 @@ video_asset = client.video_assets.analytics(
)
```

### Create Asset Direct Upload

This endpoint creates a video asset allowing upload of a video from the local file system and ingest media content into the Gumlet system for processing and delivery. Body parameters are the same as the Create Asset body parameters except for the `input` parameter, which this endpoint does not take. A successful response will be returned with `upload_url` field. You can make `PUT` request to that URL to upload video. To upload video using `upload_url` refer to [this](https://docs.gumlet.com/docs/direct-upload#2-use-the-url-to-upload-a-file).

| Direction | Type |
| --- | --- |
| Request | [`VideoAssetUploadFileParams`](./src/gumlet/types/video_asset_upload_file_params.py) |
| Response | [`VideoAssetUploadFileResponse`](./src/gumlet/types/video_asset_upload_file_response.py) |

```python
video_asset = client.video_assets.upload_file(
file=open("path/to/file", "rb"),
workspace_id="646df1c9173a4a2fcac180b4",
idempotency_key="",
)
```

### Upload a thumbnail file

Requests a thumbnail upload URL for the asset and PUTs the file to it.

| Direction | Type |
| --- | --- |
| Response | [`VideoAssetUploadThumbnailResponse`](./src/gumlet/types/video_asset_upload_thumbnail_response.py) |

```python
video_asset = client.video_assets.upload_thumbnail(
asset_id="assetId",
file=open("path/to/file", "rb"),
idempotency_key="",
)
```

## `SubtitleUpload`

Add subtitles to an existing asset.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gumlet"
version = "1.6.0" # x-release-please-version
version = "1.6.1" # x-release-please-version
description = "Gumlet helps developers deliver online video and images. This API encompasses Gumlet Video, Image and Video Analytics functionality to help you build your products better and faster than ever before."
readme = "README.md"
license = "Apache-2.0"
Expand Down
Loading