Skip to content
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.5.0"
".": "0.6.0"
}
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [0.6.0](https://github.com/scalar/scalar-python/compare/v0.5.0...v0.6.0) (2026-09-15)


### ⚠ BREAKING CHANGES

* **api:** Schema `timestamp` shape changed.

### Features

* **api:** update schema timestamp (+1 more change) ([7aebe8c](https://github.com/scalar/scalar-python/commit/7aebe8cf76fd7a56b0fb0bc1b0973701ff48ec97))


### Chores

* **api:** regenerate SDK ([efd744a](https://github.com/scalar/scalar-python/commit/efd744aaef3eb57938f18b575ba2d93f5e19d6eb))
* **api:** regenerate SDK ([8be2812](https://github.com/scalar/scalar-python/commit/8be2812c2ceda556512945883830d7fb25f7328e))
* **api:** update generated SDK content ([6945d09](https://github.com/scalar/scalar-python/commit/6945d096fc2417df5ea1989b776abda21be27318))

## [0.5.0](https://github.com/scalar/scalar-python/compare/v0.4.0...v0.5.0) (2026-08-28)


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 = "scalar-sdk"
version = "0.5.0" # x-release-please-version
version = "0.6.0" # x-release-please-version
description = "API for managing Scalar platform resources."
readme = "README.md"
license = "Apache-2.0"
Expand Down
7 changes: 5 additions & 2 deletions scalar-sdk.manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Scalar",
"slug": "scalar",
"generatorVersion": "0.30.1",
"generatorVersion": "0.32.14",
"servers": [
"https://access.scalar.com"
],
Expand Down Expand Up @@ -770,7 +770,10 @@
"type": {
"kind": "primitive",
"type": "integer",
"validation": {}
"validation": {
"minimum": 0,
"maximum": 9007199254740991
}
}
},
{
Expand Down
45 changes: 0 additions & 45 deletions src/scalar_sdk/_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,33 +56,8 @@ def __stream__(self) -> Iterator[_T]:
response = self.response
process_data = self._client._process_response_data
iterator = self._iter_events()
content_type = (response.headers.get("content-type") or "").lower()
is_jsonl = "json" in content_type and "event-stream" not in content_type

try:
if is_jsonl:
# Newline-delimited JSON (`application/jsonl`,
# `application/x-jsonl`, etc.) has no SSE framing, so the
# `_decoder.iter_bytes` path above would never yield. We
# parse each non-empty line as one event so callers can
# iterate without caring whether the wire format is SSE
# or JSONL.
buffer = b""
for chunk in response.iter_bytes():
if not chunk:
continue
buffer += chunk
while b"\n" in buffer:
line, buffer = buffer.split(b"\n", 1)
text = line.decode("utf-8").strip()
if not text:
continue
yield process_data(data=json.loads(text), cast_to=cast_to, response=response)
tail = buffer.decode("utf-8").strip()
if tail:
yield process_data(data=json.loads(tail), cast_to=cast_to, response=response)
return

for sse in iterator:
if not sse.data:
continue
Expand Down Expand Up @@ -153,28 +128,8 @@ async def __stream__(self) -> AsyncIterator[_T]:
response = self.response
process_data = self._client._process_response_data
iterator = self._iter_events()
content_type = (response.headers.get("content-type") or "").lower()
is_jsonl = "json" in content_type and "event-stream" not in content_type

try:
if is_jsonl:
# See the sync sibling for why JSONL gets its own branch.
buffer = b""
async for chunk in response.aiter_bytes():
if not chunk:
continue
buffer += chunk
while b"\n" in buffer:
line, buffer = buffer.split(b"\n", 1)
text = line.decode("utf-8").strip()
if not text:
continue
yield process_data(data=json.loads(text), cast_to=cast_to, response=response)
tail = buffer.decode("utf-8").strip()
if tail:
yield process_data(data=json.loads(tail), cast_to=cast_to, response=response)
return

async for sse in iterator:
if not sse.data:
continue
Expand Down
2 changes: 1 addition & 1 deletion src/scalar_sdk/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Scalar. See README.md for details.

__title__ = "scalar"
__version__ = "0.5.0" # x-release-please-version
__version__ = "0.6.0" # x-release-please-version
Loading