Skip to content

Commit 0c39dde

Browse files
release: 1.5.0 (#47)
* chore(docs): remove reference to rye shell * chore(docs): remove unnecessary param examples * feat(client): add follow_redirects request option * feat(api): api update * release: 1.5.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 96e2b39 commit 0c39dde

File tree

14 files changed

+248
-66
lines changed

14 files changed

+248
-66
lines changed

.release-please-manifest.json

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

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 89
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-2c885f8f3762bcc577255242aa61b3ad890170497c865f664d8ab42c8872d97c.yml
3-
openapi_spec_hash: e0f6dd3ae8329fa8b96d1ffdc937cbc9
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-5ce0d88003acccf6111cd40663ad7b4d468696fc439fca41d88087ab84b465c3.yml
3+
openapi_spec_hash: ff864d7f3cad6a98a0e39fee0fb2b16a
44
config_hash: 2ae8965d371a03bd30c6a56819c04cf2

CHANGELOG.md

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

3+
## 1.5.0 (2025-06-04)
4+
5+
Full Changelog: [v1.4.0...v1.5.0](https://github.com/knocklabs/knock-python/compare/v1.4.0...v1.5.0)
6+
7+
### Features
8+
9+
* **api:** api update ([d1373fc](https://github.com/knocklabs/knock-python/commit/d1373fca14df49d70f39a976cfc06655d47e63f4))
10+
* **client:** add follow_redirects request option ([89019e2](https://github.com/knocklabs/knock-python/commit/89019e20bc3f965a662dfa8abc33b4608b5b2e12))
11+
12+
13+
### Chores
14+
15+
* **docs:** remove reference to rye shell ([7a8cea9](https://github.com/knocklabs/knock-python/commit/7a8cea9054c4c620a621d79eb15ba0159deadd39))
16+
* **docs:** remove unnecessary param examples ([bd97370](https://github.com/knocklabs/knock-python/commit/bd973709e9044293a48639c3a9fb403f7448f697))
17+
318
## 1.4.0 (2025-05-29)
419

520
Full Changelog: [v1.3.0...v1.4.0](https://github.com/knocklabs/knock-python/compare/v1.3.0...v1.4.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: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,7 @@ client = Knock()
155155

156156
page = client.users.list_messages(
157157
user_id="user-123",
158-
inserted_at={
159-
"gt": "gt",
160-
"gte": "gte",
161-
"lt": "lt",
162-
"lte": "lte",
163-
},
158+
inserted_at={},
164159
)
165160
print(page.items)
166161
```

pyproject.toml

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

src/knockapi/_base_client.py

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

963+
if options.follow_redirects is not None:
964+
kwargs["follow_redirects"] = options.follow_redirects
965+
963966
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
964967

965968
response = None
@@ -1460,6 +1463,9 @@ async def request(
14601463
if self.custom_auth is not None:
14611464
kwargs["auth"] = self.custom_auth
14621465

1466+
if options.follow_redirects is not None:
1467+
kwargs["follow_redirects"] = options.follow_redirects
1468+
14631469
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
14641470

14651471
response = None

src/knockapi/_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/knockapi/_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

src/knockapi/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "knockapi"
4-
__version__ = "1.4.0" # x-release-please-version
4+
__version__ = "1.5.0" # x-release-please-version

0 commit comments

Comments
 (0)