Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
846f24e
fix: exact-match identifier filter on resources management list
stainless-app[bot] Jul 2, 2026
0eb8162
codegen metadata
stainless-app[bot] Jul 2, 2026
147af02
feat: filter users by identifier in management list
stainless-app[bot] Jul 3, 2026
526b229
feat(ID-365): support additional SSO provider configuration options
stainless-app[bot] Jul 3, 2026
6d27d21
fix(ACC-613): preserve source order of policies in draft/convert ceda…
stainless-app[bot] Jul 6, 2026
fea05f5
codegen metadata
stainless-app[bot] Jul 13, 2026
15cb317
fix(internal): resolve build failures
stainless-app[bot] Jul 13, 2026
79865c3
codegen metadata
stainless-app[bot] Jul 14, 2026
8a01934
fix(ci): resolve Stainless error diagnostics and enforce fail_on: error
stainless-app[bot] Jul 14, 2026
8389f30
chore: Fixes found during Terraform work
stainless-app[bot] Jul 15, 2026
414ac68
feat(applications): allow unified-gateway and mcp-server traits (ECO-…
stainless-app[bot] Jul 17, 2026
1c22f7e
feat(stlc): configurable CI runner and private-production-repo suppor…
stainless-app[bot] Jul 17, 2026
af68115
codegen metadata
stainless-app[bot] Jul 17, 2026
bf16103
chore: de-dup and align types across API specs
stainless-app[bot] Jul 21, 2026
09fa718
codegen metadata
stainless-app[bot] Jul 21, 2026
614306e
codegen metadata
stainless-app[bot] Jul 22, 2026
ccecea8
codegen metadata
stainless-app[bot] Jul 22, 2026
6a76dbf
feat(ACC-709): application assignees + expose role assignments
stainless-app[bot] Jul 23, 2026
518c473
feat(sdk): generate a client for the existing /policy/bundle endpoint
stainless-app[bot] Jul 24, 2026
d516a7f
fix(sdk): generate /policy/bundle body as raw binary, not multipart
stainless-app[bot] Jul 24, 2026
9927bcf
release: 0.17.0
stainless-app[bot] Jul 24, 2026
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/keycard-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -41,7 +41,7 @@ jobs:
permissions:
contents: read
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/keycard-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/keycard-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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.16.0"
".": "0.17.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: 106
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/keycard/keycard-api-cdf14bee924cea2eaca3c1aaed26521cb91369d9462d22c21a0306b5786f4706.yml
openapi_spec_hash: d8349acc1adec880977b6167a1e866bc
config_hash: 7adc6b24545570dcc4a1bf0f714aa3e0
configured_endpoints: 109
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/keycard/keycard-api-3c029b6d95f9ba550b5a983b3b021fa404cc2bd73d11495c0ae82065b4ba95ad.yml
openapi_spec_hash: 49c3651c217697ea8899b58c8f2bb046
config_hash: 22d144a33ba2901c82cc1f387a83f9a7
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## 0.17.0 (2026-07-24)

Full Changelog: [v0.16.0...v0.17.0](https://github.com/keycardai/keycard-python/compare/v0.16.0...v0.17.0)

### Features

* **ACC-709:** application assignees + expose role assignments ([6a76dbf](https://github.com/keycardai/keycard-python/commit/6a76dbf04cbd9d16c1054a262a7a42a01668f035))
* **applications:** allow unified-gateway and mcp-server traits (ECO-128) ([414ac68](https://github.com/keycardai/keycard-python/commit/414ac68a77bb5c54837b7d4146c2e8b8735f6370))
* filter users by identifier in management list ([147af02](https://github.com/keycardai/keycard-python/commit/147af020e8e8c31678928137fb85386b54dd4ec6))
* **ID-365:** support additional SSO provider configuration options ([526b229](https://github.com/keycardai/keycard-python/commit/526b22958acc91a11569ba3f8453a004eb03f6f5))
* **sdk:** generate a client for the existing /policy/bundle endpoint ([518c473](https://github.com/keycardai/keycard-python/commit/518c473dcb23f0d68e849838a070187addf422a9))
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([1c22f7e](https://github.com/keycardai/keycard-python/commit/1c22f7ea4ae904c4864a794dc4aaa46afa7d7e0e))


### Bug Fixes

* **ACC-613:** preserve source order of policies in draft/convert cedar_json ([6d27d21](https://github.com/keycardai/keycard-python/commit/6d27d213ac66fb9f1890409a380924c3edb44b99))
* **ci:** resolve Stainless error diagnostics and enforce fail_on: error ([8a01934](https://github.com/keycardai/keycard-python/commit/8a01934b6ceb8636db998f0498d86ccb810cf639))
* exact-match identifier filter on resources management list ([846f24e](https://github.com/keycardai/keycard-python/commit/846f24efdb2492e4ea0741167ebc7153af5d0d1e))
* **internal:** resolve build failures ([15cb317](https://github.com/keycardai/keycard-python/commit/15cb317c1d1ea8462b30bff1411e52a554df0fb0))
* **sdk:** generate /policy/bundle body as raw binary, not multipart ([d516a7f](https://github.com/keycardai/keycard-python/commit/d516a7f7b207aa4eed33d1a401721b9aa1ecd5d9))


### Chores

* de-dup and align types across API specs ([bf16103](https://github.com/keycardai/keycard-python/commit/bf161039858f079eabd6abf9102fa439633b9bc9))
* Fixes found during Terraform work ([8389f30](https://github.com/keycardai/keycard-python/commit/8389f304ffae7c4bbe512de541a6896469be273f))

## 0.16.0 (2026-06-30)

Full Changelog: [v0.15.0...v0.16.0](https://github.com/keycardai/keycard-python/compare/v0.15.0...v0.16.0)
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,34 @@ pip install keycardai_api
The full API of this library can be found in [api.md](api.md).

```python
import os
from keycardai_api import KeycardAPI

client = KeycardAPI()
client = KeycardAPI(
api_key=os.environ.get("KEYCARD_API_API_KEY"), # This is the default and can be omitted
)

zones = client.zones.list()
print(zones.items)
```

While you can provide an `api_key` keyword argument,
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
to add `KEYCARD_API_API_KEY="My API Key"` to your `.env` file
so that your API Key is not stored in source control.

## Async usage

Simply import `AsyncKeycardAPI` instead of `KeycardAPI` and use `await` with each API call:

```python
import os
import asyncio
from keycardai_api import AsyncKeycardAPI

client = AsyncKeycardAPI()
client = AsyncKeycardAPI(
api_key=os.environ.get("KEYCARD_API_API_KEY"), # This is the default and can be omitted
)


async def main() -> None:
Expand All @@ -68,13 +79,15 @@ pip install keycardai_api[aiohttp]
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import os
import asyncio
from keycardai_api import DefaultAioHttpClient
from keycardai_api import AsyncKeycardAPI


async def main() -> None:
async with AsyncKeycardAPI(
api_key=os.environ.get("KEYCARD_API_API_KEY"), # This is the default and can be omitted
http_client=DefaultAioHttpClient(),
) as client:
zones = await client.zones.list()
Expand Down
48 changes: 8 additions & 40 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,46 +261,6 @@ Methods:
- <code title="get /zones/{zone_id}/policies/{policy_id}/versions">client.zones.policies.versions.<a href="./src/keycardai_api/resources/zones/policies/versions.py">list</a>(policy_id, \*, zone_id, \*\*<a href="src/keycardai_api/types/zones/policies/version_list_params.py">params</a>) -> <a href="./src/keycardai_api/types/zones/policies/version_list_response.py">VersionListResponse</a></code>
- <code title="delete /zones/{zone_id}/policies/{policy_id}/versions/{version_id}">client.zones.policies.versions.<a href="./src/keycardai_api/resources/zones/policies/versions.py">archive</a>(version_id, \*, zone_id, policy_id) -> <a href="./src/keycardai_api/types/zones/policies/policy_version.py">PolicyVersion</a></code>

## Packages

Types:

```python
from keycardai_api.types.zones import (
InputState,
Package,
PackageDraft,
PackageInputBinding,
PackageList,
PackageOutputBinding,
PackageSource,
)
```

### Versions

Types:

```python
from keycardai_api.types.zones.packages import PackageVersion, PackageVersionList
```

## Installs

Types:

```python
from keycardai_api.types.zones import Install, InstallList, InstallStatus
```

## CatalogTasks

Types:

```python
from keycardai_api.types.zones import Task, TaskOperation, TaskStatus
```

## PolicySets

Types:
Expand Down Expand Up @@ -470,3 +430,11 @@ Methods:

- <code title="get /invitations/{token}">client.invitations.<a href="./src/keycardai_api/resources/invitations.py">retrieve</a>(token) -> <a href="./src/keycardai_api/types/invitation_retrieve_response.py">InvitationRetrieveResponse</a></code>
- <code title="post /invitations/{token}/accept">client.invitations.<a href="./src/keycardai_api/resources/invitations.py">accept</a>(token) -> <a href="./src/keycardai_api/types/invitation_accept_response.py">InvitationAcceptResponse</a></code>

# PolicyBundle

Methods:

- <code title="get /policy/bundle">client.policy_bundle.<a href="./src/keycardai_api/resources/policy_bundle.py">retrieve</a>() -> BinaryAPIResponse</code>
- <code title="put /policy/bundle">client.policy_bundle.<a href="./src/keycardai_api/resources/policy_bundle.py">update</a>(body, \*\*<a href="src/keycardai_api/types/policy_bundle_update_params.py">params</a>) -> BinaryAPIResponse</code>
- <code title="delete /policy/bundle">client.policy_bundle.<a href="./src/keycardai_api/resources/policy_bundle.py">reset</a>() -> None</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 = "keycardai_api"
version = "0.16.0"
version = "0.17.0"
description = "The official Python library for the keycard-api API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
fi

echo "==> Running pyright"
uv run pyright
uv run pyright -p .

echo "==> Running mypy"
uv run mypy .
Expand Down
Loading
Loading