arkitekt-next 0.8.7__tar.gz → 0.8.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 (139) hide show
  1. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/PKG-INFO +2 -2
  2. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/apps/service/fakts_qt.py +2 -2
  3. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/apps/types.py +5 -0
  4. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/builders.py +5 -5
  5. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/magic_bar.py +2 -0
  6. arkitekt_next-0.8.8/arkitekt_next/qt/types.py +120 -0
  7. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/pyproject.toml +2 -2
  8. arkitekt_next-0.8.7/arkitekt_next/qt/types.py +0 -40
  9. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/LICENSE +0 -0
  10. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/README.md +0 -0
  11. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/__blok__.py +0 -0
  12. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/__init__.py +0 -0
  13. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/apps/__init__.py +0 -0
  14. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/apps/service/__init__.py +0 -0
  15. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/apps/service/fakts_next.py +0 -0
  16. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/apps/service/grant_registry.py +0 -0
  17. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/apps/service/herre.py +0 -0
  18. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/apps/service/herre_qt.py +0 -0
  19. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/__init__.py +0 -0
  20. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/admin.py +0 -0
  21. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/arkitekt.py +0 -0
  22. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/base.py +0 -0
  23. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/config.py +0 -0
  24. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/fluss.py +0 -0
  25. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/gateway.py +0 -0
  26. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/internal_docker.py +0 -0
  27. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/kabinet.py +0 -0
  28. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/livekit.py +0 -0
  29. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/lok.py +0 -0
  30. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/mikro.py +0 -0
  31. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/minio.py +0 -0
  32. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/mount.py +0 -0
  33. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/namegen.py +0 -0
  34. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/orkestrator.py +0 -0
  35. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/postgres.py +0 -0
  36. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/redis.py +0 -0
  37. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/rekuest.py +0 -0
  38. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/secret.py +0 -0
  39. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/__init__.py +0 -0
  40. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/admin.py +0 -0
  41. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/config.py +0 -0
  42. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/db.py +0 -0
  43. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/gateway.py +0 -0
  44. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/livekit.py +0 -0
  45. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/lok.py +0 -0
  46. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/mount.py +0 -0
  47. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/name.py +0 -0
  48. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/redis.py +0 -0
  49. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/s3.py +0 -0
  50. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/secret.py +0 -0
  51. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/services/socket.py +0 -0
  52. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/socket.py +0 -0
  53. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/bloks/tailscale.py +0 -0
  54. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/builders.py +0 -0
  55. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/__init__.py +0 -0
  56. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/call/__init__.py +0 -0
  57. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/call/local.py +0 -0
  58. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/call/main.py +0 -0
  59. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/call/remote.py +0 -0
  60. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/gen/__init__.py +0 -0
  61. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/gen/compile.py +0 -0
  62. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/gen/init.py +0 -0
  63. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/gen/main.py +0 -0
  64. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/gen/watch.py +0 -0
  65. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/init/__init__.py +0 -0
  66. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/init/main.py +0 -0
  67. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/inspect/__init__.py +0 -0
  68. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/inspect/main.py +0 -0
  69. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/inspect/requirements.py +0 -0
  70. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/inspect/templates.py +0 -0
  71. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/inspect/variables.py +0 -0
  72. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/kabinet/__init__.py +0 -0
  73. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/kabinet/build.py +0 -0
  74. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/kabinet/init.py +0 -0
  75. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/kabinet/main.py +0 -0
  76. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/kabinet/publish.py +0 -0
  77. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/kabinet/stage.py +0 -0
  78. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/kabinet/utils.py +0 -0
  79. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/kabinet/validate.py +0 -0
  80. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/kabinet/wizard.py +0 -0
  81. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/manifest/__init__.py +0 -0
  82. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/manifest/inspect.py +0 -0
  83. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/manifest/main.py +0 -0
  84. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/manifest/scopes.py +0 -0
  85. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/manifest/version.py +0 -0
  86. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/manifest/wizard.py +0 -0
  87. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/run/__init__.py +0 -0
  88. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/run/dev.py +0 -0
  89. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/run/main.py +0 -0
  90. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/run/prod.py +0 -0
  91. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/commands/run/utils.py +0 -0
  92. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/configs/base.yaml +0 -0
  93. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/constants.py +0 -0
  94. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/dockerfiles/vanilla.dockerfile +0 -0
  95. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/errors.py +0 -0
  96. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/inspect.py +0 -0
  97. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/io.py +0 -0
  98. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/main.py +0 -0
  99. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/options.py +0 -0
  100. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/fluss.schema.graphql +0 -0
  101. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/gucker.schema.graphql +0 -0
  102. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/kabinet.schema.graphql +0 -0
  103. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/kluster.schema.graphql +0 -0
  104. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/konviktion.schema.graphql +0 -0
  105. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/kuay.schema.graphql +0 -0
  106. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/mikro.schema.graphql +0 -0
  107. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/mikro_next.schema.graphql +0 -0
  108. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/napari.schema.graphql +0 -0
  109. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/omero_ark.schema.graphql +0 -0
  110. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/port.schema.graphql +0 -0
  111. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/rekuest.schema.graphql +0 -0
  112. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/rekuest_next.schema.graphql +0 -0
  113. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/schemas/unlok.schema.graphql +0 -0
  114. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/templates/filter.py +0 -0
  115. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/templates/simple.py +0 -0
  116. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/texts.py +0 -0
  117. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/types.py +0 -0
  118. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/ui.py +0 -0
  119. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/utils.py +0 -0
  120. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/validators.py +0 -0
  121. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/vars.py +0 -0
  122. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/cli/versions/v1.yaml +0 -0
  123. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/constants.py +0 -0
  124. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/model.py +0 -0
  125. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/__init__.py +0 -0
  126. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/assets/dark/gear.png +0 -0
  127. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/assets/dark/green pulse.gif +0 -0
  128. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/assets/dark/orange pulse.gif +0 -0
  129. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/assets/dark/pink pulse.gif +0 -0
  130. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/assets/dark/red pulse.gif +0 -0
  131. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/assets/light/gear.png +0 -0
  132. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/assets/light/green pulse.gif +0 -0
  133. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/assets/light/orange pulse.gif +0 -0
  134. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/assets/light/pink pulse.gif +0 -0
  135. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/assets/light/red pulse.gif +0 -0
  136. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/qt/utils.py +0 -0
  137. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/service_registry.py +0 -0
  138. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/tqdm.py +0 -0
  139. {arkitekt_next-0.8.7 → arkitekt_next-0.8.8}/arkitekt_next/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arkitekt-next
3
- Version: 0.8.7
3
+ Version: 0.8.8
4
4
  Summary: client for the arkitekt_next platform
5
5
  License: MIT
6
6
  Author: jhnnsrs
@@ -29,7 +29,7 @@ Requires-Dist: mikro-next (>=0.1.38) ; (python_version >= "3.10" and python_vers
29
29
  Requires-Dist: namegenerator (>=1.0.6) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "blok")
30
30
  Requires-Dist: netifaces (>=0.11.0) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "blok")
31
31
  Requires-Dist: reaktion-next (>=0.1.73) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all")
32
- Requires-Dist: rekuest-next (>=0.2.29) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "cli" or extra == "all")
32
+ Requires-Dist: rekuest-next (>=0.2.31) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "cli" or extra == "all")
33
33
  Requires-Dist: rich-click (>=1.6.1) ; extra == "cli" or extra == "all"
34
34
  Requires-Dist: semver (>=3.0.1) ; extra == "cli" or extra == "all"
35
35
  Requires-Dist: turms (>=0.6.0) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "cli" or extra == "all")
@@ -52,7 +52,7 @@ def build_arkitekt_next_qt_fakts(
52
52
  )
53
53
 
54
54
  return ArkitektNextFaktsQt(
55
- grant=RemoteGrant(
55
+ grant=ArkitektNextFaktsQtRemoteGrant(
56
56
  demander=AutoSaveDemander(
57
57
  store=QTSettingTokenStore(
58
58
  settings=settings,
@@ -65,7 +65,7 @@ def build_arkitekt_next_qt_fakts(
65
65
  requested_client_kind="desktop",
66
66
  ),
67
67
  ),
68
- discovery=AutoSaveDiscovery(
68
+ discovery=ArkitektNextFaktsAutoSaveDiscovery(
69
69
  store=QtSettingsEndpointStore(
70
70
  settings=settings,
71
71
  save_key="fakts_endpoint",
@@ -32,6 +32,11 @@ class App(Composition):
32
32
  """Run the app"""
33
33
  self.services["rekuest"].run()
34
34
 
35
+ def register(self, *args, **kwargs):
36
+ """Register a service"""
37
+ self.services["rekuest"].register(*args, **kwargs)
38
+
39
+
35
40
  async def __aenter__(self):
36
41
  await super().__aenter__()
37
42
  for service in self.services.values():
@@ -18,7 +18,7 @@ import logging
18
18
  from typing import List, Optional
19
19
  import logging
20
20
  import os
21
-
21
+ from arkitekt_next.qt.types import QtApp
22
22
  from arkitekt_next.apps.service.fakts_next import (
23
23
  build_arkitekt_next_fakts_next,
24
24
  build_arkitekt_next_redeem_fakts_next,
@@ -50,7 +50,7 @@ def devqt(
50
50
  app_kind: str = "development",
51
51
  registry: Optional[ServiceBuilderRegistry] = None,
52
52
  **kwargs,
53
- ) -> App:
53
+ ) -> QtApp:
54
54
  """Creates a next app
55
55
 
56
56
  A simple way to create an ArkitektNext Next app, ArkitektNext next apps are
@@ -166,7 +166,7 @@ def devqt(
166
166
  except ImportError:
167
167
  logging.basicConfig(level=log_level)
168
168
 
169
- app = App(
169
+ app = QtApp(
170
170
  fakts=fakts,
171
171
  herre=herre,
172
172
  manifest=manifest,
@@ -192,7 +192,7 @@ def publicqt(
192
192
  login_widget: Optional[QtWidgets.QWidget] = None,
193
193
  settings: Optional[QtCore.QSettings] = None,
194
194
  **kwargs,
195
- ) -> App:
195
+ ) -> QtApp:
196
196
  """Public QtApp creation
197
197
 
198
198
  A simple way to create an Arkitekt app with a public grant (allowing users to sign
@@ -244,7 +244,7 @@ def publicqt(
244
244
  except ImportError:
245
245
  logging.basicConfig(level=log_level)
246
246
 
247
- app = App(
247
+ app = QtApp(
248
248
  fakts=fakts,
249
249
  herre=herre,
250
250
  manifest=manifest,
@@ -154,6 +154,8 @@ class ArkitektNextLogs(QtWidgets.QDialog):
154
154
  def log_level(self) -> str:
155
155
  """The log level in use."""
156
156
  return self.settings.value(self.log_level_key, "INFO", str)
157
+
158
+
157
159
 
158
160
 
159
161
  class Profile(QtWidgets.QDialog):
@@ -0,0 +1,120 @@
1
+ from arkitekt_next.apps.types import App, Fakts, Herre, Manifest
2
+ from typing import List, Callable, Dict, Any
3
+
4
+
5
+
6
+ class QtApp(App):
7
+ """An app that is built with the easy builder"""
8
+
9
+ fakts: Fakts
10
+ herre: Herre
11
+ manifest: Manifest
12
+ services: Dict[str, Any]
13
+ hooks: Dict[str, List[Callable]] = {
14
+ "on_start": [],
15
+ "on_stop": [],
16
+ "on_error": [],
17
+ "on_message": [],
18
+ "on_warning": [],
19
+ "on_info": [],
20
+ "on_debug": [],
21
+ "on_enter": [],
22
+ }
23
+
24
+ def register_hook(self, hook_name: str, hook: Callable):
25
+ """Register a hook"""
26
+ self.hooks[hook_name].append(hook)
27
+
28
+
29
+ def register(self, *args, **kwargs):
30
+ """ Register a function with the app (not in the Qt event loop)
31
+
32
+ This is useful for functions that do not need access to the Qt event loop
33
+ and can be run in a separate thread. This is the default behavior for
34
+ functions registered with the app.
35
+
36
+
37
+ """
38
+ self.services["rekuest"].register(*args, **kwargs)
39
+
40
+
41
+
42
+ def register_in_qt_loop(self, function: Callable, **kwargs):
43
+ """Register a function in the Qt event loop
44
+
45
+ This is useful for functions that need to be resolved in the Qt event loop and are
46
+ able to block the main thread (e.g. when prompting a necessary user input, or
47
+ when displaying a blocking dialog).
48
+
49
+ """
50
+
51
+ from rekuest_next.qt.builders import qtinloopactifier
52
+
53
+ return self.services["rekuest"].register(function, actifier=qtinloopactifier, **kwargs)
54
+
55
+ def register_with_qt_future(self, function: Callable, **kwargs):
56
+ """ Register a function with a future that can be resolved in the Qt event loop
57
+
58
+ This is useful for functions that need to be resolved in the Qt event loop, but
59
+ might cause a blocking call if they are run in the same thread.
60
+
61
+ Example:
62
+
63
+ ```python
64
+
65
+ class MyWidget(QtWidgets.QWidget):
66
+
67
+ def __init__(self, app: QtApp):
68
+ super().__init__()
69
+ self.my_widget = QtWidgets.QWidget()
70
+ self.my_widget.setWindowTitle("Do you accept?")
71
+ self.my_widget.setWindowModality(QtCore.Qt.ApplicationModal)
72
+ self.my_widget.setFixedSize(200, 100)
73
+
74
+ self.my_widget.accept_button = QtWidgets.QPushButton("Accept")
75
+ self.my_widget.reject_button = QtWidgets.QPushButton("Reject")
76
+ self.my_widget.layout = QtWidgets.QVBoxLayout()
77
+ self.my_widget.layout.addWidget(self.my_widget.accept_button)
78
+ self.my_widget.layout.addWidget(self.my_widget.reject_button)
79
+
80
+ self.app.register_with_qt_future(self.my_function)
81
+
82
+
83
+
84
+ def my_function(self, future: QtFuture, *args, **kwargs):
85
+ self.my_widget.setText("Do you accept?")
86
+ self.my_widget.show()
87
+
88
+ self.current_future = future
89
+
90
+
91
+ def on_accept(self):
92
+ self.current_future.set_result(True)
93
+
94
+ def on_reject(self):
95
+ self.current_future.set_result(False)
96
+
97
+
98
+ """
99
+ from rekuest_next.qt.builders import qtwithfutureactifier
100
+ return self.services["rekuest"].register(function, actifier=qtwithfutureactifier, **kwargs)
101
+
102
+ def register_with_qt_generator(self, function: Callable, **kwargs):
103
+ from rekuest_next.qt.builders import qtwithgeneratoractifier
104
+ return self.services["rekuest"].register(function, actifier=qtwithgeneratoractifier, **kwargs)
105
+
106
+
107
+ def run(self):
108
+ """Run the app"""
109
+ self.services["rekuest"].run()
110
+
111
+ async def __aenter__(self):
112
+ await super().__aenter__()
113
+ for service in self.services.values():
114
+ await service.__aenter__()
115
+
116
+ return self
117
+
118
+ async def __aexit__(self, exc_type, exc_value, traceback):
119
+ for service in self.services.values():
120
+ await service.__aexit__(exc_type, exc_value, traceback)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "arkitekt-next"
3
- version = "0.8.7"
3
+ version = "0.8.8"
4
4
  description = "client for the arkitekt_next platform"
5
5
  authors = ["jhnnsrs <jhnnsrs@gmail.com>"]
6
6
  license = "MIT"
@@ -15,7 +15,7 @@ mikro-next = { version = ">=0.1.38", python = "^3.10", optional = true }
15
15
  kabinet = { version = ">=0.1.23", optional = true, python = "^3.9" }
16
16
  fluss-next = { version = ">=0.1.83", optional = true }
17
17
  reaktion-next= { version = ">=0.1.73", python = "^3.8", optional = true }
18
- rekuest-next= { version = ">=0.2.29", python = "^3.8", optional = true }
18
+ rekuest-next= { version = ">=0.2.31", python = "^3.8", optional = true }
19
19
  unlok-next= { version = ">=0.1.78", python = "^3.8", optional = true }
20
20
  lovekit = { version = ">=0.1.10", python = "^3.10", optional = true }
21
21
  rich-click = { version = ">=1.6.1", optional = true }
@@ -1,40 +0,0 @@
1
- from arkitekt_next.apps.types import App, Fakts, Herre, Manifest
2
- from typing import List, Callable, Dict, Any
3
-
4
-
5
- class QtApp(App):
6
- """An app that is built with the easy builder"""
7
-
8
- fakts: Fakts
9
- herre: Herre
10
- manifest: Manifest
11
- services: Dict[str, Any]
12
- hooks: Dict[str, List[Callable]] = {
13
- "on_start": [],
14
- "on_stop": [],
15
- "on_error": [],
16
- "on_message": [],
17
- "on_warning": [],
18
- "on_info": [],
19
- "on_debug": [],
20
- "on_enter": [],
21
- }
22
-
23
- def register_hook(self, hook_name: str, hook: Callable):
24
- """Register a hook"""
25
- self.hooks[hook_name].append(hook)
26
-
27
- def run(self):
28
- """Run the app"""
29
- self.services["rekuest"].run()
30
-
31
- async def __aenter__(self):
32
- await super().__aenter__()
33
- for service in self.services.values():
34
- await service.__aenter__()
35
-
36
- return self
37
-
38
- async def __aexit__(self, exc_type, exc_value, traceback):
39
- for service in self.services.values():
40
- await service.__aexit__(exc_type, exc_value, traceback)
File without changes
File without changes