{"id":5797,"library":"pydomo","title":"Domo Python SDK","description":"pydomo is the official Python SDK for interacting with the Domo API. It provides a convenient way to manage Domo datasets, users, groups, and more, streamlining data integration and automation workflows. The current version is 0.3.0.16, with an active but irregular release cadence focusing on bug fixes, feature parity with the R SDK, and API improvements.","status":"active","version":"0.3.0.16","language":"en","source_language":"en","source_url":"https://github.com/domoinc/domo-python-sdk","tags":["domo","api","sdk","business-intelligence","data-analytics"],"install":[{"cmd":"pip install pydomo","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Used for handling data uploads and downloads as DataFrames, a core part of the SDK's data interaction.","package":"pandas"}],"imports":[{"symbol":"Domo","correct":"from pydomo import Domo"},{"symbol":"DomoAPIException","correct":"from pydomo.exceptions import DomoAPIException"}],"quickstart":{"code":"import os\nfrom pydomo import Domo\nfrom pydomo.exceptions import DomoAPIException\n\n# Available from environment variables or a config file\nCLIENT_ID = os.environ.get('DOMO_CLIENT_ID', 'your_client_id')\nCLIENT_SECRET = os.environ.get('DOMO_CLIENT_SECRET', 'your_client_secret')\nAPI_HOST = os.environ.get('DOMO_API_HOST', 'api.domo.com') # can be overridden for sandbox etc.\n\nif not CLIENT_ID or not CLIENT_SECRET:\n    print(\"Error: DOMO_CLIENT_ID and DOMO_CLIENT_SECRET environment variables must be set.\")\n    exit(1)\n\ndo = Domo(CLIENT_ID, CLIENT_SECRET, api_host=API_HOST)\n\ntry:\n    # Example: List up to 10 datasets\n    datasets = do.datasets\n    list_of_datasets = datasets.list(limit=10)\n    if list_of_datasets:\n        print(f\"Found {len(list_of_datasets)} datasets:\")\n        for ds in list_of_datasets:\n            print(f\"  ID: {ds['id']}, Name: {ds['name']}\")\n    else:\n        print(\"No datasets found.\")\n\nexcept DomoAPIException as e:\n    print(f\"Domo API Error: {e}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")","lang":"python","description":"Initializes the Domo client and demonstrates how to list the first 10 datasets in your Domo instance. Ensure `DOMO_CLIENT_ID` and `DOMO_CLIENT_SECRET` environment variables are set."},"warnings":[{"fix":"Review release notes for v0.3.0 and update method calls to the new naming conventions and access patterns. For example, some operations previously accessed via sub-clients might now be directly on the main client.","message":"Version 0.3.0 introduced significant API refactoring. Method names were changed to align with the R SDK and a more object-oriented pattern, making primary methods available directly on the `Domo` object rather than requiring sub-objects.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Ensure your code is updated to process Pandas DataFrames when consuming data downloaded via the SDK. Use DataFrame methods for manipulation or convert to other formats if necessary.","message":"From version 0.3.0, methods that download data from Domo (e.g., `datasets.get()`) now exclusively return a Pandas DataFrame. Code expecting other data structures (like lists of dictionaries) will break.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"When deleting datasets programmatically, add the argument `prompt_before_delete=False` to the `datasets.delete()` method call to bypass the interactive confirmation.","message":"The `datasets.delete()` method (formerly `ds_delete`) introduced a mandatory confirmation prompt in v0.3.0.1. Automated scripts will hang unless `prompt_before_delete=False` is explicitly passed.","severity":"breaking","affected_versions":">=0.3.0.1"},{"fix":"Thoroughly review and test any code interacting with group management functions. Pay close attention to parameter types, order, and expected return values as they have changed.","message":"Group management functions (`groups_add_users`, `groups_create`, `groups_list`) were significantly modified in v0.3.0.1 to fix prior incorrect behavior and align with the R SDK. Existing code using these functions might behave unexpectedly or fail.","severity":"gotcha","affected_versions":">=0.3.0.1"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}