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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/steel-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand All @@ -44,7 +44,7 @@ jobs:
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/steel-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand All @@ -63,7 +63,7 @@ jobs:
- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/steel-python'
id: github-oidc
uses: actions/github-script@v6
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

Expand All @@ -81,7 +81,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/steel-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'steel-dev/steel-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Check release environment
run: |
Expand Down
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.15.0"
".": "0.16.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 36
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-aa04a4c92f7068c304082be35f7b4c1474d12772ab9756e0a3819db9f14e1063.yml
openapi_spec_hash: 19b08d835a276c527167b13b86225ae1
config_hash: e49b3f69d57d7ffa0420acf772d5c846
configured_endpoints: 39
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-45efcdf3e5ccffb6e94a86be505b24b7b4ff05d8f1a2978c2a281729af68cb82.yml
openapi_spec_hash: 9a7724672b05d44888d67b6ed0ffc7ca
config_hash: dce4dea59023b0a00890fa654fbfffb4
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## 0.16.0 (2026-02-06)

Full Changelog: [v0.15.0...v0.16.0](https://github.com/steel-dev/steel-python/compare/v0.15.0...v0.16.0)

### Features

* **api:** api update ([6efa7c6](https://github.com/steel-dev/steel-python/commit/6efa7c68d1783cf007c2854e095aaaa29cf70bde))
* **api:** api update ([39bf149](https://github.com/steel-dev/steel-python/commit/39bf14915d1a92a92bf999c7d4d7cdf457f594fd))
* **client:** add custom JSON encoder for extended type support ([9c37892](https://github.com/steel-dev/steel-python/commit/9c3789211e990081c0d97fd4684d480671942503))
* **client:** add support for binary request streaming ([173f4bc](https://github.com/steel-dev/steel-python/commit/173f4bccb8cec99bd0cbe652203a85d200a98520))


### Bug Fixes

* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([941b1cc](https://github.com/steel-dev/steel-python/commit/941b1cc3019655d765bc4e1d66a8d5eb7c66b699))
* use async_to_httpx_files in patch method ([4d5f789](https://github.com/steel-dev/steel-python/commit/4d5f789e363954650468371049d9d9a6822d4484))


### Chores

* add missing docstrings ([f16212d](https://github.com/steel-dev/steel-python/commit/f16212dbd7d11e72e909b4c527358e4c6577d342))
* **ci:** upgrade `actions/github-script` ([a950e2a](https://github.com/steel-dev/steel-python/commit/a950e2afb5d34aace130b42e6118ccb255639b82))
* **internal:** add `--fix` argument to lint script ([ed11e7a](https://github.com/steel-dev/steel-python/commit/ed11e7aa7441a51314e4ca6b97489d89e34dc75a))
* **internal:** add missing files argument to base client ([92b8e72](https://github.com/steel-dev/steel-python/commit/92b8e72a9530757a3da642154a0c9d6e00f158b8))
* **internal:** codegen related update ([fa9cdd1](https://github.com/steel-dev/steel-python/commit/fa9cdd1963f4ef1b62c7043f6357152a1044ccf2))
* **internal:** update `actions/checkout` version ([f226fef](https://github.com/steel-dev/steel-python/commit/f226fef740814026024c09636063a76c6e702e0c))
* speedup initial import ([cb228f5](https://github.com/steel-dev/steel-python/commit/cb228f5f13404ed892accf61ecece2d4a62a6670))

## 0.15.0 (2025-12-05)

Full Changelog: [v0.14.0...v0.15.0](https://github.com/steel-dev/steel-python/compare/v0.14.0...v0.15.0)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 Steel
Copyright 2026 Steel

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,23 @@ session = client.sessions.create(
print(session.credentials)
```

## File uploads

Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.

```python
from pathlib import Path
from steel import Steel

client = Steel()

client.files.upload(
file=Path("/path/to/file"),
)
```

The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.

## Handling errors

When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `steel.APIConnectionError` is raised.
Expand Down
16 changes: 14 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,16 @@ Methods:
Types:

```python
from steel.types.sessions import CaptchaSolveImageResponse, CaptchaStatusResponse
from steel.types.sessions import (
CaptchaSolveResponse,
CaptchaSolveImageResponse,
CaptchaStatusResponse,
)
```

Methods:

- <code title="post /v1/sessions/{sessionId}/captchas/solve">client.sessions.captchas.<a href="./src/steel/resources/sessions/captchas.py">solve</a>(session_id, \*\*<a href="src/steel/types/sessions/captcha_solve_params.py">params</a>) -> <a href="./src/steel/types/sessions/captcha_solve_response.py">CaptchaSolveResponse</a></code>
- <code title="post /v1/sessions/{sessionId}/captchas/solve-image">client.sessions.captchas.<a href="./src/steel/resources/sessions/captchas.py">solve_image</a>(session_id, \*\*<a href="src/steel/types/sessions/captcha_solve_image_params.py">params</a>) -> <a href="./src/steel/types/sessions/captcha_solve_image_response.py">CaptchaSolveImageResponse</a></code>
- <code title="get /v1/sessions/{sessionId}/captchas/status">client.sessions.captchas.<a href="./src/steel/resources/sessions/captchas.py">status</a>(session_id) -> <a href="./src/steel/types/sessions/captcha_status_response.py">CaptchaStatusResponse</a></code>

Expand Down Expand Up @@ -129,10 +134,17 @@ Methods:
Types:

```python
from steel.types import ProfileCreateResponse, ProfileListResponse
from steel.types import (
ProfileCreateResponse,
ProfileUpdateResponse,
ProfileListResponse,
ProfileGetResponse,
)
```

Methods:

- <code title="post /v1/profiles">client.profiles.<a href="./src/steel/resources/profiles.py">create</a>(\*\*<a href="src/steel/types/profile_create_params.py">params</a>) -> <a href="./src/steel/types/profile_create_response.py">ProfileCreateResponse</a></code>
- <code title="patch /v1/profiles/{id}">client.profiles.<a href="./src/steel/resources/profiles.py">update</a>(id, \*\*<a href="src/steel/types/profile_update_params.py">params</a>) -> <a href="./src/steel/types/profile_update_response.py">ProfileUpdateResponse</a></code>
- <code title="get /v1/profiles">client.profiles.<a href="./src/steel/resources/profiles.py">list</a>() -> <a href="./src/steel/types/profile_list_response.py">ProfileListResponse</a></code>
- <code title="get /v1/profiles/{id}">client.profiles.<a href="./src/steel/resources/profiles.py">get</a>(id) -> <a href="./src/steel/types/profile_get_response.py">ProfileGetResponse</a></code>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "steel-sdk"
version = "0.15.0"
version = "0.16.0"
description = "The official Python library for the steel API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
9 changes: 7 additions & 2 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ set -e

cd "$(dirname "$0")/.."

echo "==> Running lints"
rye run lint
if [ "$1" = "--fix" ]; then
echo "==> Running lints with --fix"
rye run fix:ruff
else
echo "==> Running lints"
rye run lint
fi

echo "==> Making sure it imports"
rye run python -c 'import steel'
Loading