dara-core 1.18.0__py3-none-any.whl → 1.18.2__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.
- dara/core/internal/download.py +9 -1
- {dara_core-1.18.0.dist-info → dara_core-1.18.2.dist-info}/METADATA +11 -10
- {dara_core-1.18.0.dist-info → dara_core-1.18.2.dist-info}/RECORD +6 -6
- {dara_core-1.18.0.dist-info → dara_core-1.18.2.dist-info}/LICENSE +0 -0
- {dara_core-1.18.0.dist-info → dara_core-1.18.2.dist-info}/WHEEL +0 -0
- {dara_core-1.18.0.dist-info → dara_core-1.18.2.dist-info}/entry_points.txt +0 -0
dara/core/internal/download.py
CHANGED
|
@@ -19,6 +19,7 @@ from __future__ import annotations
|
|
|
19
19
|
|
|
20
20
|
import os
|
|
21
21
|
from collections.abc import Awaitable
|
|
22
|
+
from contextvars import ContextVar
|
|
22
23
|
from typing import Callable, Optional, Tuple
|
|
23
24
|
from uuid import uuid4
|
|
24
25
|
|
|
@@ -73,6 +74,13 @@ async def download(data_entry: DownloadDataEntry) -> Tuple[anyio.AsyncFile, Call
|
|
|
73
74
|
return (async_file, cleanup)
|
|
74
75
|
|
|
75
76
|
|
|
77
|
+
GENERATE_CODE_OVERRIDE = ContextVar[Optional[Callable[[str], str]]]('GENERATE_CODE_OVERRIDE', default=None)
|
|
78
|
+
"""
|
|
79
|
+
Optional context variable which can be used to override the default behaviour of code generation.
|
|
80
|
+
Invoked with the file path to generate a download code for.
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
|
|
76
84
|
async def generate_download_code(file_path: str, cleanup_file: bool) -> str:
|
|
77
85
|
"""
|
|
78
86
|
Generate a one-time download code for a given dataset.
|
|
@@ -88,7 +96,7 @@ async def generate_download_code(file_path: str, cleanup_file: bool) -> str:
|
|
|
88
96
|
user = USER.get()
|
|
89
97
|
|
|
90
98
|
# Unique download id
|
|
91
|
-
uid = str(uuid4())
|
|
99
|
+
uid = override(file_path) if (override := GENERATE_CODE_OVERRIDE.get()) else str(uuid4())
|
|
92
100
|
|
|
93
101
|
# Put it in the store under the registry entry with TTL configured
|
|
94
102
|
await store.set(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dara-core
|
|
3
|
-
Version: 1.18.
|
|
3
|
+
Version: 1.18.2
|
|
4
4
|
Summary: Dara Framework Core
|
|
5
5
|
Home-page: https://dara.causalens.com/
|
|
6
6
|
License: Apache-2.0
|
|
@@ -17,13 +17,14 @@ Provides-Extra: all
|
|
|
17
17
|
Requires-Dist: aiorwlock (>=1.4.0,<2.0.0)
|
|
18
18
|
Requires-Dist: anyio (>=4.0.0)
|
|
19
19
|
Requires-Dist: async-asgi-testclient (>=1.4.11,<2.0.0)
|
|
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)
|
|
22
23
|
Requires-Dist: colorama (>=0.4.6,<0.5.0)
|
|
23
|
-
Requires-Dist: create-dara-app (==1.18.
|
|
24
|
+
Requires-Dist: create-dara-app (==1.18.2)
|
|
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.18.
|
|
27
|
+
Requires-Dist: dara-components (==1.18.2) ; 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.18.
|
|
58
|
+
<img src="https://github.com/causalens/dara/blob/v1.18.2/img/dara_light.svg?raw=true">
|
|
58
59
|
|
|
59
60
|

|
|
60
61
|
[](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
|
-

|
|
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
|
-
|  | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
|
|
121
|
+
|  | 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
|
+
|  | 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.18.
|
|
149
|
+
More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.18.2/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.18.
|
|
153
|
+
Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.18.2/LICENSE).
|
|
153
154
|
|
|
@@ -39,7 +39,7 @@ dara/core/internal/cgroup.py,sha256=yKCTY8RxyxnNy-Mw4tfzeZew1dL8qw381gHBVE96-OA,
|
|
|
39
39
|
dara/core/internal/custom_response.py,sha256=aSPonh8AdRjioTk1MaPwdaJHkO4R4aG_osGAGCIHbtg,1341
|
|
40
40
|
dara/core/internal/dependency_resolution.py,sha256=FSy4sb4EtMv7P8KrPeWAo_VPb3stdg09DE1kefzCrEQ,11817
|
|
41
41
|
dara/core/internal/devtools.py,sha256=gqDT6laqe3rgTjTweswDLMiQ-EwEr5psyBJbygQtWPg,2378
|
|
42
|
-
dara/core/internal/download.py,sha256=
|
|
42
|
+
dara/core/internal/download.py,sha256=_AciKp4ZsJxq60LRnvhLsA7KNWMDAXRbSKpin8-vBmU,3589
|
|
43
43
|
dara/core/internal/encoder_registry.py,sha256=KTYBLIGHpJDOLzCp_9899D7EIISK0zxCKbn4Gktllxk,11200
|
|
44
44
|
dara/core/internal/execute_action.py,sha256=V5JmAkh-PoXHCNr0xcTtdw4UMOeY6VEOVvW_U8CeuS4,6779
|
|
45
45
|
dara/core/internal/hashing.py,sha256=Iz3FyiroHc_bC8AEtSUFFAIHh6j4Bq_EvxLqInIkAUM,1124
|
|
@@ -107,8 +107,8 @@ dara/core/visual/themes/__init__.py,sha256=aM4mgoIYo2neBSw5FRzswsht7PUKjLthiHLmF
|
|
|
107
107
|
dara/core/visual/themes/dark.py,sha256=UQGDooOc8ric73eHs9E0ltYP4UCrwqQ3QxqN_fb4PwY,1942
|
|
108
108
|
dara/core/visual/themes/definitions.py,sha256=nS_gQvOzCt5hTmj74d0_siq_9QWuj6wNuir4VCHy0Dk,2779
|
|
109
109
|
dara/core/visual/themes/light.py,sha256=-Tviq8oEwGbdFULoDOqPuHO0UpAZGsBy8qFi0kAGolQ,1944
|
|
110
|
-
dara_core-1.18.
|
|
111
|
-
dara_core-1.18.
|
|
112
|
-
dara_core-1.18.
|
|
113
|
-
dara_core-1.18.
|
|
114
|
-
dara_core-1.18.
|
|
110
|
+
dara_core-1.18.2.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
|
|
111
|
+
dara_core-1.18.2.dist-info/METADATA,sha256=1Ksy6uciZkddxlgIWdL2wpAmlY-hWgri7-CnX8g1xJA,7540
|
|
112
|
+
dara_core-1.18.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
113
|
+
dara_core-1.18.2.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
|
|
114
|
+
dara_core-1.18.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|