teamver-sdk-core
Shared async HTTP core for Teamver Python SDKs: transport, unified errors, retry, request context, pagination, and secret masking.
Used by teamver-mail-agent, teamver-agent-sdk, and other Teamver packages.
변경 이력
| 일시 (KST) | 변경 내용 |
|---|---|
| 2026-08-02 22:55 | production API host defaults (defaults.py) 추가 |
Install
pip install teamver-sdk-core
Python ≥ 3.11.
Quick start
import asyncio
from teamver_sdk_core import (
TeamverAsyncTransport,
TransportConfig,
RequestContext,
TeamverSDKError,
)
async def main():
config = TransportConfig(base_url="https://api.teamver.com", token="tv_ak_…")
async with TeamverAsyncTransport(config) as transport:
ctx = RequestContext(workspace_id="WS-…")
try:
resp = await transport.request("GET", "/api/v2/collab/channels", context=ctx)
print(resp.json)
except TeamverSDKError as exc:
print(exc.code, exc.status_code, exc.request_id)
asyncio.run(main())
Features
| Module | Role |
|---|---|
defaults |
Production API hosts: https://api.teamver.com, https://agent-api.teamver.com, https://mail-api.teamver.com |
transport |
TeamverAsyncTransport — httpx async requests, retry, error normalization |
errors |
TeamverSDKError tree + error_for_status / parse_error_body |
retry |
RetryPolicy — safe retries (non-idempotent POST needs idempotency_key) |
context |
RequestContext — request_id / correlation_id |
pagination |
cursor iterate_pages |
masking |
mask tokens / Bearer / internal keys in logs |
Default API hosts (SSOT)
| Constant | Host | Used by |
|---|---|---|
DEFAULT_MAIN_API_BASE |
https://api.teamver.com |
channel/Drive/DM, be-sdk, app-sdk |
DEFAULT_AGENT_API_BASE |
https://agent-api.teamver.com |
agent-sdk jobs/heartbeat |
DEFAULT_MAIL_API_BASE |
https://mail-api.teamver.com |
mail-agent, agent-sdk mail |
No path suffix (/api, /v1). Override per package via env.
Error tree
TeamverSDKError
├─ ConfigurationError
├─ AuthenticationError (401)
├─ AuthorizationError (403)
├─ NotFoundError (404)
├─ ConflictError (409)
│ ├─ IdempotencyConflictError
│ └─ VersionConflictError
├─ RateLimitError (429)
├─ TemporaryUnavailableError (502/503/504)
└─ TransportError
Retry rules
- Retried: transport failure,
429,502,503,504 GET/HEAD/PUT/DELETE— treated as idempotentPOST/PATCH— retried only whenidempotency_keyis set
Documentation
Public docs: github.com/NeuralStudioKr/teamver-sdk-docs/tree/main/sdk-core
Development
pip install -e ".[dev]"
pytest
License
MIT — see LICENSE.
Release files for teamver-sdk-core 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| teamver_sdk_core-0.1.3.tar.gz | 14.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| teamver_sdk_core-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.7 kB
Release files / teamver_sdk_core-0.1.3.tar.gz
| Download URL | teamver_sdk_core-0.1.3.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb3c67542a0de83c267e0bcbfc5458bc435a89561c935d194eeda1c5eafc52bb
|
|
BLAKE2b-256 checksum How to use checksums |
deedaa5ee915037b7a01e3b2b6a3569b99537840352747dec571b10400c53ed7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|
Release files / teamver_sdk_core-0.1.3-py3-none-any.whl
| Download URL | teamver_sdk_core-0.1.3-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e33d1937c1632f2dec0d31ddc032bffe57959a15162cd4a0631a799362663463
|
|
BLAKE2b-256 checksum How to use checksums |
317b8992bb6b083ceb7aa8a6d7810207ecab448124a3f170935f53ee9c9c7506
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|