open-agent-docs 0.3.0__py3-none-any.whl
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.
- open_agent_docs/__init__.py +86 -0
- open_agent_docs/_base_client.py +667 -0
- open_agent_docs/_client.py +112 -0
- open_agent_docs/_embed.py +83 -0
- open_agent_docs/_errors.py +206 -0
- open_agent_docs/_files.py +51 -0
- open_agent_docs/_generated/__init__.py +2 -0
- open_agent_docs/_generated/models.py +1378 -0
- open_agent_docs/_generated/resources.py +4300 -0
- open_agent_docs/_models.py +17 -0
- open_agent_docs/_pagination.py +132 -0
- open_agent_docs/_server.py +330 -0
- open_agent_docs/_sse.py +335 -0
- open_agent_docs/_types.py +35 -0
- open_agent_docs/_utils.py +15 -0
- open_agent_docs/_version.py +1 -0
- open_agent_docs/_webhook.py +85 -0
- open_agent_docs/py.typed +0 -0
- open_agent_docs/types.py +3 -0
- open_agent_docs-0.3.0.dist-info/METADATA +266 -0
- open_agent_docs-0.3.0.dist-info/RECORD +22 -0
- open_agent_docs-0.3.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""Open Agent Docs 的 Python SDK。
|
|
2
|
+
|
|
3
|
+
```python
|
|
4
|
+
import open_agent_docs as oad
|
|
5
|
+
|
|
6
|
+
client = oad.Client(base_url="http://127.0.0.1:8848", token="oad_…")
|
|
7
|
+
ws = client.default_workspace()
|
|
8
|
+
page = client.pages.create(ws, title="周报", markdown="# 本周\\n\\n正文")
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- Client / AsyncClient:方法名见 sdks/operations.json(client.pages.versions.list……)
|
|
12
|
+
- with_user:宿主后端替用户调(header / JWT)
|
|
13
|
+
- workspaces.events、agent.notifications.stream:事件流
|
|
14
|
+
- verify_webhook、sign_jwt、embed_url:webhook 验签、签 JWT、嵌入地址
|
|
15
|
+
- start:本地起服务器
|
|
16
|
+
- 模型(Page、Content……)都在这里,也在 open_agent_docs.types
|
|
17
|
+
"""
|
|
18
|
+
from ._base_client import SyncAPIClient, AsyncAPIClient
|
|
19
|
+
from ._client import AsyncClient, Client
|
|
20
|
+
from ._embed import embed_url, sign_jwt
|
|
21
|
+
from ._errors import (
|
|
22
|
+
APIConnectionError,
|
|
23
|
+
APIError,
|
|
24
|
+
APITimeoutError,
|
|
25
|
+
AuthenticationError,
|
|
26
|
+
BadGatewayError,
|
|
27
|
+
BadRequestError,
|
|
28
|
+
ConfigurationError,
|
|
29
|
+
ConflictError,
|
|
30
|
+
GoneError,
|
|
31
|
+
InternalServerError,
|
|
32
|
+
NotFoundError,
|
|
33
|
+
OADError,
|
|
34
|
+
PermissionDeniedError,
|
|
35
|
+
RateLimitError,
|
|
36
|
+
TooLargeError,
|
|
37
|
+
WebhookVerificationError,
|
|
38
|
+
)
|
|
39
|
+
from ._generated.models import * # noqa: F403
|
|
40
|
+
from ._generated import models as _models
|
|
41
|
+
from ._models import BaseModel
|
|
42
|
+
from ._pagination import AsyncCursorPage, AsyncPaginator, CursorPage
|
|
43
|
+
from ._server import Server, start
|
|
44
|
+
from ._sse import AsyncEventStream, Event, EventStream
|
|
45
|
+
from ._types import NOT_GIVEN, NotGiven
|
|
46
|
+
from ._version import __version__
|
|
47
|
+
from ._webhook import verify_webhook
|
|
48
|
+
|
|
49
|
+
__all__ = [
|
|
50
|
+
"__version__",
|
|
51
|
+
"Client",
|
|
52
|
+
"AsyncClient",
|
|
53
|
+
"SyncAPIClient",
|
|
54
|
+
"AsyncAPIClient",
|
|
55
|
+
"NOT_GIVEN",
|
|
56
|
+
"NotGiven",
|
|
57
|
+
"BaseModel",
|
|
58
|
+
"CursorPage",
|
|
59
|
+
"AsyncCursorPage",
|
|
60
|
+
"AsyncPaginator",
|
|
61
|
+
"Event",
|
|
62
|
+
"EventStream",
|
|
63
|
+
"AsyncEventStream",
|
|
64
|
+
"Server",
|
|
65
|
+
"start",
|
|
66
|
+
"sign_jwt",
|
|
67
|
+
"embed_url",
|
|
68
|
+
"verify_webhook",
|
|
69
|
+
"OADError",
|
|
70
|
+
"ConfigurationError",
|
|
71
|
+
"WebhookVerificationError",
|
|
72
|
+
"APIError",
|
|
73
|
+
"BadRequestError",
|
|
74
|
+
"AuthenticationError",
|
|
75
|
+
"PermissionDeniedError",
|
|
76
|
+
"NotFoundError",
|
|
77
|
+
"ConflictError",
|
|
78
|
+
"GoneError",
|
|
79
|
+
"TooLargeError",
|
|
80
|
+
"RateLimitError",
|
|
81
|
+
"InternalServerError",
|
|
82
|
+
"BadGatewayError",
|
|
83
|
+
"APIConnectionError",
|
|
84
|
+
"APITimeoutError",
|
|
85
|
+
]
|
|
86
|
+
__all__ += _models.__all__
|