Skip to content

Commit 39cdda9

Browse files
authored
Merge pull request #114 from steel-dev/release-please--branches--main--changes--next
2 parents 323c9e5 + 5ae167b commit 39cdda9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2385
-503
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,30 @@ jobs:
3030
- name: Run lints
3131
run: ./scripts/lint
3232

33+
upload:
34+
if: github.repository == 'stainless-sdks/steel-python'
35+
timeout-minutes: 10
36+
name: upload
37+
permissions:
38+
contents: read
39+
id-token: write
40+
runs-on: depot-ubuntu-24.04
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- name: Get GitHub OIDC Token
45+
id: github-oidc
46+
uses: actions/github-script@v6
47+
with:
48+
script: core.setOutput('github_token', await core.getIDToken());
49+
50+
- name: Upload tarball
51+
env:
52+
URL: https://pkg.stainless.com/s
53+
AUTH: ${{ steps.github-oidc.outputs.github_token }}
54+
SHA: ${{ github.sha }}
55+
run: ./scripts/utils/upload-artifact.sh
56+
3357
test:
3458
timeout-minutes: 10
3559
name: test

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.3.0"
2+
".": "0.4.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 17
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-df307c8d4d17c23d37054bf05f4d0a154be8011730c73ef8b3cfc987bcbdc05e.yml
3-
openapi_spec_hash: f3227dde2385091c20c58a17621286c7
4-
config_hash: f23d5011c9a89d67725b48e96ffb7c99
1+
configured_endpoints: 25
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-d5a9cdf80ea29558c755cdebab1f876a01bbb6f6e7cd480b677b8b8313d6e92c.yml
3+
openapi_spec_hash: ac6ed4b57809802e0924cdf97ca92102
4+
config_hash: 8fee9983d818d458fca9da01d2013f05

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Changelog
22

3+
## 0.4.0 (2025-06-03)
4+
5+
Full Changelog: [v0.3.0...v0.4.0](https://github.com/steel-dev/steel-python/compare/v0.3.0...v0.4.0)
6+
7+
### Features
8+
9+
* **api:** api update ([0ffa501](https://github.com/steel-dev/steel-python/commit/0ffa501e86332e522114a0934c8840945e55b1b7))
10+
* **api:** api update ([c0d3b97](https://github.com/steel-dev/steel-python/commit/c0d3b97d38153ed9068b0ab45f1d6fa795928b8d))
11+
* **api:** api update ([09c0202](https://github.com/steel-dev/steel-python/commit/09c0202155db5916bbc008feb4d351e739232906))
12+
* **api:** api update ([f93403a](https://github.com/steel-dev/steel-python/commit/f93403a897e6738e03a59186923e30a4b0637c00))
13+
* **api:** api update ([b4fae02](https://github.com/steel-dev/steel-python/commit/b4fae02408d585062ddc5aa26b8c95bd07354e28))
14+
* **api:** api update ([c1b2314](https://github.com/steel-dev/steel-python/commit/c1b2314f0a42fdbf6ea060d81f10a3c16eca15bd))
15+
* **client:** add follow_redirects request option ([fc3c2fd](https://github.com/steel-dev/steel-python/commit/fc3c2fd93f8db4487a645af64353d56a91477b50))
16+
17+
18+
### Chores
19+
20+
* **ci:** fix installation instructions ([a3534f2](https://github.com/steel-dev/steel-python/commit/a3534f2d4583d06243fbf349acc647551ad1a509))
21+
* **ci:** upload sdks to package manager ([f6b95a9](https://github.com/steel-dev/steel-python/commit/f6b95a9c33d887c2547acc14b151c314536196dc))
22+
* **docs:** grammar improvements ([88fd0c8](https://github.com/steel-dev/steel-python/commit/88fd0c82136215824403d5c552b78d54dd54f6f8))
23+
* **docs:** remove reference to rye shell ([4cf3d51](https://github.com/steel-dev/steel-python/commit/4cf3d5125de62210958ef4fafbb8ffb9f63c8c48))
24+
* **docs:** remove unnecessary param examples ([36c3756](https://github.com/steel-dev/steel-python/commit/36c37562ffe33e61e4b093a8901f20fe3a78fe84))
25+
326
## 0.3.0 (2025-05-12)
427

528
Full Changelog: [v0.2.0...v0.3.0](https://github.com/steel-dev/steel-python/compare/v0.2.0...v0.3.0)

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ $ rye sync --all-features
1717
You can then run scripts using `rye run python script.py` or by activating the virtual environment:
1818

1919
```sh
20-
$ rye shell
21-
# or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work
20+
# Activate the virtual environment - https://docs.python.org/3/library/venv.html#how-venvs-work
2221
$ source .venv/bin/activate
2322

2423
# now you can omit the `rye run` prefix

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,9 @@ from steel import Steel
154154
client = Steel()
155155

156156
session = client.sessions.create(
157-
dimensions={
158-
"height": 0,
159-
"width": 0,
160-
},
157+
credentials={},
161158
)
162-
print(session.dimensions)
159+
print(session.credentials)
163160
```
164161

165162
## Handling errors

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Steel please follow the respective company's security reporting guidelines.
19+
or products provided by Steel, please follow the respective company's security reporting guidelines.
2020

2121
### Steel Terms and Policies
2222

23-
Please contact team@steel.dev for any questions or concerns regarding security of our services.
23+
Please contact team@steel.dev for any questions or concerns regarding the security of our services.
2424

2525
---
2626

api.md

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,41 @@ Methods:
1212
- <code title="post /v1/scrape">client.<a href="./src/steel/_client.py">scrape</a>(\*\*<a href="src/steel/types/client_scrape_params.py">params</a>) -> <a href="./src/steel/types/scrape_response.py">ScrapeResponse</a></code>
1313
- <code title="post /v1/screenshot">client.<a href="./src/steel/_client.py">screenshot</a>(\*\*<a href="src/steel/types/client_screenshot_params.py">params</a>) -> <a href="./src/steel/types/screenshot_response.py">ScreenshotResponse</a></code>
1414

15+
# Credentials
16+
17+
Types:
18+
19+
```python
20+
from steel.types import (
21+
CredentialCreateResponse,
22+
CredentialUpdateResponse,
23+
CredentialListResponse,
24+
CredentialDeleteResponse,
25+
)
26+
```
27+
28+
Methods:
29+
30+
- <code title="post /v1/credentials">client.credentials.<a href="./src/steel/resources/credentials.py">create</a>(\*\*<a href="src/steel/types/credential_create_params.py">params</a>) -> <a href="./src/steel/types/credential_create_response.py">CredentialCreateResponse</a></code>
31+
- <code title="put /v1/credentials">client.credentials.<a href="./src/steel/resources/credentials.py">update</a>(\*\*<a href="src/steel/types/credential_update_params.py">params</a>) -> <a href="./src/steel/types/credential_update_response.py">CredentialUpdateResponse</a></code>
32+
- <code title="get /v1/credentials">client.credentials.<a href="./src/steel/resources/credentials.py">list</a>(\*\*<a href="src/steel/types/credential_list_params.py">params</a>) -> <a href="./src/steel/types/credential_list_response.py">CredentialListResponse</a></code>
33+
- <code title="delete /v1/credentials">client.credentials.<a href="./src/steel/resources/credentials.py">delete</a>(\*\*<a href="src/steel/types/credential_delete_params.py">params</a>) -> <a href="./src/steel/types/credential_delete_response.py">CredentialDeleteResponse</a></code>
34+
35+
# Files
36+
37+
Types:
38+
39+
```python
40+
from steel.types import File, Fileslist
41+
```
42+
43+
Methods:
44+
45+
- <code title="get /v1/files">client.files.<a href="./src/steel/resources/files.py">list</a>() -> <a href="./src/steel/types/fileslist.py">Fileslist</a></code>
46+
- <code title="delete /v1/files/{path}">client.files.<a href="./src/steel/resources/files.py">delete</a>(path) -> None</code>
47+
- <code title="get /v1/files/{path}">client.files.<a href="./src/steel/resources/files.py">download</a>(path) -> BinaryAPIResponse</code>
48+
- <code title="post /v1/files">client.files.<a href="./src/steel/resources/files.py">upload</a>(\*\*<a href="src/steel/types/file_upload_params.py">params</a>) -> <a href="./src/steel/types/file.py">File</a></code>
49+
1550
# Sessions
1651

1752
Types:
@@ -41,17 +76,11 @@ Methods:
4176

4277
## Files
4378

44-
Types:
45-
46-
```python
47-
from steel.types.sessions import File, Fileslist, FileDeleteResponse, FileDeleteAllResponse
48-
```
49-
5079
Methods:
5180

52-
- <code title="get /v1/sessions/{sessionId}/files/{fileId}">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">retrieve</a>(file_id, \*, session_id) -> <a href="./src/steel/types/sessions/file.py">File</a></code>
53-
- <code title="get /v1/sessions/{sessionId}/files">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">list</a>(session_id) -> <a href="./src/steel/types/sessions/fileslist.py">Fileslist</a></code>
54-
- <code title="delete /v1/sessions/{sessionId}/files/{fileId}">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">delete</a>(file_id, \*, session_id) -> <a href="./src/steel/types/sessions/file_delete_response.py">FileDeleteResponse</a></code>
55-
- <code title="delete /v1/sessions/{sessionId}/files">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">delete_all</a>(session_id) -> <a href="./src/steel/types/sessions/file_delete_all_response.py">FileDeleteAllResponse</a></code>
56-
- <code title="get /v1/sessions/{sessionId}/files/{fileId}/download">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">download</a>(file_id, \*, session_id) -> BinaryAPIResponse</code>
57-
- <code title="post /v1/sessions/{sessionId}/files">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">upload</a>(session_id, \*\*<a href="src/steel/types/sessions/file_upload_params.py">params</a>) -> <a href="./src/steel/types/sessions/file.py">File</a></code>
81+
- <code title="get /v1/sessions/{sessionId}/files">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">list</a>(session_id) -> <a href="./src/steel/types/fileslist.py">Fileslist</a></code>
82+
- <code title="delete /v1/sessions/{sessionId}/files/{path}">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">delete</a>(path, \*, session_id) -> None</code>
83+
- <code title="delete /v1/sessions/{sessionId}/files">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">delete_all</a>(session_id) -> None</code>
84+
- <code title="get /v1/sessions/{sessionId}/files/{path}">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">download</a>(path, \*, session_id) -> BinaryAPIResponse</code>
85+
- <code title="get /v1/sessions/{sessionId}/files.zip">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">download_archive</a>(session_id) -> BinaryAPIResponse</code>
86+
- <code title="post /v1/sessions/{sessionId}/files">client.sessions.files.<a href="./src/steel/resources/sessions/files.py">upload</a>(session_id, \*\*<a href="src/steel/types/sessions/file_upload_params.py">params</a>) -> <a href="./src/steel/types/file.py">File</a></code>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "steel-sdk"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
description = "The official Python library for the steel API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

scripts/utils/upload-artifact.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
set -exuo pipefail
3+
4+
RESPONSE=$(curl -X POST "$URL" \
5+
-H "Authorization: Bearer $AUTH" \
6+
-H "Content-Type: application/json")
7+
8+
SIGNED_URL=$(echo "$RESPONSE" | jq -r '.url')
9+
10+
if [[ "$SIGNED_URL" == "null" ]]; then
11+
echo -e "\033[31mFailed to get signed URL.\033[0m"
12+
exit 1
13+
fi
14+
15+
UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
16+
-H "Content-Type: application/gzip" \
17+
--data-binary @- "$SIGNED_URL" 2>&1)
18+
19+
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
20+
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
21+
echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/steel-python/$SHA'\033[0m"
22+
else
23+
echo -e "\033[31mFailed to upload artifact.\033[0m"
24+
exit 1
25+
fi

0 commit comments

Comments
 (0)