Simple Digital Ocean CLI by python.

Overview

digital-ocean-manager

Usage

python3 -m pip install -r requirements.txt
python3 do-cli.py -h
usage: do-cli.py [-h] [-c] [-q] [-k] [-f FILE] [-d] [-t TOKEN] [-n NAME] [-r REGION] [-i IMAGE] [-s SIZE_SLUG] [-b]

Manage your Digital Ocean droplets by simple CLI.

optional arguments:
  -h, --help            show this help message and exit
  -c, --create          create a droplet.
  -q, --quiet           run without inquiry.
  -k, --no_upload_keys  do not upload all your ssh keys.
  -f FILE, --file FILE  load args from json file.
  -d, --destroy         destroy a droplet. (destroy all droplets if not name provided.)
  -t TOKEN, --token TOKEN
                        use token. (both $DIGITALOCEAN_ACCESS_TOKEN and secret.DIGITALOCEAN_ACCESS_TOKEN are ok.)
  -n NAME, --name NAME  droplet name.
  -r REGION, --region REGION
                        droplet region.
  -i IMAGE, --image IMAGE
                        droplet image.
  -s SIZE_SLUG, --size_slug SIZE_SLUG
                        droplet size.
  -b, --backups         enable droplet backups.

Example

# Create a droplet from do-cli.json, wait key, and then destroy it.
python3 do-cli.py -f do-cli.json -c -d

Loaded args from do-cli.json: {'name': 'temp-droplet', 'region': 'sgp1', 'image': 'ubuntu-20-04-x64', 'size_slug': 's-1vcpu-1gb', 'backups': False}
Warning: will create the droplet and wait until key down.
args: {'backups': False, 'name': 'temp-droplet', 'region': 'sgp1', 'image': 'ubuntu-20-04-x64', 'size_slug': 's-1vcpu-1gb'}
Creating droplet: temp-droplet
will upload your ssh keys.
create droplet status: in-progress
create droplet status: in-progress
create droplet status: in-progress
create droplet status: in-progress
create droplet status: in-progress
create droplet status: in-progress
create droplet status: in-progress
create droplet status: in-progress
create droplet status: completed
Continue to destory this droplet (temp-droplet)? [Y/n]y
Destroying droplet: temp-droplet...
destroy droplet status: in-progress
destroy droplet status: completed

Args

DIGITALOCEAN_ACCESS_TOKEN: You can generate it from here. Set it as $DIGITALOCEAN_ACCESS_TOKEN or create python file named as secrets.py is ok.

do-cli.json:

{
  "name": "temp-droplet",
  "region": "sgp1",
  "image": "ubuntu-20-04-x64",
  "size_slug": "s-1vcpu-1gb",
  "backups": false
}
You might also like...
QueraToCSV is a simple python CLI project to convert the Quera results file into CSV files.

Quera is an Iranian Learning management system (LMS) that has an online judge for programming languages. Some Iranian universities use it to automate the evaluation of programming assignments.

A simple note taker CLI program written in python
A simple note taker CLI program written in python

note-taker A simple note taker program written in python This allows you to snip your todo's, notes, and your tasks easily without extra charges Requi

A simple Python CLI tool that draws routes/paths on a given map.

Map Router A simple Python CLI tool that draws routes/paths on a given map. Index Installation Usage Docs Why? License Support Installation Coming soo

A Simple Python CLI Lockpicking Tool

Cryptex a simple CLI lockpicking tool What can it do: Encode / Decode Hex Encode / Decode Base64 Break Randomly :D Requirements: Python3 Linux as your

CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple commands.

CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple com

Cthulhu is a simple python CLI application that streams torrents directly from 1337x.
Cthulhu is a simple python CLI application that streams torrents directly from 1337x.

Cthulhu is a simple python CLI application that facilitates the streaming of torrents directly from 1337x. It uses webtorrent to stream video

Simple CLI tool to track your cryptocurrency portfolio in real time.
Simple CLI tool to track your cryptocurrency portfolio in real time.

Simple tool to track your crypto portfolio in realtime. It can be used to track any coin on the BNB network, even obscure coins that are not listed or trackable by major portfolio tracking applications.

Un module simple pour demander l'accord de l'utilisateur dans une CLI.
Un module simple pour demander l'accord de l'utilisateur dans une CLI.

Demande de confirmation utilisateur pour CLI Présentation ask_lib est un module pour le langage Python proposant une seule fonction; ask(). Le but pri

A simple cli tool to commit Conventional Commits

convmoji A simple cli tool to commit Conventional Commits. Requirements Install pip install convmoji convmoji --help Examples A conventianal commit co

Owner
Chiro
HITszer, CS Sophomore.
Chiro
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Ayush Soni 1 Nov 5, 2021
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

null 1 Feb 5, 2022
Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 29, 2022
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

null 14 Sep 11, 2022
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Rafael Torres 2 Dec 10, 2021
[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

null 166 Dec 30, 2022
Logic-Sim - A clone of 'Digital Logic Sim' from Sebastian Lague

Logic Simulator This is a clone of 'Digital Logic Sim' from Sebastian Lague. But

Ethan 1 Feb 1, 2022
cli simple python script to interact with iphone afc api based on python library( tidevice )

afcclient cli simple python script to interact with iphone afc api based on python library( tidevice ) installation pip3 install -U tidevice cp afccli

fyst_14 2 Jul 15, 2022
Dead simple CLI tool to try Python packages - It's never been easier! :package:

try - It's never been easier to try Python packages try is an easy-to-use cli tool to try out Python packages. Features Install specific package versi

Timo Furrer 659 Dec 28, 2022