qurl-python 0.2.2__py3-none-any.whl → 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.
- layerv_qurl/__init__.py +0 -4
- layerv_qurl/_utils.py +0 -19
- layerv_qurl/async_client.py +0 -29
- layerv_qurl/client.py +0 -29
- layerv_qurl/types.py +0 -20
- {qurl_python-0.2.2.dist-info → qurl_python-0.3.0.dist-info}/METADATA +3 -2
- qurl_python-0.3.0.dist-info/RECORD +12 -0
- {qurl_python-0.2.2.dist-info → qurl_python-0.3.0.dist-info}/WHEEL +1 -1
- qurl_python-0.2.2.dist-info/RECORD +0 -12
- {qurl_python-0.2.2.dist-info → qurl_python-0.3.0.dist-info}/licenses/LICENSE +0 -0
layerv_qurl/__init__.py
CHANGED
|
@@ -31,7 +31,6 @@ from layerv_qurl.types import (
|
|
|
31
31
|
AccessGrant,
|
|
32
32
|
AccessPolicy,
|
|
33
33
|
AccessToken,
|
|
34
|
-
AgentBootstrapOutput,
|
|
35
34
|
AIAgentPolicy,
|
|
36
35
|
APIKey,
|
|
37
36
|
APIKeyListOutput,
|
|
@@ -57,7 +56,6 @@ from layerv_qurl.types import (
|
|
|
57
56
|
InvoiceListOutput,
|
|
58
57
|
ListOutput,
|
|
59
58
|
MintOutput,
|
|
60
|
-
NHPServerPeerInfo,
|
|
61
59
|
Portal,
|
|
62
60
|
PortalSession,
|
|
63
61
|
Quota,
|
|
@@ -108,7 +106,6 @@ __all__ = [
|
|
|
108
106
|
"AccessCode",
|
|
109
107
|
"AccessCodeListOutput",
|
|
110
108
|
"AIAgentPolicy",
|
|
111
|
-
"AgentBootstrapOutput",
|
|
112
109
|
"APIKey",
|
|
113
110
|
"APIKeyListOutput",
|
|
114
111
|
"BatchCreateItem",
|
|
@@ -130,7 +127,6 @@ __all__ = [
|
|
|
130
127
|
"DomainVerifyOutput",
|
|
131
128
|
"Invoice",
|
|
132
129
|
"InvoiceListOutput",
|
|
133
|
-
"NHPServerPeerInfo",
|
|
134
130
|
"Portal",
|
|
135
131
|
"PortalSession",
|
|
136
132
|
"QuotaPlan",
|
layerv_qurl/_utils.py
CHANGED
|
@@ -43,7 +43,6 @@ from layerv_qurl.types import (
|
|
|
43
43
|
AccessGrant,
|
|
44
44
|
AccessPolicy,
|
|
45
45
|
AccessToken,
|
|
46
|
-
AgentBootstrapOutput,
|
|
47
46
|
AIAgentPolicy,
|
|
48
47
|
APIKey,
|
|
49
48
|
APIKeyListOutput,
|
|
@@ -68,7 +67,6 @@ from layerv_qurl.types import (
|
|
|
68
67
|
InvoiceListOutput,
|
|
69
68
|
ListOutput,
|
|
70
69
|
MintOutput,
|
|
71
|
-
NHPServerPeerInfo,
|
|
72
70
|
Portal,
|
|
73
71
|
PortalSession,
|
|
74
72
|
Quota,
|
|
@@ -992,7 +990,6 @@ def _parse_rate_limits(data: dict[str, Any] | None) -> RateLimits | None:
|
|
|
992
990
|
list_per_minute=data.get("list_per_minute", 0),
|
|
993
991
|
resolve_per_minute=data.get("resolve_per_minute", 0),
|
|
994
992
|
max_active_qurls=data.get("max_active_qurls", 0),
|
|
995
|
-
max_tokens_per_qurl=data.get("max_tokens_per_qurl", 0),
|
|
996
993
|
max_expiry_seconds=data.get("max_expiry_seconds", 0),
|
|
997
994
|
)
|
|
998
995
|
|
|
@@ -1439,22 +1436,6 @@ def parse_connector_installation_list_output(
|
|
|
1439
1436
|
)
|
|
1440
1437
|
|
|
1441
1438
|
|
|
1442
|
-
def parse_agent_bootstrap_output(data: dict[str, Any]) -> AgentBootstrapOutput:
|
|
1443
|
-
"""Parse connector agent bootstrap output."""
|
|
1444
|
-
raw_peer = data.get("nhp_server_peer")
|
|
1445
|
-
peer = raw_peer if isinstance(raw_peer, dict) else {}
|
|
1446
|
-
return AgentBootstrapOutput(
|
|
1447
|
-
agent_id=data.get("agent_id", ""),
|
|
1448
|
-
registered_at=_parse_dt(data.get("registered_at")),
|
|
1449
|
-
nhp_server_peer=NHPServerPeerInfo(
|
|
1450
|
-
public_key_b64=peer.get("public_key_b64", ""),
|
|
1451
|
-
host=peer.get("host", ""),
|
|
1452
|
-
port=peer.get("port", 0),
|
|
1453
|
-
expire_time=peer.get("expire_time", 0),
|
|
1454
|
-
),
|
|
1455
|
-
)
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
1439
|
def _validate_batch_create_shape(data: Any) -> None:
|
|
1459
1440
|
"""Defense-in-depth structural check for batch_create responses.
|
|
1460
1441
|
|
layerv_qurl/async_client.py
CHANGED
|
@@ -35,7 +35,6 @@ from layerv_qurl._utils import (
|
|
|
35
35
|
parse_access_code,
|
|
36
36
|
parse_access_code_list_output,
|
|
37
37
|
parse_access_token,
|
|
38
|
-
parse_agent_bootstrap_output,
|
|
39
38
|
parse_api_key,
|
|
40
39
|
parse_api_key_list_output,
|
|
41
40
|
parse_batch_create_output,
|
|
@@ -101,7 +100,6 @@ if TYPE_CHECKING:
|
|
|
101
100
|
AccessCodeListOutput,
|
|
102
101
|
AccessPolicy,
|
|
103
102
|
AccessToken,
|
|
104
|
-
AgentBootstrapOutput,
|
|
105
103
|
APIKey,
|
|
106
104
|
APIKeyListOutput,
|
|
107
105
|
BatchCreateItem,
|
|
@@ -1516,33 +1514,6 @@ class AsyncQURLClient:
|
|
|
1516
1514
|
)
|
|
1517
1515
|
return parse_connector_installation_list_output(data, meta)
|
|
1518
1516
|
|
|
1519
|
-
async def bootstrap_agent(
|
|
1520
|
-
self,
|
|
1521
|
-
*,
|
|
1522
|
-
public_key: str,
|
|
1523
|
-
agent_id: str | None = None,
|
|
1524
|
-
hostname: str | None = None,
|
|
1525
|
-
version: str | None = None,
|
|
1526
|
-
idempotency_key: str | None = None,
|
|
1527
|
-
) -> AgentBootstrapOutput:
|
|
1528
|
-
"""Bootstrap a LayerV qURL Connector agent."""
|
|
1529
|
-
validate_required_string(public_key, "public_key")
|
|
1530
|
-
body = build_body(
|
|
1531
|
-
{
|
|
1532
|
-
"public_key": public_key,
|
|
1533
|
-
"agent_id": agent_id,
|
|
1534
|
-
"hostname": hostname,
|
|
1535
|
-
"version": version,
|
|
1536
|
-
}
|
|
1537
|
-
)
|
|
1538
|
-
resp = await self._request(
|
|
1539
|
-
"POST",
|
|
1540
|
-
"/v1/agent/bootstrap",
|
|
1541
|
-
body=body,
|
|
1542
|
-
headers=idempotency_headers(idempotency_key),
|
|
1543
|
-
)
|
|
1544
|
-
return parse_agent_bootstrap_output(resp)
|
|
1545
|
-
|
|
1546
1517
|
# --- Internal HTTP plumbing ---
|
|
1547
1518
|
|
|
1548
1519
|
async def _request(
|
layerv_qurl/client.py
CHANGED
|
@@ -36,7 +36,6 @@ from layerv_qurl._utils import (
|
|
|
36
36
|
parse_access_code,
|
|
37
37
|
parse_access_code_list_output,
|
|
38
38
|
parse_access_token,
|
|
39
|
-
parse_agent_bootstrap_output,
|
|
40
39
|
parse_api_key,
|
|
41
40
|
parse_api_key_list_output,
|
|
42
41
|
parse_batch_create_output,
|
|
@@ -101,7 +100,6 @@ if TYPE_CHECKING:
|
|
|
101
100
|
AccessCodeListOutput,
|
|
102
101
|
AccessPolicy,
|
|
103
102
|
AccessToken,
|
|
104
|
-
AgentBootstrapOutput,
|
|
105
103
|
APIKey,
|
|
106
104
|
APIKeyListOutput,
|
|
107
105
|
BatchCreateItem,
|
|
@@ -1649,33 +1647,6 @@ class QURLClient:
|
|
|
1649
1647
|
)
|
|
1650
1648
|
return parse_connector_installation_list_output(data, meta)
|
|
1651
1649
|
|
|
1652
|
-
def bootstrap_agent(
|
|
1653
|
-
self,
|
|
1654
|
-
*,
|
|
1655
|
-
public_key: str,
|
|
1656
|
-
agent_id: str | None = None,
|
|
1657
|
-
hostname: str | None = None,
|
|
1658
|
-
version: str | None = None,
|
|
1659
|
-
idempotency_key: str | None = None,
|
|
1660
|
-
) -> AgentBootstrapOutput:
|
|
1661
|
-
"""Bootstrap a LayerV qURL Connector agent."""
|
|
1662
|
-
validate_required_string(public_key, "public_key")
|
|
1663
|
-
body = build_body(
|
|
1664
|
-
{
|
|
1665
|
-
"public_key": public_key,
|
|
1666
|
-
"agent_id": agent_id,
|
|
1667
|
-
"hostname": hostname,
|
|
1668
|
-
"version": version,
|
|
1669
|
-
}
|
|
1670
|
-
)
|
|
1671
|
-
resp = self._request(
|
|
1672
|
-
"POST",
|
|
1673
|
-
"/v1/agent/bootstrap",
|
|
1674
|
-
body=body,
|
|
1675
|
-
headers=idempotency_headers(idempotency_key),
|
|
1676
|
-
)
|
|
1677
|
-
return parse_agent_bootstrap_output(resp)
|
|
1678
|
-
|
|
1679
1650
|
# --- Internal HTTP plumbing ---
|
|
1680
1651
|
|
|
1681
1652
|
def _request(
|
layerv_qurl/types.py
CHANGED
|
@@ -218,7 +218,6 @@ class RateLimits:
|
|
|
218
218
|
list_per_minute: int = 0
|
|
219
219
|
resolve_per_minute: int = 0
|
|
220
220
|
max_active_qurls: int = 0
|
|
221
|
-
max_tokens_per_qurl: int = 0
|
|
222
221
|
max_expiry_seconds: int = 0
|
|
223
222
|
|
|
224
223
|
|
|
@@ -663,25 +662,6 @@ class ConnectorInstallationListOutput:
|
|
|
663
662
|
has_more: bool = False
|
|
664
663
|
|
|
665
664
|
|
|
666
|
-
@dataclass
|
|
667
|
-
class NHPServerPeerInfo:
|
|
668
|
-
"""NHP server peer info returned to connector agents."""
|
|
669
|
-
|
|
670
|
-
public_key_b64: str
|
|
671
|
-
host: str
|
|
672
|
-
port: int
|
|
673
|
-
expire_time: int
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
@dataclass
|
|
677
|
-
class AgentBootstrapOutput:
|
|
678
|
-
"""Response from connector agent bootstrap."""
|
|
679
|
-
|
|
680
|
-
agent_id: str
|
|
681
|
-
registered_at: datetime | None
|
|
682
|
-
nhp_server_peer: NHPServerPeerInfo
|
|
683
|
-
|
|
684
|
-
|
|
685
665
|
# ---- batch_create input shape -------------------------------------------
|
|
686
666
|
# TypedDicts for :meth:`QURLClient.batch_create` items. Split into a
|
|
687
667
|
# required-fields base class and an `total=False` subclass so callers on
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: qurl-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Python SDK for the qURL™ API — secure, time-limited access links. Quantum URL is how you enter the hidden layer of the internet.
|
|
5
5
|
Project-URL: Homepage, https://github.com/layervai/qurl-python
|
|
6
6
|
Project-URL: Repository, https://github.com/layervai/qurl-python
|
|
@@ -25,6 +25,7 @@ Requires-Dist: langchain-core<2,>=0.3; extra == 'dev'
|
|
|
25
25
|
Requires-Dist: mypy>=1.14; extra == 'dev'
|
|
26
26
|
Requires-Dist: pytest-asyncio>=0.25; extra == 'dev'
|
|
27
27
|
Requires-Dist: pytest>=8; extra == 'dev'
|
|
28
|
+
Requires-Dist: qurl-conformance<0.13,>=0.1.2; extra == 'dev'
|
|
28
29
|
Requires-Dist: respx>=0.22; extra == 'dev'
|
|
29
30
|
Requires-Dist: ruff>=0.11; extra == 'dev'
|
|
30
31
|
Provides-Extra: langchain
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
layerv_qurl/__init__.py,sha256=1PMfphJ3oAJm0VygtRg3lH2uH0NP1ruzkpJeErJJZkk,3795
|
|
2
|
+
layerv_qurl/_utils.py,sha256=kuVqz6F64s9sclIreg2hd7OVZet6VytiYXgxnBtrPhY,65316
|
|
3
|
+
layerv_qurl/async_client.py,sha256=2ap4aPZ0FfThnqjA2-P5bkyWpTYYqXC0yyu2D09QRFs,64703
|
|
4
|
+
layerv_qurl/client.py,sha256=w43jvXKUOyOS_Uta2ve7VfLz8VcM8ESMlwfO-QvFEFE,70582
|
|
5
|
+
layerv_qurl/errors.py,sha256=7vyBEsJnN-e7804hil9KRwEgmUv5QW-DUGTf6FdSaV0,4932
|
|
6
|
+
layerv_qurl/langchain.py,sha256=MJdow63lc6DXfL-riyu-rYC3cMiEKIOY9UZUvY4hEUQ,4695
|
|
7
|
+
layerv_qurl/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
layerv_qurl/types.py,sha256=ynn6LLoZcX9cQ_erMl5bJv_h6YHdeA1KDUHMaAVNQuE,18099
|
|
9
|
+
qurl_python-0.3.0.dist-info/METADATA,sha256=VHWfPZKV_qBzUkwzhP4xZQ5yZEHk5iG-2ayJh5gkGrM,13222
|
|
10
|
+
qurl_python-0.3.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
11
|
+
qurl_python-0.3.0.dist-info/licenses/LICENSE,sha256=cg6W6pLqMQFf89yPfz5ClnVSrNEeoTh3NOEQyH9CaZw,1069
|
|
12
|
+
qurl_python-0.3.0.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
layerv_qurl/__init__.py,sha256=nrIMkVysd1vLBj9p1TvFpz8JQFCA5al-lhCLyzIiiMk,3897
|
|
2
|
-
layerv_qurl/_utils.py,sha256=OdZWAKOwewxzlSEeimgmv2r9o8feQWU-idwGziJg-bI,66046
|
|
3
|
-
layerv_qurl/async_client.py,sha256=05wIEqQTPsTB8y8hYXXM0jP8EIrXb1pF4nEHcVp7Ntk,65599
|
|
4
|
-
layerv_qurl/client.py,sha256=yvH-RlAx19LYCghEQpV0uam-DcF5lvloW3UKTUkQaRo,71466
|
|
5
|
-
layerv_qurl/errors.py,sha256=7vyBEsJnN-e7804hil9KRwEgmUv5QW-DUGTf6FdSaV0,4932
|
|
6
|
-
layerv_qurl/langchain.py,sha256=MJdow63lc6DXfL-riyu-rYC3cMiEKIOY9UZUvY4hEUQ,4695
|
|
7
|
-
layerv_qurl/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
layerv_qurl/types.py,sha256=HhUFPS3TVxttXFyHGtUMvOPNLh7AZWQq6Uueq6o0pho,18490
|
|
9
|
-
qurl_python-0.2.2.dist-info/METADATA,sha256=qDL7LzO0BFobOEWSrLnPMzKLGYZcgfm9XKgl0cC_o00,13161
|
|
10
|
-
qurl_python-0.2.2.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
11
|
-
qurl_python-0.2.2.dist-info/licenses/LICENSE,sha256=cg6W6pLqMQFf89yPfz5ClnVSrNEeoTh3NOEQyH9CaZw,1069
|
|
12
|
-
qurl_python-0.2.2.dist-info/RECORD,,
|
|
File without changes
|