Skip to content

Commit 1da9b58

Browse files
release: 0.3.0 (#3)
Automated Release PR --- ## 0.3.0 (2026-03-16) Full Changelog: [v0.2.0...v0.3.0](v0.2.0...v0.3.0) ### Features * use common bearerAuth and OAuth2 security schemes ([367a8c2](367a8c2)) ### Bug Fixes * **deps:** bump minimum typing-extensions version ([8d6df39](8d6df39)) * **pydantic:** do not pass `by_alias` unless set ([2a6ae9b](2a6ae9b)) ### Chores * configure new SDK language ([37fcdc3](37fcdc3)) * **internal:** tweak CI branches ([e58ab99](e58ab99)) --- This pull request is managed by Stainless's [GitHub App](https://github.com/apps/stainless-app). The [semver version number](https://semver.org/#semantic-versioning-specification-semver) is based on included [commit messages](https://www.conventionalcommits.org/en/v1.0.0/). Alternatively, you can manually set the version number in the title of this pull request. For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request. 🔗 Stainless [website](https://www.stainlessapi.com) 📚 Read the [docs](https://app.stainlessapi.com/docs) 🙋 [Reach out](mailto:support@stainlessapi.com) for help or questions --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent e63b9af commit 1da9b58

14 files changed

Lines changed: 84 additions & 182 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: CI
22
on:
33
push:
4-
branches-ignore:
5-
- 'generated'
6-
- 'codegen/**'
7-
- 'integrated/**'
8-
- 'stl-preview-head/**'
9-
- 'stl-preview-base/**'
4+
branches:
5+
- '**'
6+
- '!integrated/**'
7+
- '!stl-preview-head/**'
8+
- '!stl-preview-base/**'
9+
- '!generated'
10+
- '!codegen/**'
11+
- 'codegen/stl/**'
1012
pull_request:
1113
branches-ignore:
1214
- 'stl-preview-head/**'

.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.2.0"
2+
".": "0.3.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 107
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/keycard%2Fkeycard-api-d3d69f45bfeddbd210e86edb90a843d195ba38d3b8636915400f26bd10882b95.yml
3-
openapi_spec_hash: 3bb1233f309a042f4fe90d9e32a81a3d
4-
config_hash: 99a124cc01ffd9a67759ccbc360af24a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/keycard%2Fkeycard-api-e0b7b296f7b0cac79675a790974f3ad90eb46833027467ee97c3ed21675628b8.yml
3+
openapi_spec_hash: 5e60faefb18dd2fca721f14252ab907a
4+
config_hash: dbb3c94874836d520e64fc8ffda4f0d3

CHANGELOG.md

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

3+
## 0.3.0 (2026-03-16)
4+
5+
Full Changelog: [v0.2.0...v0.3.0](https://github.com/keycardai/keycard-python/compare/v0.2.0...v0.3.0)
6+
7+
### Features
8+
9+
* use common bearerAuth and OAuth2 security schemes ([367a8c2](https://github.com/keycardai/keycard-python/commit/367a8c261a1d7a289a092949da25e6da04cd16f3))
10+
11+
12+
### Bug Fixes
13+
14+
* **deps:** bump minimum typing-extensions version ([8d6df39](https://github.com/keycardai/keycard-python/commit/8d6df397c7b9a5c176b599ca6e012400ff452fdf))
15+
* **pydantic:** do not pass `by_alias` unless set ([2a6ae9b](https://github.com/keycardai/keycard-python/commit/2a6ae9bc20c6c3a2b483613799cc16001a495d0d))
16+
17+
18+
### Chores
19+
20+
* configure new SDK language ([37fcdc3](https://github.com/keycardai/keycard-python/commit/37fcdc3d805b5a0c0f449a3c45ad27dedb8e5ea0))
21+
* **internal:** tweak CI branches ([e58ab99](https://github.com/keycardai/keycard-python/commit/e58ab9952115c67eb8614bd4c441ee9426f5364e))
22+
323
## 0.2.0 (2026-03-16)
424

525
Full Changelog: [v0.1.0...v0.2.0](https://github.com/keycardai/keycard-python/compare/v0.1.0...v0.2.0)

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ and offers both synchronous and asynchronous clients powered by [httpx](https://
99

1010
It is generated with [Stainless](https://www.stainless.com/).
1111

12+
## MCP Server
13+
14+
Use the Keycard API MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
15+
16+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40keycardai%2Fapi-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBrZXljYXJkYWkvYXBpLW1jcCJdLCJlbnYiOnsiS0VZQ0FSRF9BUElfQVBJX0tFWSI6Ik15IEFQSSBLZXkiLCJLRVlDQVJEX0FQSV9DTElFTlRfSUQiOiJNeSBDbGllbnQgSUQiLCJLRVlDQVJEX0FQSV9DTElFTlRfU0VDUkVUIjoiTXkgQ2xpZW50IFNlY3JldCJ9fQ)
17+
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40keycardai%2Fapi-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40keycardai%2Fapi-mcp%22%5D%2C%22env%22%3A%7B%22KEYCARD_API_API_KEY%22%3A%22My%20API%20Key%22%2C%22KEYCARD_API_CLIENT_ID%22%3A%22My%20Client%20ID%22%2C%22KEYCARD_API_CLIENT_SECRET%22%3A%22My%20Client%20Secret%22%7D%7D)
18+
19+
> Note: You may need to set environment variables in your MCP client.
20+
1221
## Documentation
1322

1423
The REST API documentation can be found on [docs.keycard.ai](https://docs.keycard.ai). The full API of this library can be found in [api.md](api.md).

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "keycardai_api"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
description = "The official Python library for the keycard-api API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -11,7 +11,7 @@ authors = [
1111
dependencies = [
1212
"httpx>=0.23.0, <1",
1313
"pydantic>=1.9.0, <3",
14-
"typing-extensions>=4.10, <5",
14+
"typing-extensions>=4.14, <5",
1515
"anyio>=3.5.0, <5",
1616
"distro>=1.7.0, <2",
1717
"sniffio",

src/keycardai_api/_compat.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, cast, overload
44
from datetime import date, datetime
5-
from typing_extensions import Self, Literal
5+
from typing_extensions import Self, Literal, TypedDict
66

77
import pydantic
88
from pydantic.fields import FieldInfo
@@ -131,6 +131,10 @@ def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str:
131131
return model.model_dump_json(indent=indent)
132132

133133

134+
class _ModelDumpKwargs(TypedDict, total=False):
135+
by_alias: bool
136+
137+
134138
def model_dump(
135139
model: pydantic.BaseModel,
136140
*,
@@ -142,14 +146,17 @@ def model_dump(
142146
by_alias: bool | None = None,
143147
) -> dict[str, Any]:
144148
if (not PYDANTIC_V1) or hasattr(model, "model_dump"):
149+
kwargs: _ModelDumpKwargs = {}
150+
if by_alias is not None:
151+
kwargs["by_alias"] = by_alias
145152
return model.model_dump(
146153
mode=mode,
147154
exclude=exclude,
148155
exclude_unset=exclude_unset,
149156
exclude_defaults=exclude_defaults,
150157
# warnings are not supported in Pydantic v1
151158
warnings=True if PYDANTIC_V1 else warnings,
152-
by_alias=by_alias,
159+
**kwargs,
153160
)
154161
return cast(
155162
"dict[str, Any]",

src/keycardai_api/_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__ = "keycardai_api"
4-
__version__ = "0.2.0" # x-release-please-version
4+
__version__ = "0.3.0" # x-release-please-version

src/keycardai_api/resources/zones/policies/policies.py

Lines changed: 8 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,7 @@ def create(
108108
policy_create_params.PolicyCreateParams,
109109
),
110110
options=make_request_options(
111-
extra_headers=extra_headers,
112-
extra_query=extra_query,
113-
extra_body=extra_body,
114-
timeout=timeout,
115-
security={},
111+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
116112
),
117113
cast_to=Policy,
118114
)
@@ -159,11 +155,7 @@ def retrieve(
159155
return self._get(
160156
f"/zones/{zone_id}/policies/{policy_id}",
161157
options=make_request_options(
162-
extra_headers=extra_headers,
163-
extra_query=extra_query,
164-
extra_body=extra_body,
165-
timeout=timeout,
166-
security={},
158+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
167159
),
168160
cast_to=Policy,
169161
)
@@ -221,11 +213,7 @@ def update(
221213
policy_update_params.PolicyUpdateParams,
222214
),
223215
options=make_request_options(
224-
extra_headers=extra_headers,
225-
extra_query=extra_query,
226-
extra_body=extra_body,
227-
timeout=timeout,
228-
security={},
216+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
229217
),
230218
cast_to=Policy,
231219
)
@@ -304,7 +292,6 @@ def list(
304292
},
305293
policy_list_params.PolicyListParams,
306294
),
307-
security={},
308295
),
309296
cast_to=PolicyListResponse,
310297
)
@@ -351,11 +338,7 @@ def archive(
351338
return self._delete(
352339
f"/zones/{zone_id}/policies/{policy_id}",
353340
options=make_request_options(
354-
extra_headers=extra_headers,
355-
extra_query=extra_query,
356-
extra_body=extra_body,
357-
timeout=timeout,
358-
security={},
341+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
359342
),
360343
cast_to=Policy,
361344
)
@@ -436,11 +419,7 @@ async def create(
436419
policy_create_params.PolicyCreateParams,
437420
),
438421
options=make_request_options(
439-
extra_headers=extra_headers,
440-
extra_query=extra_query,
441-
extra_body=extra_body,
442-
timeout=timeout,
443-
security={},
422+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
444423
),
445424
cast_to=Policy,
446425
)
@@ -487,11 +466,7 @@ async def retrieve(
487466
return await self._get(
488467
f"/zones/{zone_id}/policies/{policy_id}",
489468
options=make_request_options(
490-
extra_headers=extra_headers,
491-
extra_query=extra_query,
492-
extra_body=extra_body,
493-
timeout=timeout,
494-
security={},
469+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
495470
),
496471
cast_to=Policy,
497472
)
@@ -549,11 +524,7 @@ async def update(
549524
policy_update_params.PolicyUpdateParams,
550525
),
551526
options=make_request_options(
552-
extra_headers=extra_headers,
553-
extra_query=extra_query,
554-
extra_body=extra_body,
555-
timeout=timeout,
556-
security={},
527+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
557528
),
558529
cast_to=Policy,
559530
)
@@ -632,7 +603,6 @@ async def list(
632603
},
633604
policy_list_params.PolicyListParams,
634605
),
635-
security={},
636606
),
637607
cast_to=PolicyListResponse,
638608
)
@@ -679,11 +649,7 @@ async def archive(
679649
return await self._delete(
680650
f"/zones/{zone_id}/policies/{policy_id}",
681651
options=make_request_options(
682-
extra_headers=extra_headers,
683-
extra_query=extra_query,
684-
extra_body=extra_body,
685-
timeout=timeout,
686-
security={},
652+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
687653
),
688654
cast_to=Policy,
689655
)

src/keycardai_api/resources/zones/policies/versions.py

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,7 @@ def create(
104104
version_create_params.VersionCreateParams,
105105
),
106106
options=make_request_options(
107-
extra_headers=extra_headers,
108-
extra_query=extra_query,
109-
extra_body=extra_body,
110-
timeout=timeout,
111-
security={},
107+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
112108
),
113109
cast_to=PolicyVersion,
114110
)
@@ -168,7 +164,6 @@ def retrieve(
168164
extra_body=extra_body,
169165
timeout=timeout,
170166
query=maybe_transform({"format": format}, version_retrieve_params.VersionRetrieveParams),
171-
security={},
172167
),
173168
cast_to=PolicyVersion,
174169
)
@@ -255,7 +250,6 @@ def list(
255250
},
256251
version_list_params.VersionListParams,
257252
),
258-
security={},
259253
),
260254
cast_to=VersionListResponse,
261255
)
@@ -305,11 +299,7 @@ def archive(
305299
return self._delete(
306300
f"/zones/{zone_id}/policies/{policy_id}/versions/{version_id}",
307301
options=make_request_options(
308-
extra_headers=extra_headers,
309-
extra_query=extra_query,
310-
extra_body=extra_body,
311-
timeout=timeout,
312-
security={},
302+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
313303
),
314304
cast_to=PolicyVersion,
315305
)
@@ -394,11 +384,7 @@ async def create(
394384
version_create_params.VersionCreateParams,
395385
),
396386
options=make_request_options(
397-
extra_headers=extra_headers,
398-
extra_query=extra_query,
399-
extra_body=extra_body,
400-
timeout=timeout,
401-
security={},
387+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
402388
),
403389
cast_to=PolicyVersion,
404390
)
@@ -458,7 +444,6 @@ async def retrieve(
458444
extra_body=extra_body,
459445
timeout=timeout,
460446
query=await async_maybe_transform({"format": format}, version_retrieve_params.VersionRetrieveParams),
461-
security={},
462447
),
463448
cast_to=PolicyVersion,
464449
)
@@ -545,7 +530,6 @@ async def list(
545530
},
546531
version_list_params.VersionListParams,
547532
),
548-
security={},
549533
),
550534
cast_to=VersionListResponse,
551535
)
@@ -595,11 +579,7 @@ async def archive(
595579
return await self._delete(
596580
f"/zones/{zone_id}/policies/{policy_id}/versions/{version_id}",
597581
options=make_request_options(
598-
extra_headers=extra_headers,
599-
extra_query=extra_query,
600-
extra_body=extra_body,
601-
timeout=timeout,
602-
security={},
582+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
603583
),
604584
cast_to=PolicyVersion,
605585
)

0 commit comments

Comments
 (0)