Skip to content

First sketch of a deepcopy between tiled instances#1306

Draft
danielballan wants to merge 2 commits intobluesky:mainfrom
danielballan:copy
Draft

First sketch of a deepcopy between tiled instances#1306
danielballan wants to merge 2 commits intobluesky:mainfrom
danielballan:copy

Conversation

@danielballan
Copy link
Copy Markdown
Member

@danielballan danielballan commented Mar 11, 2026

This is enables workflows like databroker-pack but for Tiled.

from tiled.client.copy import deepcopy
from tiled.queries import KeysFilter
from tiled.client import from_uri
from tiled.client import simple

# Start a local server (in thread).
d = simple("data_dir")

# Connect to remote production server.
c = from_uri('https://tiled.nsls2.bnl.gov')

# Query for dataset(s) of interest --- just one in this example, but could be more.
r = c['bmm/migration'].search(KeysFilter(['f8c83910-4adb-4207-a465-9ff0ff0e9cd2']))

# Copy metadata and data from remote to local server.
deepcopy(r, d)

Checklist

  • Add a Changelog entry
  • Add the ticket number which this PR closes to the comment section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant