Skip to content

Commit 35cda8b

Browse files
feat(api): manual updates
1 parent c2b5238 commit 35cda8b

47 files changed

Lines changed: 403 additions & 263 deletions

Some content is hidden

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

.github/workflows/publish-pypi.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is triggered when a GitHub release is created.
22
# It can also be run manually to re-publish to PyPI in case it failed for some reason.
3-
# You can run this workflow by navigating to https://www.github.com/keycardai/keycard-python/actions/workflows/publish-pypi.yml
3+
# You can run this workflow by navigating to https://www.github.com/keycardlabs/keycard-python/actions/workflows/publish-pypi.yml
44
name: Publish PyPI
55
on:
66
workflow_dispatch:
@@ -12,9 +12,6 @@ jobs:
1212
publish:
1313
name: publish
1414
runs-on: ubuntu-latest
15-
permissions:
16-
contents: read
17-
id-token: write
1815

1916
steps:
2017
- uses: actions/checkout@v6
@@ -27,3 +24,5 @@ jobs:
2724
- name: Publish to PyPI
2825
run: |
2926
bash ./bin/publish-pypi
27+
env:
28+
PYPI_TOKEN: ${{ secrets.KEYCARD_API_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ jobs:
99
release_doctor:
1010
name: release doctor
1111
runs-on: ubuntu-latest
12-
if: github.repository == 'keycardai/keycard-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
12+
if: github.repository == 'keycardlabs/keycard-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
1313

1414
steps:
1515
- uses: actions/checkout@v6
1616

1717
- name: Check release environment
1818
run: |
1919
bash ./bin/check-release-environment
20+
env:
21+
PYPI_TOKEN: ${{ secrets.KEYCARD_API_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 87
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/keycard%2Fkeycard-api-99b3994c0eb51056133252ca79541cf8ae18807f82068a3ab773fed580b06a23.yml
3-
openapi_spec_hash: 62be9e140a7bd9f41e2343f232efb832
4-
config_hash: 8d67ced49c86832a6ec4b0c6fa8e6b40
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/keycard%2Fkeycard-api-cb43483cd1b31447c61507f94d93d50b047d98f1f81f6ffa54a860a38e929f5f.yml
3+
openapi_spec_hash: d470e78a4feb376982d931be1ad7ea74
4+
config_hash: d1ee3a2b08b7b7afbcf32ca6ec2cbb82

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ If you’d like to use the repository from source, you can either install from g
6262
To install via git:
6363

6464
```sh
65-
$ pip install git+ssh://git@github.com/keycardai/keycard-python.git
65+
$ pip install git+ssh://git@github.com/keycardlabs/keycard-python.git
6666
```
6767

6868
Alternatively, you can build from source and install the wheel file:
@@ -113,7 +113,7 @@ the changes aren't made through the automated pipeline, you may want to make rel
113113

114114
### Publish with a GitHub workflow
115115

116-
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/keycardai/keycard-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
116+
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/keycardlabs/keycard-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
117117

118118
### Publish manually
119119

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Keycard API Python API library
22

33
<!-- prettier-ignore -->
4-
[![PyPI version](https://img.shields.io/pypi/v/keycardai-api.svg?label=pypi%20(stable))](https://pypi.org/project/keycardai-api/)
4+
[![PyPI version](https://img.shields.io/pypi/v/keycard_api.svg?label=pypi%20(stable))](https://pypi.org/project/keycard_api/)
55

66
The Keycard API Python library provides convenient access to the Keycard API REST API from any Python 3.9+
77
application. The library includes type definitions for all request params and response fields,
@@ -17,7 +17,7 @@ The REST API documentation can be found on [docs.keycard.ai](https://docs.keycar
1717

1818
```sh
1919
# install from PyPI
20-
pip install keycardai-api
20+
pip install keycard_api
2121
```
2222

2323
## Usage
@@ -67,7 +67,7 @@ You can enable this by installing `aiohttp`:
6767

6868
```sh
6969
# install from PyPI
70-
pip install keycardai-api[aiohttp]
70+
pip install keycard_api[aiohttp]
7171
```
7272

7373
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
@@ -247,9 +247,9 @@ zone = response.parse() # get the object that `zones.list()` would have returne
247247
print(zone.items)
248248
```
249249

250-
These methods return an [`APIResponse`](https://github.com/keycardai/keycard-python/tree/main/src/keycard_api/_response.py) object.
250+
These methods return an [`APIResponse`](https://github.com/keycardlabs/keycard-python/tree/main/src/keycard_api/_response.py) object.
251251

252-
The async client returns an [`AsyncAPIResponse`](https://github.com/keycardai/keycard-python/tree/main/src/keycard_api/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
252+
The async client returns an [`AsyncAPIResponse`](https://github.com/keycardlabs/keycard-python/tree/main/src/keycard_api/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
253253

254254
#### `.with_streaming_response`
255255

@@ -353,7 +353,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
353353

354354
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
355355

356-
We are keen for your feedback; please open an [issue](https://www.github.com/keycardai/keycard-python/issues) with questions, bugs, or suggestions.
356+
We are keen for your feedback; please open an [issue](https://www.github.com/keycardlabs/keycard-python/issues) with questions, bugs, or suggestions.
357357

358358
### Determining the installed version
359359

bin/check-release-environment

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
errors=()
44

5+
if [ -z "${PYPI_TOKEN}" ]; then
6+
errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
7+
fi
8+
59
lenErrors=${#errors[@]}
610

711
if [[ lenErrors -gt 0 ]]; then

bin/publish-pypi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@ set -eux
44
rm -rf dist
55
mkdir -p dist
66
uv build
7-
if [ -n "${PYPI_TOKEN:-}" ]; then
8-
uv publish --token=$PYPI_TOKEN
9-
else
10-
uv publish
11-
fi
7+
uv publish --token=$PYPI_TOKEN

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "keycardai-api"
2+
name = "keycard_api"
33
version = "0.0.1"
44
description = "The official Python library for the keycard-api API"
55
dynamic = ["readme"]
@@ -37,8 +37,8 @@ classifiers = [
3737
]
3838

3939
[project.urls]
40-
Homepage = "https://github.com/keycardai/keycard-python"
41-
Repository = "https://github.com/keycardai/keycard-python"
40+
Homepage = "https://github.com/keycardlabs/keycard-python"
41+
Repository = "https://github.com/keycardlabs/keycard-python"
4242

4343
[project.optional-dependencies]
4444
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
@@ -112,7 +112,7 @@ path = "README.md"
112112
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
113113
# replace relative links with absolute links
114114
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
115-
replacement = '[\1](https://github.com/keycardai/keycard-python/tree/main/\g<2>)'
115+
replacement = '[\1](https://github.com/keycardlabs/keycard-python/tree/main/\g<2>)'
116116

117117
[tool.pytest.ini_options]
118118
testpaths = ["tests"]

requirements-dev.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ annotated-types==0.7.0
66
anyio==4.12.1
77
# via
88
# httpx
9-
# keycardai-api
9+
# keycard-api
1010
backports-asyncio-runner==1.2.0 ; python_full_version < '3.11'
1111
# via pytest-asyncio
1212
certifi==2026.1.4
@@ -17,7 +17,7 @@ colorama==0.4.6 ; sys_platform == 'win32'
1717
# via pytest
1818
dirty-equals==0.11
1919
distro==1.9.0
20-
# via keycardai-api
20+
# via keycard-api
2121
exceptiongroup==1.3.1 ; python_full_version < '3.11'
2222
# via
2323
# anyio
@@ -30,7 +30,7 @@ httpcore==1.0.9
3030
# via httpx
3131
httpx==0.28.1
3232
# via
33-
# keycardai-api
33+
# keycard-api
3434
# respx
3535
idna==3.11
3636
# via
@@ -59,7 +59,7 @@ pathspec==1.0.3
5959
pluggy==1.6.0
6060
# via pytest
6161
pydantic==2.12.5
62-
# via keycardai-api
62+
# via keycard-api
6363
pydantic-core==2.41.5
6464
# via pydantic
6565
pygments==2.19.2
@@ -86,7 +86,7 @@ ruff==0.14.13
8686
six==1.17.0 ; python_full_version < '3.10'
8787
# via python-dateutil
8888
sniffio==1.3.1
89-
# via keycardai-api
89+
# via keycard-api
9090
time-machine==2.19.0 ; python_full_version < '3.10'
9191
time-machine==3.2.0 ; python_full_version >= '3.10'
9292
tomli==2.4.0 ; python_full_version < '3.11'
@@ -97,7 +97,7 @@ typing-extensions==4.15.0
9797
# via
9898
# anyio
9999
# exceptiongroup
100-
# keycardai-api
100+
# keycard-api
101101
# mypy
102102
# pydantic
103103
# pydantic-core

src/keycard_api/resources/invitations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def with_raw_response(self) -> InvitationsResourceWithRawResponse:
2828
This property can be used as a prefix for any HTTP method call to return
2929
the raw response object instead of the parsed content.
3030
31-
For more information, see https://www.github.com/keycardai/keycard-python#accessing-raw-response-data-eg-headers
31+
For more information, see https://www.github.com/keycardlabs/keycard-python#accessing-raw-response-data-eg-headers
3232
"""
3333
return InvitationsResourceWithRawResponse(self)
3434

@@ -37,7 +37,7 @@ def with_streaming_response(self) -> InvitationsResourceWithStreamingResponse:
3737
"""
3838
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
3939
40-
For more information, see https://www.github.com/keycardai/keycard-python#with_streaming_response
40+
For more information, see https://www.github.com/keycardlabs/keycard-python#with_streaming_response
4141
"""
4242
return InvitationsResourceWithStreamingResponse(self)
4343

@@ -127,7 +127,7 @@ def with_raw_response(self) -> AsyncInvitationsResourceWithRawResponse:
127127
This property can be used as a prefix for any HTTP method call to return
128128
the raw response object instead of the parsed content.
129129
130-
For more information, see https://www.github.com/keycardai/keycard-python#accessing-raw-response-data-eg-headers
130+
For more information, see https://www.github.com/keycardlabs/keycard-python#accessing-raw-response-data-eg-headers
131131
"""
132132
return AsyncInvitationsResourceWithRawResponse(self)
133133

@@ -136,7 +136,7 @@ def with_streaming_response(self) -> AsyncInvitationsResourceWithStreamingRespon
136136
"""
137137
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
138138
139-
For more information, see https://www.github.com/keycardai/keycard-python#with_streaming_response
139+
For more information, see https://www.github.com/keycardlabs/keycard-python#with_streaming_response
140140
"""
141141
return AsyncInvitationsResourceWithStreamingResponse(self)
142142

0 commit comments

Comments
 (0)