Skip to content

Commit bc46727

Browse files
authored
Assets docs (#1037)
1 parent cfecc6e commit bc46727

File tree

9 files changed

+91
-2
lines changed

9 files changed

+91
-2
lines changed

changelog/2025-07-10-assets/index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
slug: assets
3+
version: v1.505.0
4+
title: Assets
5+
tags: ['assets', 'storage', 'scripts', 'flows']
6+
description: Visualize your data flow and automatically track where your assets are used
7+
features:
8+
- Assets are automatically parsed from your code
9+
- Read / Write mode is infered from code context
10+
- Add S3 file assets easily through the editor bar
11+
- Flow graph displays asset nodes as input or output depending on the infered read / write mode
12+
- You can manually select the Read / Write mode for an asset when it is ambiguous in the code
13+
- Passing a resource or an s3 file object as input of a flow will display it as an input asset in the run preview
14+
- Assets page to see where your assets are used
15+
- Explore database / S3 Object Preview button
16+
- Unified URI syntax (res://path/to/res, s3://storage/path/to/file.csv, etc)
17+
docs: /docs/core_concepts/assets
18+
---
59.8 KB
Loading
166 KB
Loading
85.1 KB
Loading
74.5 KB
Loading
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Assets
2+
3+
Windmill auto detects when you reference assets directly in your code. Assets are referenced with URIs and include:
4+
5+
- S3 Objects : s3://storage/path/to/file.csv
6+
- Resources : res://path/to/resource
7+
- Variables : var://path/to/variable
8+
9+
![Assets in script editor](./assets_in_script_editor.png 'Assets in script editor')
10+
11+
As of writing this, assets are supported for the following languages:
12+
13+
- Python
14+
- JavaScript / TypeScript
15+
- DuckDB
16+
17+
When the asset is a database resource or an S3 file, an explore button will appear next to the asset.
18+
19+
Read / Write mode is infered from code context.
20+
For example, a `COPY (...) TO file` statement is always `Write`.
21+
Sometimes the Read / Write mode cannot be inferred, in which case you are able to manually select it.
22+
23+
You can use the Add Resource / Variable / S3 Object buttons in the editor bar for convenience :
24+
25+
<video
26+
className="border-2 rounded-lg object-cover w-full h-full dark:border-gray-800"
27+
autoPlay
28+
controls
29+
id="main-video"
30+
src="/videos/assets_demo.mp4"
31+
/>
32+
<br />
33+
34+
The python and Typescript/Javascript clients now support the new URI syntax :
35+
36+
```python
37+
wmill.get_resource('res://path/to/resource')
38+
wmill.get_variable('var://path/to/variable')
39+
wmill.load_s3_file('s3://storage/path/to/file.csv')
40+
41+
# Not using the URI syntax still works for back-compatibility,
42+
# and is detected as an asset
43+
wmill.load_s3_file('storage/path/to/file.csv')
44+
```
45+
46+
## Asset nodes in flows
47+
48+
In flows, your assets will show up as asset nodes, making data flow easy to visualize :
49+
50+
![Asset nodes](./asset_nodes.png 'Asset nodes')
51+
52+
The Read/Write mode is used to show the asset as an input or output node.
53+
54+
When running a flow and passing an asset as an input, it will appear as an input of the flow in the preview graph :
55+
56+
![Flow input assets](./flow_input_assets.png 'Flow input assets')
57+
58+
## Tracking where your assets are used
59+
60+
Assets are stored in the database upon script / flow deployment.
61+
You can see a list of all assets used in your workspace by going to the Assets tab in the sidebar.
62+
63+
Clicking on the `usages` link will show the list of scripts and flows that use the asset.
64+
65+
![Assets page](./assets_page.png 'Assets page')

docs/core_concepts/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ On top of its editors to build endpoints, flows and apps, Windmill comes with a
217217
description="Have AI complete code on Windmill."
218218
href="/docs/core_concepts/ai_generation"
219219
/>
220+
<DocCard
221+
title="Assets"
222+
description="Visualize your data flow and automatically track where your assets are used"
223+
href="/docs/core_concepts/assets"
224+
/>
220225
</div>
221226

222227
## Hosting & advanced

sidebars.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ const sidebars = {
251251
label: 'Engine benchmarks',
252252
link: {
253253
type: 'doc',
254-
id: 'misc/benchmarks/competitors/results/index',
254+
id: 'misc/benchmarks/competitors/results/index'
255255
},
256256
items: [
257257
{
@@ -381,6 +381,7 @@ const sidebars = {
381381
'core_concepts/collaboration/index',
382382
'core_concepts/ai_generation/index',
383383
'core_concepts/workspace_settings/index',
384+
'core_concepts/assets/index',
384385
{
385386
type: 'category',
386387
label: 'Integrations',
@@ -858,7 +859,7 @@ const sidebars = {
858859
'apps/app_configuration_settings/components_groups',
859860
'apps/react_components',
860861
'apps/default_app/index',
861-
'apps/app_e-commerce',
862+
'apps/app_e-commerce'
862863
],
863864

864865
collapsed: true

static/videos/assets_demo.mp4

1.45 MB
Binary file not shown.

0 commit comments

Comments
 (0)