dara-core 1.21.17__py3-none-any.whl → 1.21.19__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.
@@ -27,6 +27,7 @@ from fastapi.encoders import jsonable_encoder
27
27
  from pydantic import (
28
28
  ConfigDict,
29
29
  Field,
30
+ SerializeAsAny,
30
31
  SerializerFunctionWrapHandler,
31
32
  field_serializer,
32
33
  model_serializer,
@@ -53,7 +54,7 @@ class Variable(ClientVariable, Generic[VariableType, PersistenceStoreType_co]):
53
54
  """
54
55
 
55
56
  default: VariableType | None = None
56
- store: PersistenceStoreType_co | None = None
57
+ store: SerializeAsAny[PersistenceStoreType_co | None] = None
57
58
  uid: str
58
59
  nested: list[str] = Field(default_factory=list)
59
60
  model_config = ConfigDict(extra='forbid')
@@ -27,6 +27,7 @@ from typing import Annotated, Any, Literal
27
27
  from urllib.parse import unquote
28
28
 
29
29
  import anyio
30
+ import backoff
30
31
  from anyio.streams.memory import MemoryObjectSendStream
31
32
  from fastapi import (
32
33
  APIRouter,
@@ -214,20 +215,6 @@ async def get_download(code: str):
214
215
  raise ValueError('Invalid or expired download code') from e
215
216
 
216
217
 
217
- @core_api_router.get('/components/{name}/definition', dependencies=[Depends(verify_session)])
218
- async def get_component_definition(name: str):
219
- """
220
- Attempt to refetch a component definition from the backend.
221
- This is used when a component isn't immediately available in the initial registry,
222
- e.g. when it was added by a py_component.
223
-
224
- :param name: the name of component
225
- """
226
- registry_mgr: RegistryLookup = utils_registry.get('RegistryLookup')
227
- component = await registry_mgr.get(component_registry, name)
228
- return component.model_dump(exclude={'func'})
229
-
230
-
231
218
  class ComponentRequestBody(BaseModel):
232
219
  # Dynamic kwarg values
233
220
  values: NormalizedPayload[Mapping[str, Any]]
@@ -244,7 +231,16 @@ async def get_component(component: str, body: ComponentRequestBody):
244
231
  store: CacheStore = utils_registry.get('Store')
245
232
  task_mgr: TaskManager = utils_registry.get('TaskManager')
246
233
  registry_mgr: RegistryLookup = utils_registry.get('RegistryLookup')
247
- comp_def = await registry_mgr.get(component_registry, component)
234
+
235
+ # Retry 5 times with a constant backoff of 1 s with 0-1 jitter
236
+ @backoff.on_exception(backoff.constant, ValueError, max_tries=5, jitter=backoff.full_jitter)
237
+ async def _get_component():
238
+ try:
239
+ return await registry_mgr.get(component_registry, component)
240
+ except Exception as e:
241
+ raise ValueError(f'Could now resolve component {component}. Was it registered in the app?') from e
242
+
243
+ comp_def = await _get_component()
248
244
 
249
245
  if isinstance(comp_def, PyComponentDef):
250
246
  static_kwargs = await registry_mgr.get(static_kwargs_registry, body.uid)
dara/core/main.py CHANGED
@@ -42,6 +42,7 @@ from dara.core.defaults import (
42
42
  top_menu_template,
43
43
  top_template,
44
44
  )
45
+ from dara.core.definitions import JsComponentDef
45
46
  from dara.core.internal.cache_store import CacheStore
46
47
  from dara.core.internal.cgroup import get_cpu_count, set_memory_limit
47
48
  from dara.core.internal.custom_response import CustomResponse
@@ -397,7 +398,12 @@ def _start_application(config: Configuration):
397
398
  template_data = {
398
399
  'auth_components': config.auth_config.component_config.model_dump(),
399
400
  'actions': action_def_registry.get_all().items(),
400
- 'components': {k: comp.model_dump(exclude={'func'}) for k, comp in component_registry.get_all().items()},
401
+ # only include JS components
402
+ 'components': {
403
+ k: comp.model_dump(exclude={'func'})
404
+ for k, comp in component_registry.get_all().items()
405
+ if isinstance(comp, JsComponentDef)
406
+ },
401
407
  'application_name': get_settings().project_name,
402
408
  'enable_devtools': config.enable_devtools,
403
409
  'live_reload': config.live_reload,
@@ -39409,7 +39409,6 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39409
39409
  white-space: nowrap;
39410
39410
  `;
39411
39411
  const directionCtx = React$1.createContext({ direction: "row" });
39412
- const importersCtx = React$1.createContext({});
39413
39412
  var _arrayEach;
39414
39413
  var hasRequired_arrayEach;
39415
39414
  function require_arrayEach() {
@@ -47568,7 +47567,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
47568
47567
  }
47569
47568
  return baseOrderBy(collection, iteratees, orders);
47570
47569
  }
47571
- var partition2 = createAggregator(function(result2, value, key) {
47570
+ var partition = createAggregator(function(result2, value, key) {
47572
47571
  result2[key ? 0 : 1].push(value);
47573
47572
  }, function() {
47574
47573
  return [[], []];
@@ -48952,7 +48951,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
48952
48951
  lodash2.overSome = overSome;
48953
48952
  lodash2.partial = partial2;
48954
48953
  lodash2.partialRight = partialRight;
48955
- lodash2.partition = partition2;
48954
+ lodash2.partition = partition;
48956
48955
  lodash2.pick = pick2;
48957
48956
  lodash2.pickBy = pickBy;
48958
48957
  lodash2.property = property;
@@ -50870,52 +50869,6 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
50870
50869
  }
50871
50870
  const variablesCtx = React__namespace.createContext(null);
50872
50871
  const websocketCtx = React$1.createContext({ client: void 0 });
50873
- const registriesCtx = React$1.createContext(null);
50874
- function RegistriesCtxProvider(props) {
50875
- const [actionRegistry] = React$1.useState(props.actionRegistry);
50876
- const [componentRegistry, setComponentRegistry] = React$1.useState(props.componentRegistry);
50877
- const extras = useRequestExtras();
50878
- const refetchComponentMutation = reactQuery.useMutation({
50879
- mutationKey: ["component-definition"],
50880
- mutationFn: async ({ name }) => {
50881
- const response = await request(
50882
- `/api/core/components/${name}/definition`,
50883
- { method: HTTP_METHOD.GET },
50884
- extras
50885
- );
50886
- await handleAuthErrors(response, true);
50887
- await validateResponse(
50888
- response,
50889
- `Failed to fetch the component definition for ${name}, was it registered in the app?`
50890
- );
50891
- return response.json();
50892
- },
50893
- retry: 3
50894
- });
50895
- const getComponent = React$1.useCallback(
50896
- async (instance) => {
50897
- if (componentRegistry[instance.name]) {
50898
- return componentRegistry[instance.name];
50899
- }
50900
- const component = await refetchComponentMutation.mutateAsync({ name: instance.name });
50901
- setComponentRegistry((prev) => ({ ...prev, [instance.name]: component }));
50902
- return component;
50903
- },
50904
- [componentRegistry, refetchComponentMutation]
50905
- );
50906
- const contextValue = React$1.useMemo(
50907
- () => ({ actionRegistry, componentRegistry, getComponent }),
50908
- [actionRegistry, componentRegistry, getComponent]
50909
- );
50910
- return /* @__PURE__ */ React.createElement(registriesCtx.Provider, { value: contextValue }, props.children);
50911
- }
50912
- function useRegistriesCtx() {
50913
- const context = React$1.useContext(registriesCtx);
50914
- if (!context) {
50915
- throw new Error("useRegistriesCtx must be used within a RegistriesCtxProvider");
50916
- }
50917
- return context;
50918
- }
50919
50872
  const displayCtx = React$1.createContext({ component: null, direction: "horizontal" });
50920
50873
  const fallbackCtx = React__namespace.createContext(null);
50921
50874
  function useFallbackCtx() {
@@ -72705,22 +72658,6 @@ Inferred class string: "${iconClasses}."`
72705
72658
  [uid2]
72706
72659
  );
72707
72660
  }
72708
- var partition_1;
72709
- var hasRequiredPartition;
72710
- function requirePartition() {
72711
- if (hasRequiredPartition) return partition_1;
72712
- hasRequiredPartition = 1;
72713
- var createAggregator = require_createAggregator();
72714
- var partition2 = createAggregator(function(result, value, key) {
72715
- result[key ? 0 : 1].push(value);
72716
- }, function() {
72717
- return [[], []];
72718
- });
72719
- partition_1 = partition2;
72720
- return partition_1;
72721
- }
72722
- var partitionExports = requirePartition();
72723
- const partition = /* @__PURE__ */ getDefaultExportFromCjs(partitionExports);
72724
72661
  const ErrorBoundaryContext = React$1.createContext(null);
72725
72662
  const initialState = {
72726
72663
  didCatch: false,
@@ -73213,31 +73150,25 @@ Inferred class string: "${iconClasses}."`
73213
73150
  MODULE_CACHE.clear();
73214
73151
  COMPONENT_METADATA_CACHE.clear();
73215
73152
  }
73216
- async function preloadComponents(importers, components) {
73217
- const [jsComponents, pyComponents] = partition(components, isJsComponent);
73218
- for (const component of pyComponents) {
73219
- if (COMPONENT_METADATA_CACHE.has(component.name)) {
73220
- continue;
73221
- }
73222
- COMPONENT_METADATA_CACHE.set(component.name, component);
73223
- }
73153
+ async function preloadComponents(importers, jsComponents) {
73224
73154
  const componentsByModule = groupBy(jsComponents, (component) => component.py_module);
73225
73155
  for (const [pyModule, componentsInModule] of Object.entries(componentsByModule)) {
73226
- if (MODULE_CACHE.has(pyModule)) {
73227
- continue;
73228
- }
73229
- const importer = importers[pyModule];
73230
- if (!importer) {
73231
- throw new Error(`Missing importer for module ${pyModule}`);
73232
- }
73233
73156
  let moduleContent = null;
73234
- try {
73235
- moduleContent = await importer();
73236
- if (moduleContent) {
73237
- MODULE_CACHE.set(pyModule, moduleContent);
73157
+ if (MODULE_CACHE.has(pyModule)) {
73158
+ moduleContent = MODULE_CACHE.get(pyModule);
73159
+ } else {
73160
+ const importer = importers[pyModule];
73161
+ if (!importer) {
73162
+ throw new Error(`Missing importer for module ${pyModule}`);
73163
+ }
73164
+ try {
73165
+ moduleContent = await importer();
73166
+ if (moduleContent) {
73167
+ MODULE_CACHE.set(pyModule, moduleContent);
73168
+ }
73169
+ } catch (e2) {
73170
+ throw new Error(`Failed to load module ${pyModule}: ${String(e2)}`);
73238
73171
  }
73239
- } catch (e2) {
73240
- throw new Error(`Failed to load module ${pyModule}: ${String(e2)}`);
73241
73172
  }
73242
73173
  for (const component of componentsInModule) {
73243
73174
  if (COMPONENT_METADATA_CACHE.has(component.name)) {
@@ -73247,7 +73178,7 @@ Inferred class string: "${iconClasses}."`
73247
73178
  }
73248
73179
  }
73249
73180
  }
73250
- function resolveComponentSync(component) {
73181
+ function resolveComponent(component) {
73251
73182
  if (!component) {
73252
73183
  return null;
73253
73184
  }
@@ -73256,9 +73187,19 @@ Inferred class string: "${iconClasses}."`
73256
73187
  }
73257
73188
  const metadata = COMPONENT_METADATA_CACHE.get(component.name);
73258
73189
  if (!metadata) {
73259
- return null;
73260
- }
73261
- if (metadata.type === "py") {
73190
+ if (!isPyComponent(component)) {
73191
+ return /* @__PURE__ */ React.createElement(
73192
+ ErrorDisplay$1,
73193
+ {
73194
+ config: {
73195
+ title: `Component ${component.name} could not be resolved`,
73196
+ description: `This likely means the component was not registered with the app.
73197
+ You can try re-building JavaScript for the app by running Dara with the --rebuild flag and/or explicitly registering the component with "config.add_component(MyComponent)".
73198
+ In most cases the import discovery system should auto-register components used throughout the app so please report the issue if you think it is a bug in the system.`
73199
+ }
73200
+ }
73201
+ );
73202
+ }
73262
73203
  return (
73263
73204
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
73264
73205
  /* @__PURE__ */ React.createElement(
@@ -73276,7 +73217,15 @@ Inferred class string: "${iconClasses}."`
73276
73217
  }
73277
73218
  const moduleContent = MODULE_CACHE.get(metadata.py_module);
73278
73219
  if (!moduleContent) {
73279
- return null;
73220
+ return /* @__PURE__ */ React.createElement(
73221
+ ErrorDisplay$1,
73222
+ {
73223
+ config: {
73224
+ title: `Component ${metadata.name} could not be resolved`,
73225
+ description: `The JavaScript module for ${metadata.py_module} was not found`
73226
+ }
73227
+ }
73228
+ );
73280
73229
  }
73281
73230
  const ResolvedComponent = moduleContent[metadata.js_component ?? metadata.name];
73282
73231
  if (!ResolvedComponent) {
@@ -73293,57 +73242,6 @@ Inferred class string: "${iconClasses}."`
73293
73242
  const props = cleanProps(component.props);
73294
73243
  return /* @__PURE__ */ React.createElement(ResolvedComponent, { uid: component.uid, ...props });
73295
73244
  }
73296
- class ComponentLoadError extends Error {
73297
- constructor(message, title) {
73298
- super(message);
73299
- this.title = title;
73300
- }
73301
- }
73302
- async function resolveComponentAsync(component, getComponent, importers) {
73303
- if (!component) {
73304
- return;
73305
- }
73306
- let entry;
73307
- try {
73308
- entry = await getComponent(component);
73309
- } catch (e2) {
73310
- throw new ComponentLoadError(e2 instanceof Error ? e2.message : String(e2), "Failed to load component");
73311
- }
73312
- if (!isJsComponent(entry)) {
73313
- COMPONENT_METADATA_CACHE.set(component.name, entry);
73314
- return;
73315
- }
73316
- COMPONENT_METADATA_CACHE.set(component.name, entry);
73317
- if (MODULE_CACHE.has(entry.py_module)) {
73318
- return;
73319
- }
73320
- const importer = importers[entry.py_module];
73321
- if (!importer) {
73322
- const errorDescription = entry.py_module === "LOCAL" ? `This is a local component so make sure you are in production mode and dara.config.json is present.
73323
- You can try re-building JavaScript by running Dara with the --rebuild flag.` : `This means that the JavaScript module for the component was not included by the discovery system.
73324
- You can try re-building JavaScript by running Dara with the --rebuild flag
73325
- and/or explicitly registering the component with "config.add_component(MyComponentClass)".`;
73326
- throw new ComponentLoadError(errorDescription, `Component ${entry.name} could not be resolved`);
73327
- }
73328
- let moduleContent = null;
73329
- try {
73330
- moduleContent = await importer();
73331
- if (moduleContent) {
73332
- MODULE_CACHE.set(entry.py_module, moduleContent);
73333
- }
73334
- } catch (e2) {
73335
- console.error(`Failed to load module ${entry.py_module}:`, e2);
73336
- }
73337
- if (!moduleContent) {
73338
- throw new ComponentLoadError(
73339
- `Failed to import the JavaScript module for the component.
73340
- This likely means that the module was not installed properly.
73341
- You can try re-building JavaScript by running Dara with the --rebuild flag
73342
- and/or explicitly registering the component with "config.add_component(MyComponentClass)".`,
73343
- `Component ${entry.name} could not be resolved`
73344
- );
73345
- }
73346
- }
73347
73245
  function getFallbackComponent(fallback, track_progress, variablesRef) {
73348
73246
  let fallbackComponent = /* @__PURE__ */ React.createElement(DefaultFallback$1, null);
73349
73247
  if (fallback) {
@@ -73355,12 +73253,7 @@ Inferred class string: "${iconClasses}."`
73355
73253
  return fallbackComponent;
73356
73254
  }
73357
73255
  function DynamicComponent(props) {
73358
- const importers = React$1.useContext(importersCtx);
73359
73256
  const fallbackCtx$1 = React$1.useContext(fallbackCtx);
73360
- const { getComponent } = useRegistriesCtx();
73361
- const [component, setComponent] = React$1.useState(() => resolveComponentSync(props.component));
73362
- const [isLoading, setIsLoading] = React$1.useState(() => component === null);
73363
- const [loadingStarted, setLoadingStarted] = React$1.useState(false);
73364
73257
  React$1.useLayoutEffect(() => {
73365
73258
  if (!props.component) {
73366
73259
  return;
@@ -73373,40 +73266,7 @@ Inferred class string: "${iconClasses}."`
73373
73266
  );
73374
73267
  }
73375
73268
  }, [props.component]);
73376
- const isInitialMount = React$1.useRef(true);
73377
- React$1.useEffect(() => {
73378
- if (isInitialMount.current) {
73379
- isInitialMount.current = false;
73380
- return;
73381
- }
73382
- const SyncResolved = resolveComponentSync(props.component);
73383
- if (SyncResolved) {
73384
- setComponent(SyncResolved);
73385
- setIsLoading(false);
73386
- setLoadingStarted(false);
73387
- } else {
73388
- setIsLoading(true);
73389
- setLoadingStarted(false);
73390
- }
73391
- }, [props.component]);
73392
- const getComponentStable = useLatestRef$3(getComponent);
73393
- React$1.useEffect(() => {
73394
- if (!isLoading || loadingStarted) {
73395
- return;
73396
- }
73397
- setLoadingStarted(true);
73398
- resolveComponentAsync(props.component, getComponentStable.current, importers).then(() => {
73399
- const resolvedComponent = resolveComponentSync(props.component);
73400
- setIsLoading(false);
73401
- setComponent(resolvedComponent);
73402
- }).catch((error) => {
73403
- console.error("Failed to resolve component:", error);
73404
- setIsLoading(false);
73405
- if (error instanceof ComponentLoadError) {
73406
- setComponent(/* @__PURE__ */ React.createElement(ErrorDisplay$1, { config: { title: error.title, description: error.message } }));
73407
- }
73408
- });
73409
- }, [props.component, getComponentStable, importers, isLoading, loadingStarted]);
73269
+ const component = React$1.useMemo(() => resolveComponent(props.component), [props.component]);
73410
73270
  const refreshSelector = useRefreshSelector();
73411
73271
  function onResetErrorBoundary(error) {
73412
73272
  if (isSelectorError(error)) {
@@ -73428,9 +73288,6 @@ Inferred class string: "${iconClasses}."`
73428
73288
  if (!props.component) {
73429
73289
  return null;
73430
73290
  }
73431
- if (isLoading) {
73432
- return fallback;
73433
- }
73434
73291
  const suspend = props.component?.props?.fallback?.props?.suspend_render ?? fallbackCtx$1?.suspend ?? 200;
73435
73292
  return /* @__PURE__ */ React.createElement(
73436
73293
  ErrorBoundary,
@@ -74040,14 +73897,7 @@ Inferred class string: "${iconClasses}."`
74040
73897
  }
74041
73898
  });
74042
73899
  }, [wsClient]);
74043
- return /* @__PURE__ */ React.createElement(websocketCtx.Provider, { value: { client: wsClient } }, /* @__PURE__ */ React.createElement(
74044
- RegistriesCtxProvider,
74045
- {
74046
- componentRegistry: props.daraData.components,
74047
- actionRegistry: props.daraData.actions
74048
- },
74049
- /* @__PURE__ */ React.createElement(DynamicContext, { contextComponents: props.daraData.context_components }, /* @__PURE__ */ React.createElement(StoreProviders, null, /* @__PURE__ */ React.createElement(ServerVariableSyncProvider, null, /* @__PURE__ */ React.createElement(RootWrapper, null, /* @__PURE__ */ React.createElement(NotificationWrapper, null), /* @__PURE__ */ React.createElement(Outlet, null), /* @__PURE__ */ React.createElement(VariableStateProvider, { wsClient }), props.daraData.enable_devtools && /* @__PURE__ */ React.createElement(DevTools, null)))))
74050
- ));
73900
+ return /* @__PURE__ */ React.createElement(websocketCtx.Provider, { value: { client: wsClient } }, /* @__PURE__ */ React.createElement(DynamicContext, { contextComponents: props.daraData.context_components }, /* @__PURE__ */ React.createElement(StoreProviders, null, /* @__PURE__ */ React.createElement(ServerVariableSyncProvider, null, /* @__PURE__ */ React.createElement(RootWrapper, null, /* @__PURE__ */ React.createElement(NotificationWrapper, null), /* @__PURE__ */ React.createElement(Outlet, null), /* @__PURE__ */ React.createElement(VariableStateProvider, { wsClient }), props.daraData.enable_devtools && /* @__PURE__ */ React.createElement(DevTools, null))))));
74051
73901
  }
74052
73902
  const Wrapper = styled.div`
74053
73903
  overflow: auto;
@@ -74747,7 +74597,7 @@ body,
74747
74597
  );
74748
74598
  }
74749
74599
  function Root(props) {
74750
- return /* @__PURE__ */ React.createElement(ConfigContextProvider, { initialConfig: props.daraData }, /* @__PURE__ */ React.createElement(reactQuery.QueryClientProvider, { client: props.queryClient }, /* @__PURE__ */ React.createElement(ErrorBoundary$1, null, /* @__PURE__ */ React.createElement(importersCtx.Provider, { value: props.importers }, /* @__PURE__ */ React.createElement(directionCtx.Provider, { value: { direction: "row" } }, /* @__PURE__ */ React.createElement(Recoil_index_5, null, /* @__PURE__ */ React.createElement(GlobalTaskProvider, null, /* @__PURE__ */ React.createElement(RouterRoot, { daraData: props.daraData }))))))));
74600
+ return /* @__PURE__ */ React.createElement(ConfigContextProvider, { initialConfig: props.daraData }, /* @__PURE__ */ React.createElement(reactQuery.QueryClientProvider, { client: props.queryClient }, /* @__PURE__ */ React.createElement(ErrorBoundary$1, null, /* @__PURE__ */ React.createElement(directionCtx.Provider, { value: { direction: "row" } }, /* @__PURE__ */ React.createElement(Recoil_index_5, null, /* @__PURE__ */ React.createElement(GlobalTaskProvider, null, /* @__PURE__ */ React.createElement(RouterRoot, { daraData: props.daraData })))))));
74751
74601
  }
74752
74602
  async function run(importers) {
74753
74603
  const queryClient = new reactQuery.QueryClient();
@@ -74764,7 +74614,7 @@ body,
74764
74614
  ]);
74765
74615
  const container = document.getElementById("dara_root");
74766
74616
  const root = clientExports.createRoot(container);
74767
- root.render(/* @__PURE__ */ React.createElement(Root, { daraData, queryClient, importers }));
74617
+ root.render(/* @__PURE__ */ React.createElement(Root, { daraData, queryClient }));
74768
74618
  }
74769
74619
  function getBasename() {
74770
74620
  if (window.dara.base_url !== "") {
@@ -98736,7 +98586,6 @@ body,
98736
98586
  exports.FallbackCtx = fallbackCtx;
98737
98587
  exports.For = For;
98738
98588
  exports.GlobalTaskProvider = GlobalTaskProvider;
98739
- exports.ImportersCtx = importersCtx;
98740
98589
  exports.Link = Link;
98741
98590
  exports.LoaderError = LoaderError;
98742
98591
  exports.LockSecuredCache = SingleUseCache;
@@ -98751,7 +98600,6 @@ body,
98751
98600
  exports.PoweredByCausalens = PoweredByCausalens;
98752
98601
  exports.ProgressTracker = ProgressTracker;
98753
98602
  exports.ReactRouter = index;
98754
- exports.RegistriesCtxProvider = RegistriesCtxProvider;
98755
98603
  exports.RequestExtrasCtx = requestExtrasCtx;
98756
98604
  exports.RequestExtrasProvider = RequestExtrasProvider;
98757
98605
  exports.ResetVariables = ResetVariables;
@@ -98865,7 +98713,6 @@ body,
98865
98713
  exports.usePrevious = usePrevious$1;
98866
98714
  exports.useRefreshSelector = useRefreshSelector;
98867
98715
  exports.useRefreshServerComponent = useRefreshServerComponent;
98868
- exports.useRegistriesCtx = useRegistriesCtx;
98869
98716
  exports.useRequestExtras = useRequestExtras;
98870
98717
  exports.useRouterContext = useRouterContext;
98871
98718
  exports.useSession = useSession;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.21.17
3
+ Version: 1.21.19
4
4
  Summary: Dara Framework Core
5
5
  Home-page: https://dara.causalens.com/
6
6
  License: Apache-2.0
@@ -16,14 +16,15 @@ Provides-Extra: all
16
16
  Requires-Dist: aiorwlock (>=1.4.0,<2.0.0)
17
17
  Requires-Dist: anyio (>=4.0.0)
18
18
  Requires-Dist: async-asgi-testclient (>=1.4.11,<2.0.0)
19
+ Requires-Dist: backoff (>=2.2.1,<3.0.0)
19
20
  Requires-Dist: cachetools (>=5.0.0,<6.0.0)
20
21
  Requires-Dist: certifi (>=2024.7.4)
21
22
  Requires-Dist: click (>=8.1.3,<9.0.0)
22
23
  Requires-Dist: colorama (>=0.4.6,<0.5.0)
23
- Requires-Dist: create-dara-app (==1.21.17)
24
+ Requires-Dist: create-dara-app (==1.21.19)
24
25
  Requires-Dist: croniter (>=1.0.15,<3.0.0)
25
26
  Requires-Dist: cryptography (>=42.0.4)
26
- Requires-Dist: dara-components (==1.21.17) ; extra == "all"
27
+ Requires-Dist: dara-components (==1.21.19) ; extra == "all"
27
28
  Requires-Dist: exceptiongroup (>=1.1.3,<2.0.0)
28
29
  Requires-Dist: fastapi (>=0.115.0,<0.116.0)
29
30
  Requires-Dist: fastapi_vite_dara (==0.4.0)
@@ -54,7 +55,7 @@ Description-Content-Type: text/markdown
54
55
 
55
56
  # Dara Application Framework
56
57
 
57
- <img src="https://github.com/causalens/dara/blob/v1.21.17/img/dara_light.svg?raw=true">
58
+ <img src="https://github.com/causalens/dara/blob/v1.21.19/img/dara_light.svg?raw=true">
58
59
 
59
60
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
60
61
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -99,7 +100,7 @@ source .venv/bin/activate
99
100
  dara start
100
101
  ```
101
102
 
102
- ![Dara App](https://github.com/causalens/dara/blob/v1.21.17/img/components_gallery.png?raw=true)
103
+ ![Dara App](https://github.com/causalens/dara/blob/v1.21.19/img/components_gallery.png?raw=true)
103
104
 
104
105
  Note: `pip` installation uses [PEP 660](https://peps.python.org/pep-0660/) `pyproject.toml`-based editable installs which require `pip >= 21.3` and `setuptools >= 64.0.0`. You can upgrade both with:
105
106
 
@@ -116,9 +117,9 @@ Explore some of our favorite apps - a great way of getting started and getting t
116
117
 
117
118
  | Dara App | Description |
118
119
  | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
119
- | ![Large Language Model](https://github.com/causalens/dara/blob/v1.21.17/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
120
- | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.21.17/img/plot_interactivity.png?raw=true) | Demonstrates how to enable the user to interact with plots, trigger actions based on clicks, mouse movements and other interactions with `Bokeh` or `Plotly` plots |
121
- | ![Graph Editor](https://github.com/causalens/dara/blob/v1.21.17/img/graph_viewer.png?raw=true) | Demonstrates how to use the `CausalGraphViewer` component to display your graphs or networks, customising the displayed information through colors and tooltips, and updating the page based on user interaction. |
120
+ | ![Large Language Model](https://github.com/causalens/dara/blob/v1.21.19/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
121
+ | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.21.19/img/plot_interactivity.png?raw=true) | Demonstrates how to enable the user to interact with plots, trigger actions based on clicks, mouse movements and other interactions with `Bokeh` or `Plotly` plots |
122
+ | ![Graph Editor](https://github.com/causalens/dara/blob/v1.21.19/img/graph_viewer.png?raw=true) | Demonstrates how to use the `CausalGraphViewer` component to display your graphs or networks, customising the displayed information through colors and tooltips, and updating the page based on user interaction. |
122
123
 
123
124
  Check out our [App Gallery](https://dara.causalens.com/gallery) for more inspiration!
124
125
 
@@ -145,9 +146,9 @@ And the supporting UI packages and tools.
145
146
  - `ui-utils` - miscellaneous utility functions
146
147
  - `ui-widgets` - widget components
147
148
 
148
- More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.21.17/CONTRIBUTING.md) file.
149
+ More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.21.19/CONTRIBUTING.md) file.
149
150
 
150
151
  ## License
151
152
 
152
- Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.21.17/LICENSE).
153
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.21.19/LICENSE).
153
154
 
@@ -26,7 +26,7 @@ dara/core/interactivity/derived_variable.py,sha256=RMZbc1capmj_ceSG45GiQpheNgE1y
26
26
  dara/core/interactivity/filtering.py,sha256=_F0OtECufYCptRI6h98_vDliG9xcPD5SItlQkjiNqR4,9667
27
27
  dara/core/interactivity/loop_variable.py,sha256=vA09qhs7DJ7x_4oefhGG0K3MKrpkAnMXviWw2eBi_pU,2953
28
28
  dara/core/interactivity/non_data_variable.py,sha256=k2yXTowWmH5UhG9iJfYo_bUG7AT5fdKSwX5LcDQ71-4,178
29
- dara/core/interactivity/plain_variable.py,sha256=tuEY6FRvDpKvaXAqnz7ik0vXFxWOJ9jy9shUL21Z1dA,13087
29
+ dara/core/interactivity/plain_variable.py,sha256=tg4D8UMno5cwGtM4U6FJKPbjhRRk6rZ6hJeiGgbGdrw,13123
30
30
  dara/core/interactivity/server_variable.py,sha256=s1OoLIyWIVF0TAId5Pv3b6ZZpBEHjzTotYQufAYHjZI,11109
31
31
  dara/core/interactivity/state_variable.py,sha256=Xpiazq25XS12dgvr3m1ojoqSy7svdmMaRMBxABusOzQ,2441
32
32
  dara/core/interactivity/switch_variable.py,sha256=dhmAnF2KmL4944TJVipV-30BPYSLoD-uxyBP49W3V9Q,14099
@@ -61,7 +61,7 @@ dara/core/internal/port_utils.py,sha256=3NN94CubNrIYQKmPM4SEwstY-UMqsbbe1M_JhyPc
61
61
  dara/core/internal/registries.py,sha256=j_Z3KqmiNHK3HsYmQI2O23B12MsT31SPvo3ezemASR8,3654
62
62
  dara/core/internal/registry.py,sha256=Wqt7tEOmf5bR8D6lFIcLd3W1EtlENT364vRhxSqeOIQ,4356
63
63
  dara/core/internal/registry_lookup.py,sha256=XgZ4PL4RLyKWNTXkh08lL6mmU492xgdPUsvFKA6pKDY,2411
64
- dara/core/internal/routing.py,sha256=zp-5RDLIbpEabfd5ePaTVlnckQQ5uOHObjMjj0A1c7c,26631
64
+ dara/core/internal/routing.py,sha256=C4_GLsXHueQ2Q4VVDgrY9bezr3YGZFdL6Yfs6C81Op8,26458
65
65
  dara/core/internal/scheduler.py,sha256=3LYdWAyFp8N1s9Xfud9XYwUbjcHpI-hCay3jZ5zRAiQ,12991
66
66
  dara/core/internal/settings.py,sha256=tlJmmpN_bSwxIZPJcb9EyUcCxicV4LM0xj2G6Qvj_9A,3900
67
67
  dara/core/internal/store.py,sha256=aq37Tk4J3DoqzLVHuZRbZFkpghKP-oiCbpQfIE95gCo,6399
@@ -82,7 +82,7 @@ dara/core/js_tooling/templates/dara.config.json,sha256=RZG_R_xJv_5rYIoz2QZulcG49
82
82
  dara/core/js_tooling/templates/vite.config.template.ts,sha256=W-R9LtXPMv7vQkqMawMmeFrjaQ22xrGU0iYyS_nHkh4,1199
83
83
  dara/core/log_configs/logging.yaml,sha256=YJyD18psAmSVz6587dcEOyoulLuRFFu1g8yMXl1ylM0,706
84
84
  dara/core/logging.py,sha256=Exe8dz8sbE1NDwRnqSoPCTnWtYe8BPLrO1n9gJQ1neQ,13214
85
- dara/core/main.py,sha256=045oWfEHd86b5WnanEWNNsMzYj_ugg-YIqcsxDk9tn8,20772
85
+ dara/core/main.py,sha256=-5ODqC0e2r8zh48tg0owv5-V-vyvT7_ASUSacek3qHs,20960
86
86
  dara/core/metrics/__init__.py,sha256=2UqpWHv-Ie58QLJIHJ9Szfjq8xifAuwy5FYGUIFwWtI,823
87
87
  dara/core/metrics/cache.py,sha256=3Sw2JWofa1vxc39NwQ8LOdTd9sX3gkrPSojjjnr-u1I,2594
88
88
  dara/core/metrics/runtime.py,sha256=YP-6Dz0GeI9_Yr7bUk_-OqShyFySGH_AKpDO126l6es,1833
@@ -93,7 +93,7 @@ dara/core/router/compat.py,sha256=B83wq46AwQARTDfZwGrpr0slrnQmi_T7shOUNpqltSM,31
93
93
  dara/core/router/components.py,sha256=Wsf_bBnnN-1EE5jhbjPSOyDv_TVKEsY4royyOQOazM4,6132
94
94
  dara/core/router/dependency_graph.py,sha256=A0xGuZWSOCGs7rwHbeZC5vLvZouUt-2fnEX9VM2Ukp0,2280
95
95
  dara/core/router/router.py,sha256=5Nh7ms7ynnUWEV1FuCus-XvGp4NAe4OB1jdS2x5SS7Q,31249
96
- dara/core/umd/dara.core.umd.cjs,sha256=CAfqSc0a7SEK9gTJUoKr0bksjFjfeCpKlq0Ls5XSDp0,5152269
96
+ dara/core/umd/dara.core.umd.cjs,sha256=8pJvabwoDOeVaLvntyUFRDgLWwfpPt3JBqykPs4g1Cs,5146284
97
97
  dara/core/umd/style.css,sha256=yT3PKpi2sKI2-kQIF8xtVbTPQqgpK7-Ua7tfzDPuSsI,4095881
98
98
  dara/core/visual/__init__.py,sha256=QN0wbG9HPQ_vXh8BO8DnBXeYLIENVTNtRmYzZf1lx7c,577
99
99
  dara/core/visual/components/__init__.py,sha256=nmCsnMLXeZAjkhMYz-mIFodpVY-69IO1fvwwXbFlMQ4,2447
@@ -120,8 +120,8 @@ dara/core/visual/themes/__init__.py,sha256=aM4mgoIYo2neBSw5FRzswsht7PUKjLthiHLmF
120
120
  dara/core/visual/themes/dark.py,sha256=UQGDooOc8ric73eHs9E0ltYP4UCrwqQ3QxqN_fb4PwY,1942
121
121
  dara/core/visual/themes/definitions.py,sha256=jywX4ObSPSW5ppm5mki50L_dPEIeAWweYre1C225STk,2697
122
122
  dara/core/visual/themes/light.py,sha256=-Tviq8oEwGbdFULoDOqPuHO0UpAZGsBy8qFi0kAGolQ,1944
123
- dara_core-1.21.17.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
124
- dara_core-1.21.17.dist-info/METADATA,sha256=9ENqijyvgYrI0rtsh-UR-abNBoUZYmu7WUHkYu9SJeg,7502
125
- dara_core-1.21.17.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
126
- dara_core-1.21.17.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
127
- dara_core-1.21.17.dist-info/RECORD,,
123
+ dara_core-1.21.19.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
124
+ dara_core-1.21.19.dist-info/METADATA,sha256=ulaLG17Wt4CTX6R4f_cebbcs4Ez5Jie1MHvCqemzO04,7542
125
+ dara_core-1.21.19.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
126
+ dara_core-1.21.19.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
127
+ dara_core-1.21.19.dist-info/RECORD,,