Skip to main content

V Cloud Market Command Tool For User.

Project description

V Cloud Market Command Tool For User

Install

pip install v-cloud-market-cli-user

Usage

Interactive Mode

Run with no arguments to start the interactive TUI:

vcloud            # mainnet
vcloud -t         # testnet

Non-Interactive CLI

All subcommands output JSON to stdout for scripting and automation.

# Browse the marketplace (no wallet needed)
vcloud market list-providers
vcloud market list-categories --provider v-kube-service
vcloud market list-services --provider v-kube-service --category Container-Service
vcloud market get-service <SERVICE_ID>
vcloud market get-provider <PROVIDER_NAME>

# Order management (wallet needed)
vcloud order list [--status OrderPending|OrderPaid|OrderFiled]
vcloud order get <ORDER_ID>
vcloud order create --service-id <ID> --duration <HOURS> --options '{"key":"val"}'
vcloud order pay <ORDER_ID> --amount <N> [--currency-index <N>]
vcloud order currencies

# Wallet operations (wallet needed)
vcloud wallet info [--balance-detail]
vcloud wallet balance
vcloud wallet pay --recipient <ADDR> --amount <N> [--attachment <TEXT>]

# Service management (wallet needed)
vcloud service list [--status ServiceRunning|ServicePending|ServiceDone|ServiceAbort]
vcloud service get <USER_SERVICE_ID> --provider <NAME>
vcloud service status <USER_SERVICE_ID> --provider <NAME>
vcloud service deploy <USER_SERVICE_ID> --provider <NAME> --config-file <PATH>
vcloud service restart <USER_SERVICE_ID> --provider <NAME>
vcloud service renew <USER_SERVICE_ID> [<ID>...] --duration <HOURS> --amount <N>
vcloud service refund <USER_SERVICE_ID> [<ID>...]

Global Options

Option Description
-t, --testnet Use testnet instead of mainnet
--address-index N Wallet address index (1-based, default 1)

Authentication

For password-protected wallets, set the VCLOUD_PASSWORD environment variable:

export VCLOUD_PASSWORD=yourpassword
vcloud order list

If the wallet has no password, no environment variable is needed.

Piping and Scripting

Output is JSON, so it works with jq and other tools:

# Get the first provider's name
vcloud market list-providers | jq '.list[0].name'

# Create an order and capture the order ID
ORDER_ID=$(vcloud order create --service-id <ID> --duration 1 --options '{}' | jq -r '.id')

# Pay for it
vcloud order pay "$ORDER_ID" --amount 1.76 --currency-index 1

Deployment Config File

The service deploy command takes a JSON config file. Example for deploying nginx:

{
  "containers": [
    {
      "name": "nginx",
      "imageName": "nginx:latest",
      "resourceUnit": 1,
      "ports": [{"containerPort": 80, "protocol": "TCP"}],
      "envs": [],
      "mountPath": "",
      "command": [],
      "args": [],
      "configMountPath": "",
      "config": ""
    }
  ],
  "pvtLogin": [{"username": "", "password": ""}]
}

Wallet Functions

  • Create new wallet
  • Reset wallet
  • Recover wallet with seed
  • Check balance of address in the wallet
  • Export wallet addresses to csv file

Market Services

  • Explore service provider information
  • Explore service category information
  • Explore service type information
  • Make order with service type id

Order Services

  • Pay the order with VSYS
  • Check the status of order
  • View order list
  • View specific order information
  • Refund an order
  • View refundable order list

User Service

  • Explore running user services
  • Explore usable user services
    • The status of usable user services are: ServicePending or ServiceRunning.
    • This function is to get secret information from service provider.
  • Explore expired user services

Run CLI in Local

Install dependencies with uv (preferred):

uv venv && source .venv/bin/activate
uv pip install -r requirements.txt && uv pip install -e .

Or with virtualenv:

pip3 install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt && pip install -e .

Run in mainnet:

python3 market_place_cli/use_main_interface.py

Run in testnet:

python3 market_place_cli/use_main_interface.py -t

Exit virtual environment:

deactivate

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

v_cloud_market_cli_user-0.12.0-py3-none-any.whl (133.8 kB view details)

Uploaded Python 3

File details

Details for the file v_cloud_market_cli_user-0.12.0-py3-none-any.whl.

File metadata

File hashes

Hashes for v_cloud_market_cli_user-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82f963518b58b9cc12cb821d0aae76b09c1f54985ae0e30724237882ce4394b8
MD5 368f29a3a7c9e3ce1b0925b1fe4ec0fc
BLAKE2b-256 0788d04012d70ef2f0d36fb7b244f5d902c5ddddf8ef68a53f6b80b39eed4548

See more details on using hashes here.

Supported by

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