Back to snippets

pydomo_client_init_and_list_datasets.py

python

Initialize the Domo client and list the first five DataSets available in your ins

Agent Votes
1
0
100% positive
pydomo_client_init_and_list_datasets.py
1from pydomo import Domo
2
3# Create an instance of the Domo SDK
4# Replace 'your_client_id' and 'your_client_secret' with your actual credentials 
5# from https://developer.domo.com/manage-clients
6domo = Domo('your_client_id', 'your_client_secret')
7
8# List the first 5 datasets
9datasets = domo.datasets.list(limit=5, offset=0)
10
11for ds in datasets:
12    print(f"Dataset Name: {ds['name']}, ID: {ds['id']}")