arkitekt-next 0.7.8__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.

Potentially problematic release.


This version of arkitekt-next might be problematic. Click here for more details.

Files changed (118) hide show
  1. arkitekt_next-0.7.8/LICENSE +21 -0
  2. arkitekt_next-0.7.8/PKG-INFO +155 -0
  3. arkitekt_next-0.7.8/README.md +123 -0
  4. arkitekt_next-0.7.8/arkitekt_next/__init__.py +43 -0
  5. arkitekt_next-0.7.8/arkitekt_next/apps/__init__.py +3 -0
  6. arkitekt_next-0.7.8/arkitekt_next/apps/easy.py +99 -0
  7. arkitekt_next-0.7.8/arkitekt_next/apps/next.py +40 -0
  8. arkitekt_next-0.7.8/arkitekt_next/apps/qt.py +97 -0
  9. arkitekt_next-0.7.8/arkitekt_next/apps/service/__init__.py +3 -0
  10. arkitekt_next-0.7.8/arkitekt_next/apps/service/fakts.py +88 -0
  11. arkitekt_next-0.7.8/arkitekt_next/apps/service/fakts_next.py +79 -0
  12. arkitekt_next-0.7.8/arkitekt_next/apps/service/fakts_qt.py +82 -0
  13. arkitekt_next-0.7.8/arkitekt_next/apps/service/fluss_next.py +31 -0
  14. arkitekt_next-0.7.8/arkitekt_next/apps/service/grant_registry.py +27 -0
  15. arkitekt_next-0.7.8/arkitekt_next/apps/service/herre.py +24 -0
  16. arkitekt_next-0.7.8/arkitekt_next/apps/service/herre_qt.py +57 -0
  17. arkitekt_next-0.7.8/arkitekt_next/apps/service/kabinet.py +31 -0
  18. arkitekt_next-0.7.8/arkitekt_next/apps/service/mikro_next.py +81 -0
  19. arkitekt_next-0.7.8/arkitekt_next/apps/service/rekuest_next.py +53 -0
  20. arkitekt_next-0.7.8/arkitekt_next/apps/service/unlok_next.py +32 -0
  21. arkitekt_next-0.7.8/arkitekt_next/apps/types.py +53 -0
  22. arkitekt_next-0.7.8/arkitekt_next/builders.py +264 -0
  23. arkitekt_next-0.7.8/arkitekt_next/cli/__init__.py +0 -0
  24. arkitekt_next-0.7.8/arkitekt_next/cli/commands/call/__init__.py +0 -0
  25. arkitekt_next-0.7.8/arkitekt_next/cli/commands/call/local.py +132 -0
  26. arkitekt_next-0.7.8/arkitekt_next/cli/commands/call/main.py +22 -0
  27. arkitekt_next-0.7.8/arkitekt_next/cli/commands/call/remote.py +90 -0
  28. arkitekt_next-0.7.8/arkitekt_next/cli/commands/gen/__init__.py +0 -0
  29. arkitekt_next-0.7.8/arkitekt_next/cli/commands/gen/compile.py +45 -0
  30. arkitekt_next-0.7.8/arkitekt_next/cli/commands/gen/init.py +122 -0
  31. arkitekt_next-0.7.8/arkitekt_next/cli/commands/gen/main.py +29 -0
  32. arkitekt_next-0.7.8/arkitekt_next/cli/commands/gen/watch.py +32 -0
  33. arkitekt_next-0.7.8/arkitekt_next/cli/commands/init/__init__.py +0 -0
  34. arkitekt_next-0.7.8/arkitekt_next/cli/commands/init/main.py +194 -0
  35. arkitekt_next-0.7.8/arkitekt_next/cli/commands/inspect/__init__.py +0 -0
  36. arkitekt_next-0.7.8/arkitekt_next/cli/commands/inspect/definitions.py +53 -0
  37. arkitekt_next-0.7.8/arkitekt_next/cli/commands/inspect/main.py +22 -0
  38. arkitekt_next-0.7.8/arkitekt_next/cli/commands/inspect/variables.py +92 -0
  39. arkitekt_next-0.7.8/arkitekt_next/cli/commands/manifest/__init__.py +0 -0
  40. arkitekt_next-0.7.8/arkitekt_next/cli/commands/manifest/inspect.py +42 -0
  41. arkitekt_next-0.7.8/arkitekt_next/cli/commands/manifest/main.py +25 -0
  42. arkitekt_next-0.7.8/arkitekt_next/cli/commands/manifest/scopes.py +155 -0
  43. arkitekt_next-0.7.8/arkitekt_next/cli/commands/manifest/version.py +147 -0
  44. arkitekt_next-0.7.8/arkitekt_next/cli/commands/manifest/wizard.py +94 -0
  45. arkitekt_next-0.7.8/arkitekt_next/cli/commands/port/__init__.py +0 -0
  46. arkitekt_next-0.7.8/arkitekt_next/cli/commands/port/build.py +231 -0
  47. arkitekt_next-0.7.8/arkitekt_next/cli/commands/port/init.py +82 -0
  48. arkitekt_next-0.7.8/arkitekt_next/cli/commands/port/main.py +31 -0
  49. arkitekt_next-0.7.8/arkitekt_next/cli/commands/port/publish.py +102 -0
  50. arkitekt_next-0.7.8/arkitekt_next/cli/commands/port/stage.py +59 -0
  51. arkitekt_next-0.7.8/arkitekt_next/cli/commands/port/utils.py +47 -0
  52. arkitekt_next-0.7.8/arkitekt_next/cli/commands/port/validate.py +78 -0
  53. arkitekt_next-0.7.8/arkitekt_next/cli/commands/port/wizard.py +329 -0
  54. arkitekt_next-0.7.8/arkitekt_next/cli/commands/run/__init__.py +0 -0
  55. arkitekt_next-0.7.8/arkitekt_next/cli/commands/run/dev.py +349 -0
  56. arkitekt_next-0.7.8/arkitekt_next/cli/commands/run/main.py +22 -0
  57. arkitekt_next-0.7.8/arkitekt_next/cli/commands/run/prod.py +57 -0
  58. arkitekt_next-0.7.8/arkitekt_next/cli/commands/run/utils.py +10 -0
  59. arkitekt_next-0.7.8/arkitekt_next/cli/commands/server/__init__.py +0 -0
  60. arkitekt_next-0.7.8/arkitekt_next/cli/commands/server/down.py +56 -0
  61. arkitekt_next-0.7.8/arkitekt_next/cli/commands/server/init.py +74 -0
  62. arkitekt_next-0.7.8/arkitekt_next/cli/commands/server/inspect.py +59 -0
  63. arkitekt_next-0.7.8/arkitekt_next/cli/commands/server/main.py +33 -0
  64. arkitekt_next-0.7.8/arkitekt_next/cli/commands/server/open.py +66 -0
  65. arkitekt_next-0.7.8/arkitekt_next/cli/commands/server/remove.py +60 -0
  66. arkitekt_next-0.7.8/arkitekt_next/cli/commands/server/stop.py +56 -0
  67. arkitekt_next-0.7.8/arkitekt_next/cli/commands/server/up.py +70 -0
  68. arkitekt_next-0.7.8/arkitekt_next/cli/commands/server/utils.py +33 -0
  69. arkitekt_next-0.7.8/arkitekt_next/cli/configs/base.yaml +867 -0
  70. arkitekt_next-0.7.8/arkitekt_next/cli/constants.py +63 -0
  71. arkitekt_next-0.7.8/arkitekt_next/cli/dockerfiles/vanilla.dockerfile +8 -0
  72. arkitekt_next-0.7.8/arkitekt_next/cli/errors.py +4 -0
  73. arkitekt_next-0.7.8/arkitekt_next/cli/inspect.py +1 -0
  74. arkitekt_next-0.7.8/arkitekt_next/cli/io.py +255 -0
  75. arkitekt_next-0.7.8/arkitekt_next/cli/main.py +83 -0
  76. arkitekt_next-0.7.8/arkitekt_next/cli/options.py +166 -0
  77. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/fluss.schema.graphql +2446 -0
  78. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/gucker.schema.graphql +8908 -0
  79. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/kabinet.schema.graphql +515 -0
  80. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/kluster.schema.graphql +109 -0
  81. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/konviktion.schema.graphql +70 -0
  82. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/kuay.schema.graphql +356 -0
  83. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/mikro.schema.graphql +8908 -0
  84. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/mikro_next.schema.graphql +1639 -0
  85. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/napari.schema.graphql +8908 -0
  86. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/omero_ark.schema.graphql +100 -0
  87. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/port.schema.graphql +356 -0
  88. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/rekuest.schema.graphql +4630 -0
  89. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/rekuest_next.schema.graphql +1159 -0
  90. arkitekt_next-0.7.8/arkitekt_next/cli/schemas/unlok.schema.graphql +1013 -0
  91. arkitekt_next-0.7.8/arkitekt_next/cli/templates/filter.py +26 -0
  92. arkitekt_next-0.7.8/arkitekt_next/cli/templates/simple.py +67 -0
  93. arkitekt_next-0.7.8/arkitekt_next/cli/texts.py +20 -0
  94. arkitekt_next-0.7.8/arkitekt_next/cli/types.py +365 -0
  95. arkitekt_next-0.7.8/arkitekt_next/cli/ui.py +111 -0
  96. arkitekt_next-0.7.8/arkitekt_next/cli/utils.py +15 -0
  97. arkitekt_next-0.7.8/arkitekt_next/cli/validators.py +17 -0
  98. arkitekt_next-0.7.8/arkitekt_next/cli/vars.py +39 -0
  99. arkitekt_next-0.7.8/arkitekt_next/cli/versions/v1.yaml +1 -0
  100. arkitekt_next-0.7.8/arkitekt_next/constants.py +6 -0
  101. arkitekt_next-0.7.8/arkitekt_next/model.py +110 -0
  102. arkitekt_next-0.7.8/arkitekt_next/qt/__init__.py +9 -0
  103. arkitekt_next-0.7.8/arkitekt_next/qt/assets/dark/gear.png +0 -0
  104. arkitekt_next-0.7.8/arkitekt_next/qt/assets/dark/green pulse.gif +0 -0
  105. arkitekt_next-0.7.8/arkitekt_next/qt/assets/dark/orange pulse.gif +0 -0
  106. arkitekt_next-0.7.8/arkitekt_next/qt/assets/dark/pink pulse.gif +0 -0
  107. arkitekt_next-0.7.8/arkitekt_next/qt/assets/dark/red pulse.gif +0 -0
  108. arkitekt_next-0.7.8/arkitekt_next/qt/assets/light/gear.png +0 -0
  109. arkitekt_next-0.7.8/arkitekt_next/qt/assets/light/green pulse.gif +0 -0
  110. arkitekt_next-0.7.8/arkitekt_next/qt/assets/light/orange pulse.gif +0 -0
  111. arkitekt_next-0.7.8/arkitekt_next/qt/assets/light/pink pulse.gif +0 -0
  112. arkitekt_next-0.7.8/arkitekt_next/qt/assets/light/red pulse.gif +0 -0
  113. arkitekt_next-0.7.8/arkitekt_next/qt/magic_bar.py +545 -0
  114. arkitekt_next-0.7.8/arkitekt_next/qt/utils.py +30 -0
  115. arkitekt_next-0.7.8/arkitekt_next/service_registry.py +51 -0
  116. arkitekt_next-0.7.8/arkitekt_next/tqdm.py +43 -0
  117. arkitekt_next-0.7.8/arkitekt_next/utils.py +38 -0
  118. arkitekt_next-0.7.8/pyproject.toml +115 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Johannes Roos <jhnnsrs@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,155 @@
1
+ Metadata-Version: 2.1
2
+ Name: arkitekt-next
3
+ Version: 0.7.8
4
+ Summary: client for the arkitekt_next platform
5
+ License: MIT
6
+ Author: jhnnsrs
7
+ Author-email: jhnnsrs@gmail.com
8
+ Requires-Python: >=3.8,<4.0
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Provides-Extra: all
17
+ Provides-Extra: cli
18
+ Requires-Dist: dokker (>=0.1.21)
19
+ Requires-Dist: fakts (>=0.5.0)
20
+ Requires-Dist: fluss-next (>=0.1.61) ; extra == "all"
21
+ Requires-Dist: herre (>=0.4.3)
22
+ Requires-Dist: kabinet (>=0.1.19) ; extra == "all"
23
+ Requires-Dist: koil (>=0.3.6)
24
+ Requires-Dist: mikro-next (>=0.1.6) ; (python_version >= "3.10" and python_version < "4.0") and (extra == "all")
25
+ Requires-Dist: reaktion-next (>=0.1.50) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all")
26
+ Requires-Dist: rich-click (>=1.6.1) ; extra == "cli" or extra == "all"
27
+ Requires-Dist: semver (>=3.0.1) ; extra == "cli" or extra == "all"
28
+ Requires-Dist: turms (>=0.5.0) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "cli" or extra == "all")
29
+ Requires-Dist: watchfiles (>=0.18.1) ; extra == "cli" or extra == "all"
30
+ Description-Content-Type: text/markdown
31
+
32
+ # arkitekt_next
33
+
34
+ [![codecov](https://codecov.io/gh/jhnnsrs/arkitekt_next/branch/master/graph/badge.svg?token=UGXEA2THBV)](https://codecov.io/gh/jhnnsrs/arkitekt_next)
35
+ [![PyPI version](https://badge.fury.io/py/arkitekt_next.svg)](https://pypi.org/project/arkitekt_next/)
36
+ [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://pypi.org/project/arkitekt_next/)
37
+ ![Maintainer](https://img.shields.io/badge/maintainer-jhnnsrs-blue)
38
+ [![PyPI pyversions](https://img.shields.io/pypi/pyversions/arkitekt_next.svg)](https://pypi.python.org/pypi/arkitekt_next/)
39
+ [![PyPI status](https://img.shields.io/pypi/status/arkitekt_next.svg)](https://pypi.python.org/pypi/arkitekt_next/)
40
+
41
+ streaming analysis for mikroscopy
42
+
43
+ ## Idea
44
+
45
+ arkitekt_next is the python client for the arkitekt_next platform. It allows you to utilize the full extent of the platform from your python code.
46
+ To understand the idea behind arkitekt_next, you need to understand the idea behind the arkitekt_next platform.
47
+ (More on this in the [documentation](https://arkitekt_next.live))
48
+
49
+ ## Features
50
+
51
+ - Host your python functions and make them to your team
52
+ - Use functions from your team in your code
53
+ - Interact with and store data in a secure and scalable way on the platform
54
+ - Use the platform as a central storage for your data
55
+
56
+ ## Install
57
+
58
+ ```bash
59
+ pip install arkitekt_next[all]
60
+ ```
61
+
62
+ This installs all dependencies for the arkitekt_next platform, inlcuding the arkitekt_next CLI, which can be used to develop and create apps, containerize them and deploy t
63
+
64
+
65
+ arkitekt_next is relying heavily on asyncio patters and therfore supports python 3.8 and above. It also relies on the pydantic stack for serialization.
66
+
67
+
68
+ ## App
69
+
70
+ You can use the cli to create python based apps for the arkitekt_next platform, profiting from a battery of features like easy GUI creation based on
71
+ type annotations, orchestration of real-time (in memoery) workflows, data hosting, easy packaging and distribution in docker containers, etc...
72
+
73
+ To get started create a directory and run
74
+
75
+ ```bash
76
+ arkitekt_next init
77
+ ```
78
+
79
+ Which will lead you throught an app creation process.
80
+ Apps can simply registered functions, through the register decorator
81
+
82
+ ```python
83
+ from arkitekt_next import register
84
+
85
+ @register()
86
+ def rpc_function(x: int, name: str) -> str
87
+ """
88
+ A rpc function that we can
89
+ simple call from anywhere
90
+
91
+ ""
92
+
93
+ ```
94
+
95
+ And then connected to a local or remote server by running
96
+
97
+ Run example:
98
+
99
+ ```bash
100
+ arkitekt_next run dev
101
+ ```
102
+
103
+
104
+ For more details on how to create an app follow the tutorials on https://arkitekt_next.live.
105
+
106
+ ## Usage with complex Datastructures
107
+
108
+ ArkitektNext takes care of serialization and documentation of standard python datastructures
109
+
110
+ - str
111
+ - bool
112
+ - int
113
+ - float
114
+ - Enum
115
+ - Dict
116
+ - List
117
+
118
+ To increase performance and reduce latency it is not possible to serialize complex python objects like numpy arrays into the messages. These are best transformed into immutable objects on a centrally accessible storage and then only the reference is passed.
119
+
120
+ ArkitektNext does not impose any rules on how you handle this storage (see mikro for ideas), it provides however a simple api.
121
+
122
+ ```python
123
+
124
+ class ComplexStructure:
125
+ id: str # A reference for this structure on central storage
126
+
127
+ async def shrink(self):
128
+ return self.id
129
+
130
+ @classmethod
131
+ async def expand(cls, value):
132
+ return cls.load_from_server(value)
133
+
134
+
135
+ ```
136
+
137
+ by providing two functions:
138
+
139
+ - shrink
140
+ - expand
141
+
142
+ You can now use this Structure with simple typehints and arkitekt_next will automaticall shrink (serialize) and expand (deserialize) the structure on calling.
143
+
144
+ ```python
145
+
146
+ def complex_call(x: ComplexStrucuture) -> int:
147
+ return x.max()
148
+
149
+ ```
150
+
151
+
152
+
153
+ Check out the arkitekt_next [documentation](https://arkitekt_next.live) for usage of this libary
154
+
155
+
@@ -0,0 +1,123 @@
1
+ # arkitekt_next
2
+
3
+ [![codecov](https://codecov.io/gh/jhnnsrs/arkitekt_next/branch/master/graph/badge.svg?token=UGXEA2THBV)](https://codecov.io/gh/jhnnsrs/arkitekt_next)
4
+ [![PyPI version](https://badge.fury.io/py/arkitekt_next.svg)](https://pypi.org/project/arkitekt_next/)
5
+ [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://pypi.org/project/arkitekt_next/)
6
+ ![Maintainer](https://img.shields.io/badge/maintainer-jhnnsrs-blue)
7
+ [![PyPI pyversions](https://img.shields.io/pypi/pyversions/arkitekt_next.svg)](https://pypi.python.org/pypi/arkitekt_next/)
8
+ [![PyPI status](https://img.shields.io/pypi/status/arkitekt_next.svg)](https://pypi.python.org/pypi/arkitekt_next/)
9
+
10
+ streaming analysis for mikroscopy
11
+
12
+ ## Idea
13
+
14
+ arkitekt_next is the python client for the arkitekt_next platform. It allows you to utilize the full extent of the platform from your python code.
15
+ To understand the idea behind arkitekt_next, you need to understand the idea behind the arkitekt_next platform.
16
+ (More on this in the [documentation](https://arkitekt_next.live))
17
+
18
+ ## Features
19
+
20
+ - Host your python functions and make them to your team
21
+ - Use functions from your team in your code
22
+ - Interact with and store data in a secure and scalable way on the platform
23
+ - Use the platform as a central storage for your data
24
+
25
+ ## Install
26
+
27
+ ```bash
28
+ pip install arkitekt_next[all]
29
+ ```
30
+
31
+ This installs all dependencies for the arkitekt_next platform, inlcuding the arkitekt_next CLI, which can be used to develop and create apps, containerize them and deploy t
32
+
33
+
34
+ arkitekt_next is relying heavily on asyncio patters and therfore supports python 3.8 and above. It also relies on the pydantic stack for serialization.
35
+
36
+
37
+ ## App
38
+
39
+ You can use the cli to create python based apps for the arkitekt_next platform, profiting from a battery of features like easy GUI creation based on
40
+ type annotations, orchestration of real-time (in memoery) workflows, data hosting, easy packaging and distribution in docker containers, etc...
41
+
42
+ To get started create a directory and run
43
+
44
+ ```bash
45
+ arkitekt_next init
46
+ ```
47
+
48
+ Which will lead you throught an app creation process.
49
+ Apps can simply registered functions, through the register decorator
50
+
51
+ ```python
52
+ from arkitekt_next import register
53
+
54
+ @register()
55
+ def rpc_function(x: int, name: str) -> str
56
+ """
57
+ A rpc function that we can
58
+ simple call from anywhere
59
+
60
+ ""
61
+
62
+ ```
63
+
64
+ And then connected to a local or remote server by running
65
+
66
+ Run example:
67
+
68
+ ```bash
69
+ arkitekt_next run dev
70
+ ```
71
+
72
+
73
+ For more details on how to create an app follow the tutorials on https://arkitekt_next.live.
74
+
75
+ ## Usage with complex Datastructures
76
+
77
+ ArkitektNext takes care of serialization and documentation of standard python datastructures
78
+
79
+ - str
80
+ - bool
81
+ - int
82
+ - float
83
+ - Enum
84
+ - Dict
85
+ - List
86
+
87
+ To increase performance and reduce latency it is not possible to serialize complex python objects like numpy arrays into the messages. These are best transformed into immutable objects on a centrally accessible storage and then only the reference is passed.
88
+
89
+ ArkitektNext does not impose any rules on how you handle this storage (see mikro for ideas), it provides however a simple api.
90
+
91
+ ```python
92
+
93
+ class ComplexStructure:
94
+ id: str # A reference for this structure on central storage
95
+
96
+ async def shrink(self):
97
+ return self.id
98
+
99
+ @classmethod
100
+ async def expand(cls, value):
101
+ return cls.load_from_server(value)
102
+
103
+
104
+ ```
105
+
106
+ by providing two functions:
107
+
108
+ - shrink
109
+ - expand
110
+
111
+ You can now use this Structure with simple typehints and arkitekt_next will automaticall shrink (serialize) and expand (deserialize) the structure on calling.
112
+
113
+ ```python
114
+
115
+ def complex_call(x: ComplexStrucuture) -> int:
116
+ return x.max()
117
+
118
+ ```
119
+
120
+
121
+
122
+ Check out the arkitekt_next [documentation](https://arkitekt_next.live) for usage of this libary
123
+
@@ -0,0 +1,43 @@
1
+ def missing_install(name: str, error: Exception):
2
+ def real_missing_install(*args, **kwargs):
3
+ raise ImportError(
4
+ f"Missing import: {name}. Please install the missing package. "
5
+ ) from error
6
+
7
+ return real_missing_install
8
+
9
+
10
+ try:
11
+ from rekuest_next.register import register
12
+ from rekuest_next.agents.hooks import background
13
+ from rekuest_next.agents.hooks import startup
14
+ except ImportError as e:
15
+ raise e
16
+ register = missing_install("rekuest_next", e)
17
+ background = missing_install("rekuest_next", e)
18
+ startup = missing_install("rekuest_next", e)
19
+
20
+ from .builders import easy
21
+ from .apps.types import App
22
+
23
+ __all__ = [
24
+ "App",
25
+ "register",
26
+ "easy",
27
+ "publicqt",
28
+ "jupy",
29
+ "log",
30
+ "alog",
31
+ "progress",
32
+ "aprogress",
33
+ "scheduler",
34
+ "register_structure",
35
+ "group",
36
+ "useGuardian",
37
+ "useInstanceID",
38
+ "useUser",
39
+ "next",
40
+ "background",
41
+ "startup",
42
+ "register_next",
43
+ ]
@@ -0,0 +1,3 @@
1
+ from .types import App
2
+
3
+ __all__ = ["App"]
@@ -0,0 +1,99 @@
1
+ from .types import EasyApp
2
+ from typing import Optional, List
3
+
4
+
5
+ def build_arkitekt_app(
6
+ manifest: Manifest,
7
+ url=None,
8
+ no_cache=False,
9
+ headless=False,
10
+ instance_id=None,
11
+ token=None,
12
+ app_kind="development",
13
+ redeem_token=None,
14
+ ):
15
+ if redeem_token:
16
+ fakts = build_arkitekt_next_redeem_fakts_next(
17
+ manifest=manifest,
18
+ redeem_token=redeem_token,
19
+ url=url,
20
+ no_cache=no_cache,
21
+ headless=headless,
22
+ )
23
+ else:
24
+ fakts = build_arkitekt_next_fakts_next(
25
+ manifest=manifest,
26
+ url=url,
27
+ no_cache=no_cache,
28
+ headless=headless,
29
+ client_kind=app_kind,
30
+ )
31
+
32
+ herre = build_arkitekt_next_herre(fakts=fakts)
33
+
34
+ try:
35
+ from arkitekt_next_next.apps.service.rekuest_next import build_arkitekt_next_rekuest_next
36
+
37
+ rekuest = build_arkitekt_next_rekuest_next(
38
+ fakts=fakts, herre=herre, instance_id=instance_id
39
+ )
40
+ except ImportError as e:
41
+ rekuest = ImportException(import_exception=e, install_library="rekuest_next")
42
+
43
+ try:
44
+ from arkitekt_next_next.apps.service.mikro_next import build_arkitekt_next_mikro_next
45
+
46
+ mikro = build_arkitekt_next_mikro_next(fakts=fakts, herre=herre)
47
+ except ImportError as e:
48
+ raise e
49
+ mikro = ImportException(import_exception=e, install_library="mikro_next")
50
+
51
+ try:
52
+ from arkitekt_next_next.apps.service.fluss_next import build_arkitekt_next_fluss
53
+
54
+ fluss = build_arkitekt_next_fluss(herre=herre, fakts=fakts)
55
+ except ImportError as e:
56
+ raise e
57
+ fluss = ImportException(import_exception=e, install_library="fluss_next")
58
+
59
+ try:
60
+ from arkitekt_next_next.apps.service.unlok_next import build_arkitekt_next_unlok_next
61
+
62
+ unlok = build_arkitekt_next_unlok_next(herre=herre, fakts=fakts)
63
+ except ImportError as e:
64
+ raise e
65
+ fluss = ImportException(import_exception=e, install_library="fluss_next")
66
+
67
+ try:
68
+ from arkitekt_next_next.apps.service.omero_ark import build_arkitekt_next_omero_ark
69
+
70
+ omero_ark = build_arkitekt_next_omero_ark(herre=herre, fakts=fakts)
71
+ except ImportError as e:
72
+ omero_ark = ImportException(import_exception=e, install_library="omero_ark")
73
+
74
+ try:
75
+ from arkitekt_next_next.apps.service.kluster import build_arkitekt_next_kluster
76
+
77
+ kluster = build_arkitekt_next_kluster(herre=herre, fakts=fakts)
78
+ except ImportError as e:
79
+ kluster = ImportException(import_exception=e, install_library="kluster")
80
+
81
+ try:
82
+ from arkitekt_next_next.apps.service.kabinet import build_arkitekt_next_kabinet
83
+
84
+ kabinet = build_arkitekt_next_kabinet(herre=herre, fakts=fakts)
85
+ except ImportError as e:
86
+ kabinet = ImportException(import_exception=e, install_library="kluster")
87
+
88
+ return NextApp(
89
+ manifest=manifest,
90
+ fakts=fakts,
91
+ herre=herre,
92
+ rekuest=rekuest,
93
+ mikro=mikro,
94
+ kabinet=kabinet,
95
+ unlok=unlok,
96
+ fluss=fluss,
97
+ kluster=kluster,
98
+ omero_ark=omero_ark,
99
+ )
@@ -0,0 +1,40 @@
1
+ from arkitekt_next_next.apps.fallbacks import ImportException
2
+ from arkitekt_next_next.apps.service.fakts_next import (
3
+ build_arkitekt_next_fakts_next,
4
+ build_arkitekt_next_redeem_fakts_next,
5
+ )
6
+ from arkitekt_next_next.apps.service.herre import build_arkitekt_next_herre
7
+ from arkitekt_next_next.model import Manifest
8
+
9
+ from .types import NextApp
10
+
11
+
12
+ def build_next_app(
13
+ manifest: Manifest,
14
+ url=None,
15
+ no_cache=False,
16
+ headless=False,
17
+ instance_id=None,
18
+ token=None,
19
+ app_kind="development",
20
+ redeem_token=None,
21
+ ):
22
+ if redeem_token:
23
+ fakts = build_arkitekt_next_redeem_fakts_next(
24
+ manifest=manifest,
25
+ redeem_token=redeem_token,
26
+ url=url,
27
+ no_cache=no_cache,
28
+ headless=headless,
29
+ )
30
+ else:
31
+ fakts = build_arkitekt_next_fakts_next(
32
+ manifest=manifest,
33
+ url=url,
34
+ no_cache=no_cache,
35
+ headless=headless,
36
+ client_kind=app_kind,
37
+ )
38
+
39
+ herre = build_arkitekt_next_herre(fakts=fakts)
40
+
@@ -0,0 +1,97 @@
1
+ from arkitekt_next_next.model import Manifest
2
+ from arkitekt_next_next.apps.types import QtApp
3
+ from arkitekt_next_next.apps.fallbacks import ImportException, InstallModuleException
4
+ from typing import Any, Optional
5
+
6
+
7
+ def build_arkitekt_next_qt_app(
8
+ manifest: Manifest,
9
+ no_cache: bool = False,
10
+ instance_id: Optional[str] = None,
11
+ beacon_widget: Any = None,
12
+ login_widget: Any = None,
13
+ parent: Any = None,
14
+ settings: Any = None,
15
+ ):
16
+ try:
17
+ from koil.composition.qt import QtPedanticKoil
18
+ from qtpy import QtCore
19
+
20
+ settings = settings or QtCore.QSettings()
21
+ except ImportError as e:
22
+ raise InstallModuleException("Please install qtpy to use arkitekt_next_qt") from e
23
+
24
+ try:
25
+ from arkitekt_next_next.apps.service.fakts_qt import build_arkitekt_next_qt_fakts
26
+
27
+ fakts = build_arkitekt_next_qt_fakts(
28
+ manifest=manifest,
29
+ no_cache=no_cache,
30
+ beacon_widget=beacon_widget,
31
+ parent=parent,
32
+ settings=settings,
33
+ )
34
+ except ImportError as e:
35
+ fakts = ImportException(import_exception=e, install_library="qtpy")
36
+
37
+ try:
38
+ from arkitekt_next_next.apps.service.herre_qt import build_arkitekt_next_qt_herre
39
+
40
+ herre = build_arkitekt_next_qt_herre(
41
+ manifest=manifest,
42
+ fakts=fakts,
43
+ login_widget=login_widget,
44
+ parent=parent,
45
+ settings=settings,
46
+ )
47
+ except ImportError as e:
48
+ herre = ImportException(import_exception=e, install_library="qtpy")
49
+
50
+ try:
51
+ from arkitekt_next_next.apps.service.rekuest import build_arkitekt_next_rekuest
52
+
53
+ rekuest = build_arkitekt_next_rekuest(
54
+ fakts=fakts, herre=herre, instance_id=instance_id or "main"
55
+ )
56
+ except ImportError as e:
57
+ rekuest = ImportException(import_exception=e, install_library="rekuest")
58
+
59
+ try:
60
+ from arkitekt_next_next.apps.service.mikro import build_arkitekt_next_mikro
61
+
62
+ mikro = build_arkitekt_next_mikro(fakts=fakts, herre=herre)
63
+ except ImportError as e:
64
+ mikro = ImportException(import_exception=e, install_library="mikro")
65
+
66
+ try:
67
+ from arkitekt_next_next.apps.service.unlok import build_arkitekt_next_unlok
68
+
69
+ unlok = build_arkitekt_next_unlok(herre=herre, fakts=fakts)
70
+ except ImportError as e:
71
+ unlok = ImportException(import_exception=e, install_library="unlok")
72
+
73
+ try:
74
+ from arkitekt_next_next.apps.service.fluss import build_arkitekt_next_fluss
75
+
76
+ fluss = build_arkitekt_next_fluss(herre=herre, fakts=fakts)
77
+ except ImportError as e:
78
+ fluss = ImportException(import_exception=e, install_library="fluss")
79
+
80
+ try:
81
+ from arkitekt_next_next.apps.service.kluster import build_arkitekt_next_kluster
82
+
83
+ kluster = build_arkitekt_next_kluster(herre=herre, fakts=fakts)
84
+ except ImportError as e:
85
+ kluster = ImportException(import_exception=e, install_library="kluster")
86
+
87
+ return QtApp(
88
+ koil=QtPedanticKoil(parent=parent),
89
+ manifest=manifest,
90
+ fakts=fakts,
91
+ herre=herre,
92
+ rekuest=rekuest,
93
+ mikro=mikro,
94
+ unlok=unlok,
95
+ fluss=fluss,
96
+ kluster=kluster,
97
+ )
@@ -0,0 +1,3 @@
1
+ """ Modules for services, all services should be placed here.
2
+ Services SHOULD not be used directly, but build through the
3
+ builders in arkitekt_next/apps."""
@@ -0,0 +1,88 @@
1
+ from fakts.fakts import Fakts
2
+ from fakts.fakts import Fakts
3
+ from typing import Optional
4
+ from fakts.grants.remote.discovery.well_known import WellKnownDiscovery
5
+ from fakts.grants.remote import RemoteGrant
6
+ from fakts.grants.remote.demanders.auto_save import AutoSaveDemander
7
+ from fakts.grants.remote.demanders.cache import CacheTokenStore
8
+ from fakts.grants.remote.demanders.static import StaticDemander
9
+ from fakts.grants.remote.demanders.device_code import DeviceCodeDemander
10
+ from fakts.grants.remote.claimers.post import ClaimEndpointClaimer
11
+ from fakts.grants.remote.demanders.redeem import RedeemDemander
12
+ from arkitekt_next_next.model import Manifest
13
+
14
+
15
+ class ArkitektNextFaktsQt(Fakts):
16
+ grant: RemoteGrant
17
+
18
+
19
+ class ArkitektNextFakts(Fakts):
20
+ pass
21
+
22
+
23
+ def build_arkitekt_next_fakts(
24
+ manifest: Manifest,
25
+ url: Optional[str] = None,
26
+ no_cache: bool = False,
27
+ headless: bool = False,
28
+ ) -> ArkitektNextFakts:
29
+ identifier = manifest.identifier
30
+ version = manifest.version
31
+
32
+ if no_cache:
33
+ demander = DeviceCodeDemander(
34
+ manifest=manifest,
35
+ redirect_uri="http://127.0.0.1:6767",
36
+ open_browser=not headless,
37
+ )
38
+
39
+ else:
40
+ demander = AutoSaveDemander(
41
+ demander=DeviceCodeDemander(
42
+ manifest=manifest,
43
+ redirect_uri="http://127.0.0.1:6767",
44
+ open_browser=not headless,
45
+ ),
46
+ store=CacheTokenStore(
47
+ cache_file=f".arkitekt_next/cache/{identifier}-{version}_fakts_cache.json"
48
+ ),
49
+ )
50
+
51
+ return ArkitektNextFakts(
52
+ grant=RemoteGrant(
53
+ demander=demander,
54
+ discovery=WellKnownDiscovery(url=url, auto_protocols=["https", "http"]),
55
+ claimer=ClaimEndpointClaimer(),
56
+ )
57
+ )
58
+
59
+
60
+ def build_arkitekt_next_token_fakts(
61
+ manifest: Manifest,
62
+ token: str,
63
+ url,
64
+ no_cache: Optional[bool] = False,
65
+ headless=False,
66
+ ):
67
+ return ArkitektNextFakts(
68
+ grant=RemoteGrant(
69
+ demander=StaticDemander(token=token),
70
+ discovery=WellKnownDiscovery(url=url, auto_protocols=["https", "http"]),
71
+ claimer=ClaimEndpointClaimer(),
72
+ )
73
+ )
74
+
75
+ def build_arkitekt_next_redeem_fakts(
76
+ manifest: Manifest,
77
+ redeem_token: str,
78
+ url,
79
+ no_cache: Optional[bool] = False,
80
+ headless=False,
81
+ ):
82
+ return ArkitektNextFakts(
83
+ grant=RemoteGrant(
84
+ demander=RedeemDemander(token=redeem_token, manifest=manifest),
85
+ discovery=WellKnownDiscovery(url=url, auto_protocols=["https", "http"]),
86
+ claimer=ClaimEndpointClaimer(),
87
+ )
88
+ )