kraph 0.1.89__tar.gz
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.
- kraph-0.1.89/PKG-INFO +14 -0
- kraph-0.1.89/fluss_next/__arkitekt__.py +52 -0
- kraph-0.1.89/fluss_next/__init__.py +3 -0
- kraph-0.1.89/fluss_next/__rekuest__.py +34 -0
- kraph-0.1.89/fluss_next/api/__pycache__/schema.cpython-311.pyc +0 -0
- kraph-0.1.89/fluss_next/api/__pycache__/schema.cpython-312.pyc +0 -0
- kraph-0.1.89/fluss_next/api/schema.py +1829 -0
- kraph-0.1.89/fluss_next/errors.py +2 -0
- kraph-0.1.89/fluss_next/fluss.py +11 -0
- kraph-0.1.89/fluss_next/funcs.py +37 -0
- kraph-0.1.89/fluss_next/rath.py +38 -0
- kraph-0.1.89/fluss_next/scalars.py +160 -0
- kraph-0.1.89/fluss_next/structures.py +1 -0
- kraph-0.1.89/fluss_next/traits.py +88 -0
- kraph-0.1.89/fluss_next/utils.py +16 -0
- kraph-0.1.89/pyproject.toml +35 -0
kraph-0.1.89/PKG-INFO
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: kraph
|
|
3
|
+
Version: 0.1.89
|
|
4
|
+
Summary:
|
|
5
|
+
Author: jhnnsrs
|
|
6
|
+
Author-email: jhnnsrs@gmail.com
|
|
7
|
+
Requires-Python: >=3.8,<4.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Requires-Dist: rath (>=1.0.0)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from fluss_next.fluss import Fluss
|
|
2
|
+
from fluss_next.rath import FlussLinkComposition, FlussRath
|
|
3
|
+
from rath.links.split import SplitLink
|
|
4
|
+
from fakts_next.contrib.rath.aiohttp import FaktsAIOHttpLink
|
|
5
|
+
from fakts_next.contrib.rath.graphql_ws import FaktsGraphQLWSLink
|
|
6
|
+
from herre_next.contrib.rath.auth_link import HerreAuthLink
|
|
7
|
+
from graphql import OperationType
|
|
8
|
+
from herre_next import Herre
|
|
9
|
+
from fakts_next import Fakts
|
|
10
|
+
|
|
11
|
+
from arkitekt_next.base_models import Manifest
|
|
12
|
+
|
|
13
|
+
from arkitekt_next.service_registry import (
|
|
14
|
+
Params,
|
|
15
|
+
)
|
|
16
|
+
from arkitekt_next.base_models import Requirement
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def init_services(service_builder_registry):
|
|
20
|
+
|
|
21
|
+
class ArkitektNextFluss(Fluss):
|
|
22
|
+
rath: FlussRath
|
|
23
|
+
|
|
24
|
+
def build_arkitekt_next_fluss(
|
|
25
|
+
fakts: Fakts, herre: Herre, params: Params, manifest: Manifest
|
|
26
|
+
):
|
|
27
|
+
return ArkitektNextFluss(
|
|
28
|
+
rath=FlussRath(
|
|
29
|
+
link=FlussLinkComposition(
|
|
30
|
+
auth=HerreAuthLink(herre=herre),
|
|
31
|
+
split=SplitLink(
|
|
32
|
+
left=FaktsAIOHttpLink(
|
|
33
|
+
fakts_group="fluss", fakts=fakts, endpoint_url="FAKE_URL"
|
|
34
|
+
),
|
|
35
|
+
right=FaktsGraphQLWSLink(
|
|
36
|
+
fakts_group="fluss", fakts=fakts, ws_endpoint_url="FAKE_URL"
|
|
37
|
+
),
|
|
38
|
+
split=lambda o: o.node.operation != OperationType.SUBSCRIPTION,
|
|
39
|
+
),
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
service_builder_registry.register(
|
|
45
|
+
"fluss",
|
|
46
|
+
build_arkitekt_next_fluss,
|
|
47
|
+
Requirement(
|
|
48
|
+
key="fluss",
|
|
49
|
+
service="live.arkitekt.fluss",
|
|
50
|
+
description="An instance of ArkitektNext fluss to retrieve graphs from",
|
|
51
|
+
),
|
|
52
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
def register_structures(structure_reg):
|
|
2
|
+
from rekuest_next.structures.default import (
|
|
3
|
+
get_default_structure_registry,
|
|
4
|
+
PortScope,
|
|
5
|
+
id_shrink,
|
|
6
|
+
)
|
|
7
|
+
from rekuest_next.widgets import SearchWidget
|
|
8
|
+
|
|
9
|
+
from fluss_next.api.schema import (
|
|
10
|
+
FlowFragment,
|
|
11
|
+
SearchFlowsQuery,
|
|
12
|
+
aget_flow,
|
|
13
|
+
RunFragment,
|
|
14
|
+
arun,
|
|
15
|
+
SearchRunsQuery,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
structure_reg = get_default_structure_registry()
|
|
19
|
+
structure_reg.register_as_structure(
|
|
20
|
+
FlowFragment,
|
|
21
|
+
identifier="@fluss/flow",
|
|
22
|
+
scope=PortScope.GLOBAL,
|
|
23
|
+
aexpand=aget_flow,
|
|
24
|
+
ashrink=id_shrink,
|
|
25
|
+
default_widget=SearchWidget(query=SearchFlowsQuery.Meta.document, ward="fluss"),
|
|
26
|
+
)
|
|
27
|
+
structure_reg.register_as_structure(
|
|
28
|
+
RunFragment,
|
|
29
|
+
identifier="@fluss/run",
|
|
30
|
+
scope=PortScope.GLOBAL,
|
|
31
|
+
aexpand=arun,
|
|
32
|
+
ashrink=id_shrink,
|
|
33
|
+
default_widget=SearchWidget(query=SearchRunsQuery.Meta.document, ward="fluss"),
|
|
34
|
+
)
|
|
Binary file
|
|
Binary file
|