Registry / crm-productivity / pydomo

pydomo

JSON →
library0.3.0.16pypypi✓ verified 21d ago

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.

pip install pydomo
INSTALL
IMPORT
SIG · PYDOMO
P
pydomo
crm-productivitypythonv0.3.0.16
Install
8.4s avg
Import
1227ms
Disk
169MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.0.16 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.254s · 168.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 8.4s · import 1.200s · 161MB
169MB installed
● package 169MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Domo
from pydomo import Domo
DomoAPIException
from pydomo.exceptions import DomoAPIException

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.

import os from pydomo import Domo from pydomo.exceptions import DomoAPIException # Available from environment variables or a config file CLIENT_ID = os.environ.get('DOMO_CLIENT_ID', 'your_client_id') CLIENT_SECRET = os.environ.get('DOMO_CLIENT_SECRET', 'your_client_secret') API_HOST = os.environ.get('DOMO_API_HOST', 'api.domo.com') # can be overridden for sandbox etc. if not CLIENT_ID or not CLIENT_SECRET: print("Error: DOMO_CLIENT_ID and DOMO_CLIENT_SECRET environment variables must be set.") exit(1) do = Domo(CLIENT_ID, CLIENT_SECRET, api_host=API_HOST) try: # Example: List up to 10 datasets datasets = do.datasets list_of_datasets = datasets.list(limit=10) if list_of_datasets: print(f"Found {len(list_of_datasets)} datasets:") for ds in list_of_datasets: print(f" ID: {ds['id']}, Name: {ds['name']}") else: print("No datasets found.") except DomoAPIException as e: print(f"Domo API Error: {e}") except Exception as e: print(f"An unexpected error occurred: {e}")
Debug
Known issues
breakingVersion 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.
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.
affects: >=0.3.0
breakingFrom 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.
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.
affects: >=0.3.0
breakingThe `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.
fix
When deleting datasets programmatically, add the argument `prompt_before_delete=False` to the `datasets.delete()` method call to bypass the interactive confirmation.
affects: >=0.3.0.1
gotchaGroup 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.
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.
affects: >=0.3.0.1
Errors
Common errors & fixes
Exception: Error creating DataSet: {"status":403,"statusReason":"Forbidden","message":"Access is denied"}
This error indicates that the Domo API client credentials (client ID and secret) either lack the necessary permissions to perform the requested action, such as creating a dataset, or are incorrect.
fix
Verify your API client ID and client secret are accurate, and ensure the associated API client in the Domo Developer Portal has the 'data' scope or other required permissions to create datasets.
Exception: Error uploading Data Part on Execution 1 on Stream 1233
This is a generic error from the PyDomo Streams API during a data part upload, often due to issues with data formatting, stream execution, or sequential part numbering.
fix
Examine the full error message for more specific details. Common solutions include ensuring your data (e.g., CSV) is correctly formatted, matches the dataset's schema, and that part numbers for large or incremental uploads are consecutive and well-ordered, starting from 1.
Invalid CSV provided during upload. msg=There are too many columns. Expected X. Row Y, column Z.
The CSV file being uploaded contains a different number of columns than what is defined in the target Domo dataset's schema.
fix
Modify your CSV data to ensure the number of columns precisely matches the column count in the corresponding Domo dataset's schema.
Exception: Error creating query: {"status":400,"statusReason":"Bad Request","message":"Cannot deserialize instance of \`java.lang.String\` out of START_OBJECT token"}
This error occurs when the `query` parameter in `domo.ds_query()` receives a dictionary (e.g., `{"sql": "SELECT * FROM table"}`) instead of a raw string containing the SQL query.
fix
Pass the SQL query directly as a string to the `query` parameter, for example: `df = domo.ds_query(dataset_id=dataset_id, query="SELECT * FROM table", return_data=True)`.
Upgrade
Version history
0.3.0.16latest on PyPI · released Nov 12, 2025
Audit
Dependencies
pandasrequiredUsed for handling data uploads and downloads as DataFrames, a core part of the SDK's data interaction.
Agent activity
44 hits · last 30 days
node
40
OpenAI (training)
1
Resources