Jae Wilson @DataCrew

Query Domo Jupyter using Python 4 of 4 || building class functions

September 14, 2023

Hook (1-2 sentences): Domo's APIs are inconsistent — the same concept might be id, page_id, or database_id depending on which endpoint you hit. Python classes fix this by giving you a single, predictable interface regardless of what the raw API returns.

Why It Matters (2-4 sentences): Without a class layer, every script you write has to re-learn the API's quirks — field name variations, authentication plumbing, and repeated boilerplate for common operations like enabling PDPs or triggering dataset execution. That means bugs multiply as scripts diverge, and onboarding anyone else to your codebase becomes painful. A well-designed class hierarchy means your teammates always know that DomoPage.id is id, full stop — and that any instance already knows how to authenticate itself.

What You'll Learn

  • Build a DomoJupyterContent class that normalizes a single piece of Jupyter content with consistent attributes
  • Design a DomoJupyter manager class that operates across all content objects (bulk operations, mapping, etc.)
  • Understand the separation between individual object classes and collection manager classes
  • Pass an auth object into class methods so authentication is handled once, not per-call
  • Apply this pattern to any Domo API resource — datasets, pages, cards — not just Jupyter