interhumanai 1.2.2__tar.gz → 1.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {interhumanai-1.2.2 → interhumanai-1.2.3}/CHANGELOG.md +5 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/PKG-INFO +1 -1
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/_version.py +1 -1
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/auth.py +7 -7
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/client.py +1 -1
- {interhumanai-1.2.2 → interhumanai-1.2.3}/.gitignore +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/LICENSE +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/README.md +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/pyproject.toml +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/__init__.py +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/_http.py +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/_sdk_metadata.py +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/_session_socket.py +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/config.py +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/errors.py +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/py.typed +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/realtime.py +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/stream.py +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/types.py +0 -0
- {interhumanai-1.2.2 → interhumanai-1.2.3}/src/interhumanai/upload.py +0 -0
|
@@ -5,6 +5,11 @@ All notable changes to `interhumanai` are documented here. The package follows
|
|
|
5
5
|
the TypeScript SDK (`@interhumanai/sdk`): both packages always carry the same
|
|
6
6
|
version and release together.
|
|
7
7
|
|
|
8
|
+
## 1.2.3
|
|
9
|
+
|
|
10
|
+
- Revised the reference documentation for authentication. Documentation only;
|
|
11
|
+
no behavior change.
|
|
12
|
+
|
|
8
13
|
## 1.2.2
|
|
9
14
|
|
|
10
15
|
- Corrected the reference docs for ``SessionConfigOptions.model``: it lists the models the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: interhumanai
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.3
|
|
4
4
|
Summary: First-party Python SDK for the Interhuman API: upload and stream social-signal analysis.
|
|
5
5
|
Project-URL: Homepage, https://docs.interhuman.ai
|
|
6
6
|
Project-URL: Repository, https://github.com/interhumanai/interhuman-api
|
|
@@ -20,7 +20,7 @@ DEFAULT_REFRESH_SKEW_SECONDS = 30.0
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class TokenResponse(BaseModel):
|
|
23
|
-
"""Response of
|
|
23
|
+
"""Response of a token request."""
|
|
24
24
|
|
|
25
25
|
access_token: str
|
|
26
26
|
token_type: str
|
|
@@ -48,7 +48,7 @@ def _scope_values(scopes: Sequence[Scope | str]) -> list[str]:
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
class AuthClient:
|
|
51
|
-
"""Client for the token endpoints (``/v1/
|
|
51
|
+
"""Client for the client-token endpoints (``/v1/client_tokens``).
|
|
52
52
|
|
|
53
53
|
Args:
|
|
54
54
|
environment: Named environment to call. Defaults to ``production``.
|
|
@@ -89,7 +89,7 @@ class AuthClient:
|
|
|
89
89
|
key_secret: str,
|
|
90
90
|
scopes: Sequence[Scope | str],
|
|
91
91
|
) -> TokenResponse:
|
|
92
|
-
"""
|
|
92
|
+
"""Authenticate with API key credentials for a short-lived session.
|
|
93
93
|
|
|
94
94
|
Args:
|
|
95
95
|
key_id: The API key id.
|
|
@@ -163,10 +163,10 @@ class AuthClient:
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
class TokenProvider(Protocol):
|
|
166
|
-
"""Anything that can produce a bearer
|
|
166
|
+
"""Anything that can produce a bearer credential on demand."""
|
|
167
167
|
|
|
168
168
|
async def get_token(self) -> str:
|
|
169
|
-
"""Return a currently valid bearer
|
|
169
|
+
"""Return a currently valid bearer credential."""
|
|
170
170
|
...
|
|
171
171
|
|
|
172
172
|
|
|
@@ -177,7 +177,7 @@ class StaticTokenProvider:
|
|
|
177
177
|
"""Store the token to hand out.
|
|
178
178
|
|
|
179
179
|
Args:
|
|
180
|
-
token: The
|
|
180
|
+
token: The client token or API key to return from :meth:`get_token`.
|
|
181
181
|
"""
|
|
182
182
|
self._token = token
|
|
183
183
|
|
|
@@ -224,7 +224,7 @@ class TokenManager:
|
|
|
224
224
|
self._lock = asyncio.Lock()
|
|
225
225
|
|
|
226
226
|
async def get_token(self) -> str:
|
|
227
|
-
"""Return a valid
|
|
227
|
+
"""Return a valid bearer credential, renewing it when needed."""
|
|
228
228
|
async with self._lock:
|
|
229
229
|
if self._token is not None and self._clock() < self._refresh_at:
|
|
230
230
|
return self._token
|
|
@@ -35,7 +35,7 @@ class InterhumanClient:
|
|
|
35
35
|
Args:
|
|
36
36
|
key_id: API key id (paired with ``key_secret``).
|
|
37
37
|
key_secret: API key secret.
|
|
38
|
-
access_token:
|
|
38
|
+
access_token: A client token, or your API key, used as-is.
|
|
39
39
|
scopes: Scopes requested when exchanging credentials. Defaults to
|
|
40
40
|
upload + stream. Ignored when ``access_token`` is used.
|
|
41
41
|
environment: Named environment to call. Defaults to ``production``.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|