Skip to main content

A powerful CLI tool for efficient management and automation of cloud-based resources.

Project description

Ubidots CLI

This is the main repository for Ubidots CLI, a command-line interface for interacting with Ubidots services. It simplifies the process of managing your IoT devices and data.

Requirements

  • Poetry >=1.7.1 (Project started with version 1.7.1)
  • Pyenv (For managing multiple Python versions)
  • Python >=3.12.2 (Project started with version 3.12.2)
  • Docker (Currently required to execute functions)
  • Argo (Use the master_v2 branch from the Argo repository, necessary for executing functions)

Installation

To get started, clone the repository:

git clone git@bitbucket.org:ubidots/ubidots-cli.git

Poetry Installation

Install Poetry using the official instructions found at Poetry Installation Guide.

Python Version Management with pyenv

To manage multiple Python versions or ensure you're using the correct Python version for this project, pyenv is a recommended tool.

  1. Install pyenv: Follow the official installation instructions found at pyenv Installation Guide.

  2. Install the required Python version: Once pyenv is installed, you can install the specific Python version required for this project (as specified in the .python-version file):

    pyenv install 3.12.2
    
  3. Set the local Python version: To use the installed Python version for this project, set it locally:

    pyenv local 3.12.2
    

    This ensures that whenever you are in the project directory, pyenv will use the specified Python version.

Python Installation

To install the project dependencies, navigate to the project directory and run:

poetry install

Docker Installation

Docker is a platform for developing, shipping, and running applications. For detailed installation instructions, please visit the Docker Official Website.

Argo Installation

Clone the Argo repository and switch to the master_v2 branch:

git clone git@bitbucket.org:ubidots/argo.git

Refer to the README.md file in the Argo repository for more installation details.

Usage

Navigate to the ubidots-cli directory and activate the environment using:

poetry shell

Run ubidots --help to view available CLI commands. Each command may have its subcommands. Explore these in more detail using the --help flag.

> ubidots --help
                                                                                                                                              
 Usage: ubidots [OPTIONS] COMMAND [ARGS]...                                                                                                   
                                                                                                                                              
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion        [bash|zsh|fish|powershell|pwsh]  Install completion for the specified shell. [default: None]                   │
│ --show-completion           [bash|zsh|fish|powershell|pwsh]  Show completion for the specified shell, to copy it or customize the          │
│                                                              installation.                                                                 │
│                                                              [default: None]                                                               │
│ --help                                                       Show this message and exit.                                                   │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ config            Configure general settings for the CLI.                                                                                  │
│ dev               Device management and operations.                                                                                        │
│ fn                Tool for managing and deploying functions via API.                                                                       │
│ var               Variable management and operations.                                                                                      | ...                                                                                                                                        |
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Configuring Credentials

To configure credentials, run:

> ubidots config

API Domain [https://industrial.api.ubidots.com]: 
Authentication Method [TOKEN]: 
Access Token [*******************************kz4j]: 
Configuration saved successfully.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ubidots_cli-0.1.0.tar.gz (30.6 kB view hashes)

Uploaded Source

Built Distribution

ubidots_cli-0.1.0-py3-none-any.whl (46.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page