loxtep 0.2.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.
- loxtep/__init__.py +68 -0
- loxtep/activity.py +82 -0
- loxtep/build.py +22 -0
- loxtep/catalog.py +48 -0
- loxtep/cli.py +650 -0
- loxtep/cli_config.py +296 -0
- loxtep/client.py +270 -0
- loxtep/codegen.py +277 -0
- loxtep/connect.py +14 -0
- loxtep/connectors.py +190 -0
- loxtep/context.py +16 -0
- loxtep/data_contracts.py +106 -0
- loxtep/data_products.py +614 -0
- loxtep/define.py +20 -0
- loxtep/discovery.py +148 -0
- loxtep/domains.py +80 -0
- loxtep/errors.py +230 -0
- loxtep/gateway_url.py +130 -0
- loxtep/http_client.py +244 -0
- loxtep/improvements.py +72 -0
- loxtep/instances.py +59 -0
- loxtep/meaning.py +12 -0
- loxtep/models.py +144 -0
- loxtep/observe.py +49 -0
- loxtep/observe_facade.py +36 -0
- loxtep/procedures.py +64 -0
- loxtep/process_intelligence.py +119 -0
- loxtep/project_context.py +109 -0
- loxtep/projects.py +345 -0
- loxtep/quality.py +73 -0
- loxtep/query.py +27 -0
- loxtep/queues.py +191 -0
- loxtep/review.py +19 -0
- loxtep/rstreams/__init__.py +28 -0
- loxtep/rstreams/config.py +96 -0
- loxtep/rstreams/reader.py +249 -0
- loxtep/rstreams/writer.py +251 -0
- loxtep/schemas.py +65 -0
- loxtep/sdk_ingest_bundle.py +192 -0
- loxtep/session.py +28 -0
- loxtep/standards.py +68 -0
- loxtep/targets.py +362 -0
- loxtep/templates.py +80 -0
- loxtep/thesaurus.py +110 -0
- loxtep/triggers.py +370 -0
- loxtep/workflows.py +285 -0
- loxtep/workspace.py +21 -0
- loxtep-0.2.0.dist-info/METADATA +372 -0
- loxtep-0.2.0.dist-info/RECORD +52 -0
- loxtep-0.2.0.dist-info/WHEEL +5 -0
- loxtep-0.2.0.dist-info/entry_points.txt +2 -0
- loxtep-0.2.0.dist-info/top_level.txt +1 -0
loxtep/__init__.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Loxtep Python SDK.
|
|
3
|
+
Grouped by the ingest → define → deliver journey: triggers, connectors, workflows,
|
|
4
|
+
data_products, schemas, quality, catalog, discovery, domains, standards,
|
|
5
|
+
data_contracts, targets. Plus advanced: projects, templates, instances, observe,
|
|
6
|
+
queues, metrics.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from .client import AsyncLoxtepClient, LoxtepClient
|
|
10
|
+
from .targets import AsyncTargetsApi, TargetsApi
|
|
11
|
+
from .triggers import AsyncTriggersApi, TriggersApi
|
|
12
|
+
from .errors import (
|
|
13
|
+
AuthenticationError,
|
|
14
|
+
AuthorizationError,
|
|
15
|
+
ConflictError,
|
|
16
|
+
LoxtepError,
|
|
17
|
+
NotFoundError,
|
|
18
|
+
RateLimitError,
|
|
19
|
+
ValidationError,
|
|
20
|
+
parse_http_error,
|
|
21
|
+
)
|
|
22
|
+
from .http_client import AsyncLoxtepHttpClient, LoxtepHttpClient, RateLimitInfo
|
|
23
|
+
from .sdk_ingest_bundle import (
|
|
24
|
+
SDK_INGEST_TEMPLATE_ID,
|
|
25
|
+
build_sdk_ingest_bundle,
|
|
26
|
+
build_sdk_ingest_local_package,
|
|
27
|
+
to_local_connector_entity,
|
|
28
|
+
)
|
|
29
|
+
from .models import (
|
|
30
|
+
DataProduct,
|
|
31
|
+
DataProductKind,
|
|
32
|
+
Target,
|
|
33
|
+
Trigger,
|
|
34
|
+
UsageMap,
|
|
35
|
+
UsageMapEdge,
|
|
36
|
+
UsageMapNode,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
__all__ = [
|
|
40
|
+
"AsyncLoxtepClient",
|
|
41
|
+
"LoxtepClient",
|
|
42
|
+
"LoxtepError",
|
|
43
|
+
"AuthenticationError",
|
|
44
|
+
"AuthorizationError",
|
|
45
|
+
"NotFoundError",
|
|
46
|
+
"ConflictError",
|
|
47
|
+
"ValidationError",
|
|
48
|
+
"RateLimitError",
|
|
49
|
+
"parse_http_error",
|
|
50
|
+
"LoxtepHttpClient",
|
|
51
|
+
"AsyncLoxtepHttpClient",
|
|
52
|
+
"RateLimitInfo",
|
|
53
|
+
"DataProduct",
|
|
54
|
+
"DataProductKind",
|
|
55
|
+
"Target",
|
|
56
|
+
"Trigger",
|
|
57
|
+
"TargetsApi",
|
|
58
|
+
"AsyncTargetsApi",
|
|
59
|
+
"TriggersApi",
|
|
60
|
+
"AsyncTriggersApi",
|
|
61
|
+
"UsageMap",
|
|
62
|
+
"UsageMapEdge",
|
|
63
|
+
"UsageMapNode",
|
|
64
|
+
"SDK_INGEST_TEMPLATE_ID",
|
|
65
|
+
"build_sdk_ingest_bundle",
|
|
66
|
+
"build_sdk_ingest_local_package",
|
|
67
|
+
"to_local_connector_entity",
|
|
68
|
+
]
|
loxtep/activity.py
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Activity API (activity / audit entries). list.
|
|
3
|
+
Internal / experimental — not part of the documented customer surface.
|
|
4
|
+
Backend: /ai/activity.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional
|
|
8
|
+
|
|
9
|
+
from .http_client import AsyncLoxtepHttpClient, LoxtepHttpClient
|
|
10
|
+
|
|
11
|
+
BASE = "/ai/activity"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _unwrap(res: Any) -> Any:
|
|
15
|
+
return res.get("data", res) if isinstance(res, dict) else res
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _query_string(params: dict[str, Any]) -> str:
|
|
19
|
+
parts = [f"{k}={v}" for k, v in params.items() if v is not None]
|
|
20
|
+
return "?" + "&".join(parts) if parts else ""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ActivityApi:
|
|
24
|
+
"""Sync activity surface (internal)."""
|
|
25
|
+
|
|
26
|
+
def __init__(self, http: LoxtepHttpClient) -> None:
|
|
27
|
+
self._http = http
|
|
28
|
+
|
|
29
|
+
def list(
|
|
30
|
+
self,
|
|
31
|
+
*,
|
|
32
|
+
source: Optional[str] = None,
|
|
33
|
+
actor: Optional[str] = None,
|
|
34
|
+
resource_type: Optional[str] = None,
|
|
35
|
+
start: Optional[str] = None,
|
|
36
|
+
end: Optional[str] = None,
|
|
37
|
+
limit: Optional[int] = None,
|
|
38
|
+
cursor: Optional[str] = None,
|
|
39
|
+
) -> dict[str, Any]:
|
|
40
|
+
qs = _query_string(
|
|
41
|
+
{
|
|
42
|
+
"source": source,
|
|
43
|
+
"actor": actor,
|
|
44
|
+
"resource_type": resource_type,
|
|
45
|
+
"start": start,
|
|
46
|
+
"end": end,
|
|
47
|
+
"limit": limit,
|
|
48
|
+
"cursor": cursor,
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
return _unwrap(self._http.get(f"{BASE}{qs}"))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class AsyncActivityApi:
|
|
55
|
+
"""Async activity surface (internal)."""
|
|
56
|
+
|
|
57
|
+
def __init__(self, http: AsyncLoxtepHttpClient) -> None:
|
|
58
|
+
self._http = http
|
|
59
|
+
|
|
60
|
+
async def list(
|
|
61
|
+
self,
|
|
62
|
+
*,
|
|
63
|
+
source: Optional[str] = None,
|
|
64
|
+
actor: Optional[str] = None,
|
|
65
|
+
resource_type: Optional[str] = None,
|
|
66
|
+
start: Optional[str] = None,
|
|
67
|
+
end: Optional[str] = None,
|
|
68
|
+
limit: Optional[int] = None,
|
|
69
|
+
cursor: Optional[str] = None,
|
|
70
|
+
) -> dict[str, Any]:
|
|
71
|
+
qs = _query_string(
|
|
72
|
+
{
|
|
73
|
+
"source": source,
|
|
74
|
+
"actor": actor,
|
|
75
|
+
"resource_type": resource_type,
|
|
76
|
+
"start": start,
|
|
77
|
+
"end": end,
|
|
78
|
+
"limit": limit,
|
|
79
|
+
"cursor": cursor,
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
return _unwrap(await self._http.get(f"{BASE}{qs}"))
|
loxtep/build.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Build facade (MCP: loxtep_build)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from .data_products import DataProductsApi
|
|
9
|
+
from .targets import TargetsApi
|
|
10
|
+
from .triggers import TriggersApi
|
|
11
|
+
from .workflows import WorkflowsApi
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass
|
|
15
|
+
class BuildFacade:
|
|
16
|
+
workflows: WorkflowsApi
|
|
17
|
+
triggers: TriggersApi
|
|
18
|
+
data_products: DataProductsApi
|
|
19
|
+
targets: TargetsApi
|
|
20
|
+
|
|
21
|
+
def get_writer(self, workflow_id: str, **options: Any) -> Any:
|
|
22
|
+
return self.workflows.get_writer(workflow_id, **options)
|
loxtep/catalog.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Catalog (search) API. search.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from .http_client import AsyncLoxtepHttpClient, LoxtepHttpClient
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _query_string(params: dict[str, Any]) -> str:
|
|
11
|
+
parts = [f"{k}={v}" for k, v in params.items() if v is not None]
|
|
12
|
+
return "?" + "&".join(parts) if parts else ""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CatalogApi:
|
|
16
|
+
"""Sync catalog surface."""
|
|
17
|
+
|
|
18
|
+
def __init__(self, http: LoxtepHttpClient) -> None:
|
|
19
|
+
self._http = http
|
|
20
|
+
|
|
21
|
+
def search(
|
|
22
|
+
self,
|
|
23
|
+
query: str,
|
|
24
|
+
*,
|
|
25
|
+
type: str = "data_product",
|
|
26
|
+
limit: int = 20,
|
|
27
|
+
offset: int = 0,
|
|
28
|
+
) -> dict[str, Any]:
|
|
29
|
+
qs = _query_string({"q": query, "type": type, "limit": limit, "offset": offset})
|
|
30
|
+
return self._http.get(f"/search{qs}")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class AsyncCatalogApi:
|
|
34
|
+
"""Async catalog surface."""
|
|
35
|
+
|
|
36
|
+
def __init__(self, http: AsyncLoxtepHttpClient) -> None:
|
|
37
|
+
self._http = http
|
|
38
|
+
|
|
39
|
+
async def search(
|
|
40
|
+
self,
|
|
41
|
+
query: str,
|
|
42
|
+
*,
|
|
43
|
+
type: str = "data_product",
|
|
44
|
+
limit: int = 20,
|
|
45
|
+
offset: int = 0,
|
|
46
|
+
) -> dict[str, Any]:
|
|
47
|
+
qs = _query_string({"q": query, "type": type, "limit": limit, "offset": offset})
|
|
48
|
+
return await self._http.get(f"/search{qs}")
|