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.
-
Install
pyenv
: Follow the official installation instructions found at pyenv Installation Guide. -
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
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ubidots_cli-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40553a4a2de127a738b163b195d774442f353a9cf2fb39de6ce937120679acef |
|
MD5 | 7f4644a8d43f73944e80a1bfadc32147 |
|
BLAKE2b-256 | b8e60b1d60247f6756c22445fb6e800fcf2f0ff28470ffa4481c049fb96d0fcb |