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.
Files changed (52) hide show
  1. loxtep/__init__.py +68 -0
  2. loxtep/activity.py +82 -0
  3. loxtep/build.py +22 -0
  4. loxtep/catalog.py +48 -0
  5. loxtep/cli.py +650 -0
  6. loxtep/cli_config.py +296 -0
  7. loxtep/client.py +270 -0
  8. loxtep/codegen.py +277 -0
  9. loxtep/connect.py +14 -0
  10. loxtep/connectors.py +190 -0
  11. loxtep/context.py +16 -0
  12. loxtep/data_contracts.py +106 -0
  13. loxtep/data_products.py +614 -0
  14. loxtep/define.py +20 -0
  15. loxtep/discovery.py +148 -0
  16. loxtep/domains.py +80 -0
  17. loxtep/errors.py +230 -0
  18. loxtep/gateway_url.py +130 -0
  19. loxtep/http_client.py +244 -0
  20. loxtep/improvements.py +72 -0
  21. loxtep/instances.py +59 -0
  22. loxtep/meaning.py +12 -0
  23. loxtep/models.py +144 -0
  24. loxtep/observe.py +49 -0
  25. loxtep/observe_facade.py +36 -0
  26. loxtep/procedures.py +64 -0
  27. loxtep/process_intelligence.py +119 -0
  28. loxtep/project_context.py +109 -0
  29. loxtep/projects.py +345 -0
  30. loxtep/quality.py +73 -0
  31. loxtep/query.py +27 -0
  32. loxtep/queues.py +191 -0
  33. loxtep/review.py +19 -0
  34. loxtep/rstreams/__init__.py +28 -0
  35. loxtep/rstreams/config.py +96 -0
  36. loxtep/rstreams/reader.py +249 -0
  37. loxtep/rstreams/writer.py +251 -0
  38. loxtep/schemas.py +65 -0
  39. loxtep/sdk_ingest_bundle.py +192 -0
  40. loxtep/session.py +28 -0
  41. loxtep/standards.py +68 -0
  42. loxtep/targets.py +362 -0
  43. loxtep/templates.py +80 -0
  44. loxtep/thesaurus.py +110 -0
  45. loxtep/triggers.py +370 -0
  46. loxtep/workflows.py +285 -0
  47. loxtep/workspace.py +21 -0
  48. loxtep-0.2.0.dist-info/METADATA +372 -0
  49. loxtep-0.2.0.dist-info/RECORD +52 -0
  50. loxtep-0.2.0.dist-info/WHEEL +5 -0
  51. loxtep-0.2.0.dist-info/entry_points.txt +2 -0
  52. 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}")