latchgate 0.1.4__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.
- latchgate/__init__.py +61 -0
- latchgate/_client.py +664 -0
- latchgate/_crypto.py +228 -0
- latchgate/_exceptions.py +117 -0
- latchgate/_models.py +211 -0
- latchgate-0.1.4.dist-info/METADATA +202 -0
- latchgate-0.1.4.dist-info/RECORD +9 -0
- latchgate-0.1.4.dist-info/WHEEL +4 -0
- latchgate-0.1.4.dist-info/licenses/LICENSE +201 -0
latchgate/__init__.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""LatchGate Python SDK.
|
|
2
|
+
|
|
3
|
+
Minimal async client for the LatchGate action authorization gateway.
|
|
4
|
+
|
|
5
|
+
Quick start::
|
|
6
|
+
|
|
7
|
+
from latchgate import LatchGateClient
|
|
8
|
+
|
|
9
|
+
# Production (UDS — auto-discovers socket via $XDG_RUNTIME_DIR):
|
|
10
|
+
async with LatchGateClient(agent_id="my-agent") as client:
|
|
11
|
+
result = await client.execute("http_fetch", {"url": "https://api.example.com"})
|
|
12
|
+
|
|
13
|
+
# Dev mode (TCP):
|
|
14
|
+
async with LatchGateClient(base_url="http://localhost:3000", agent_id="my-agent") as client:
|
|
15
|
+
result = await client.execute("http_fetch", {"url": "https://api.example.com"})
|
|
16
|
+
|
|
17
|
+
See the README for full documentation.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from latchgate._client import LatchGateClient
|
|
21
|
+
from latchgate._exceptions import (
|
|
22
|
+
LatchGateApprovalRequired,
|
|
23
|
+
LatchGateAuthError,
|
|
24
|
+
LatchGateBudgetExhausted,
|
|
25
|
+
LatchGateDenied,
|
|
26
|
+
LatchGateError,
|
|
27
|
+
LatchGateLeaseExpired,
|
|
28
|
+
LatchGateNotConnected,
|
|
29
|
+
LatchGateReplayDetected,
|
|
30
|
+
LatchGateTransportError,
|
|
31
|
+
LatchGateUnavailable,
|
|
32
|
+
)
|
|
33
|
+
from latchgate._models import (
|
|
34
|
+
ActionResult,
|
|
35
|
+
ApprovalStatus,
|
|
36
|
+
EgressProfile,
|
|
37
|
+
ExecutionReceipt,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
__all__ = [
|
|
41
|
+
# Client
|
|
42
|
+
"LatchGateClient",
|
|
43
|
+
# Models
|
|
44
|
+
"ActionResult",
|
|
45
|
+
"ApprovalStatus",
|
|
46
|
+
"EgressProfile",
|
|
47
|
+
"ExecutionReceipt",
|
|
48
|
+
# Exceptions
|
|
49
|
+
"LatchGateError",
|
|
50
|
+
"LatchGateDenied",
|
|
51
|
+
"LatchGateApprovalRequired",
|
|
52
|
+
"LatchGateBudgetExhausted",
|
|
53
|
+
"LatchGateAuthError",
|
|
54
|
+
"LatchGateLeaseExpired",
|
|
55
|
+
"LatchGateReplayDetected",
|
|
56
|
+
"LatchGateUnavailable",
|
|
57
|
+
"LatchGateTransportError",
|
|
58
|
+
"LatchGateNotConnected",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
__version__ = "0.1.0"
|