One Line Code To Get A List Of Items From All The Fabric/Premium Workspaces

Using Semantic Link v0.5

What the title says, thanks to the latest version (v0.5) of Semantic Link

!pip install --upgrade semantic-link --q #upgrade to semantic-link v0.5

import sempy.fabric as fabric
import pandas as pd 

df = pd.concat([fabric.list_items(workspace=ws) for ws in fabric.list_workspaces().query('`Is On Dedicated Capacity` == True').Id], ignore_index=True)

If you have a large tenant with thousands of workspaces and items, this will be slow. In that case optimize the code to execute in parallel using ThreadPoolExecutor