From 885ae15f47f3726ecf33655c398f3d173f45781b Mon Sep 17 00:00:00 2001 From: Dan Allan Date: Wed, 6 Mar 2024 16:26:57 -0500 Subject: [PATCH] Fix mistakes in register examples --- docs/source/how-to/register.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/source/how-to/register.md b/docs/source/how-to/register.md index 762eca8e7..f4e22d849 100644 --- a/docs/source/how-to/register.md +++ b/docs/source/how-to/register.md @@ -76,8 +76,8 @@ Use the Python client, as in this example. ```py from tiled.client import from_uri -from tiled.client.data_source import Asset, DataSource from tiled.structures.core import StructureFamily +from tiled.structures.data_source import Asset, DataSource # You can pass the api_key in explicitly as shown here, but for security, it # is best to set the API key in the environment variable TILED_API_KEY, which @@ -87,11 +87,17 @@ client = from_uri("http://localhost:8000", api_key="...") # POST /api/v1/register/{path} client.new( structure_family=StructureFamily.array, - data_sources=DataSource( - assets=[Asset(data_uri="file:///...", num=1), Asset(data_uri="file:///...", num=2)], - mimetype="multipart/related;type=image/tiff", - structure_family=StructureFamily.array, - ), + data_sources=[ + DataSource( + assets=[ + Asset(data_uri="file:///...", num=1), + Asset(data_uri="file:///...", num=2) + ], + mimetype="multipart/related;type=image/tiff", + structure_family=StructureFamily.array, + management="external", + ), + ], metadata={}, specs=[], )