Skip to content

Commit c31e59e

Browse files
authored
Merge pull request #63 from isaacus-dev/release-please--branches--main--changes--next
release: 0.7.0
2 parents c3258d6 + 5295c35 commit c31e59e

File tree

12 files changed

+135
-7
lines changed

12 files changed

+135
-7
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/isaacus-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.6.1"
2+
".": "0.7.0"
33
}

CHANGELOG.md

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

3+
## 0.7.0 (2025-06-03)
4+
5+
Full Changelog: [v0.6.1...v0.7.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.6.1...v0.7.0)
6+
7+
### Features
8+
9+
* **client:** add follow_redirects request option ([40221d5](https://github.com/isaacus-dev/isaacus-python/commit/40221d56d887dcfb693d67883a47403c680f6062))
10+
11+
12+
### Chores
13+
14+
* **ci:** fix installation instructions ([157308b](https://github.com/isaacus-dev/isaacus-python/commit/157308b71eefc75af2e76acd10664eb5633b9110))
15+
* **ci:** upload sdks to package manager ([9f9915c](https://github.com/isaacus-dev/isaacus-python/commit/9f9915ce18a288ab157b8f75c21de724507267d7))
16+
* **docs:** grammar improvements ([eb2766f](https://github.com/isaacus-dev/isaacus-python/commit/eb2766f59d477222ae93c06c32e06ab1ff94645f))
17+
* **docs:** remove reference to rye shell ([96a0239](https://github.com/isaacus-dev/isaacus-python/commit/96a0239f103261c69ead957c62fdee27497192ed))
18+
319
## 0.6.1 (2025-05-10)
420

521
Full Changelog: [v0.6.0...v0.6.1](https://github.com/isaacus-dev/isaacus-python/compare/v0.6.0...v0.6.1)

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

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 Isaacus please follow the respective company's security reporting guidelines.
19+
or products provided by Isaacus, please follow the respective company's security reporting guidelines.
2020

2121
### Isaacus Terms and Policies
2222

23-
Please contact [email protected] for any questions or concerns regarding security of our services.
23+
Please contact [email protected] for any questions or concerns regarding the security of our services.
2424

2525
---
2626

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "isaacus"
3-
version = "0.6.1"
3+
version = "0.7.0"
44
description = "The official Python library for the isaacus 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/isaacus-python/$SHA'\033[0m"
22+
else
23+
echo -e "\033[31mFailed to upload artifact.\033[0m"
24+
exit 1
25+
fi

src/isaacus/_base_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,9 @@ def request(
935935
if self.custom_auth is not None:
936936
kwargs["auth"] = self.custom_auth
937937

938+
if options.follow_redirects is not None:
939+
kwargs["follow_redirects"] = options.follow_redirects
940+
938941
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
939942

940943
response = None
@@ -1435,6 +1438,9 @@ async def request(
14351438
if self.custom_auth is not None:
14361439
kwargs["auth"] = self.custom_auth
14371440

1441+
if options.follow_redirects is not None:
1442+
kwargs["follow_redirects"] = options.follow_redirects
1443+
14381444
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
14391445

14401446
response = None

src/isaacus/_models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
737737
idempotency_key: str
738738
json_data: Body
739739
extra_json: AnyMapping
740+
follow_redirects: bool
740741

741742

742743
@final
@@ -750,6 +751,7 @@ class FinalRequestOptions(pydantic.BaseModel):
750751
files: Union[HttpxRequestFiles, None] = None
751752
idempotency_key: Union[str, None] = None
752753
post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
754+
follow_redirects: Union[bool, None] = None
753755

754756
# It should be noted that we cannot use `json` here as that would override
755757
# a BaseModel method in an incompatible fashion.

src/isaacus/_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class RequestOptions(TypedDict, total=False):
100100
params: Query
101101
extra_json: AnyMapping
102102
idempotency_key: str
103+
follow_redirects: bool
103104

104105

105106
# Sentinel class used until PEP 0661 is accepted
@@ -215,3 +216,4 @@ class _GenericAlias(Protocol):
215216

216217
class HttpxSendArgs(TypedDict, total=False):
217218
auth: httpx.Auth
219+
follow_redirects: bool

0 commit comments

Comments
 (0)