Git Product home page Git Product logo

domo-python-sdk's Introduction

Python3 - Domo API SDK (pydomo)

License

Current Release: 0.2.2.1

Notice - Python 3 Compatibility

  • PyDomo is written for Python3, and is not compatible with Python2
  • Execute scripts via 'python3', and updates via 'pip3'

About

  • The Domo API SDK is the simplest way to automate your Domo instance
  • The SDK streamlines the API programming experience, allowing you to significantly reduce your written code
  • This SDK was written for Python3, and is not compatible with Python2
  • PyDomo has been published to PyPI. The SDK can be easily installed via pip3 install pydomo, and can be updated via pip3 install pydomo --upgrade

Features:

Setup

  • Install Python3: https://www.python.org/downloads/
    • Linux: 'apt-get install python3'
    • MacOS: 'brew install python3'
    • Windows: direct download, or use Bash on Windows 10
  • Install PyDomo and its dependencies via pip3 install pydomo

Updates

  • Update your PyDomo package via pip3 install pydomo --upgrade
  • View the changelog

Usage

  • See examples.py for full usage
  • To run this file, copy/paste its contents, enter your ID and Secret (https://developer.domo.com/manage-clients), and execute "python3 run_examples.py"
  • Create an API Client on the Domo Developer Portal
  • Use your API Client id/secret to instantiate pydomo 'Domo()'
  • Multiple API Clients can be used by instantiating multiple 'Domo()' clients
  • Authentication with the Domo API is handled automatically by the SDK
  • If you encounter a 'Not Allowed' error, this is a permissions issue. Please speak with your Domo Administrator.
import logging
from pydomo import Domo

# Build an SDK configuration
client_id = 'MY_CLIENT_ID'
client_secret = 'MY_CLIENT_SECRET'
api_host = 'api.domo.com'

# Configure the logger
handler = logging.StreamHandler()
handler.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logging.getLogger().addHandler(handler)

# Create an instance of the SDK Client
domo = Domo(client_id, client_secret, logger_name='foo', log_level=logging.INFO, api_host=api_host)

# Manage DataSets
domo.datasets.create()

# Manage Streams
domo.streams.create()

# Manage Users
domo.users.create()

# Manage User Groups
domo.groups.create()

# Manage Pages
domo.pages.create()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.