Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

duplocloud-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

duplocloud-client

Command line Client for interacting with Duplocloud portals.

  • 0.2.41
  • PyPI
  • Socket score

Maintainers
1

Duplocloud Py Client

Unit Tests PyPI - Version Docker Image Version GitHub Release Static Badge

duploctl is a cli and package to work with a Duplocloud portal. It is a CLI for interacting with Duplocloud resources, such as Tenants, and is designed to work seamlessly within CLI-based CI/CD pipelines. It is a fully extensible package and can be used as both a Python module and a CLI.

Installation

From PyPi:

pip install duplocloud-client

From Homebrew:

brew install duplocloud/tap/duploctl

Usage

Use duploctl as a CLI or as a standalone Python module called by your custom script.

Configuration

Use the following syntax for these global arguments:

ArgEnv VarDescriptionDefaultRequired
--host, -HDUPLO_HOSTThe host to connect toYes
--token, -TDUPLO_TOKENThe token to use for authYes
--tenant, -tDUPLO_TENANTThe tenant to use for authdefaultNo

CLI

CLI command syntax for invoking duploctl

duploctl <resource> <command> <args...>

Example Usages

Full documentation is in the Wiki section.

Configure duploctl access with environment variables:

export DUPLO_HOST=https://example.duplocloud.net
export DUPLO_TOKEN=AQAAA...
export DUPLO_TENANT=dev01

List the services in a tenant:

duploctl service list

Register Profile for AWS:

duploctl jit update_aws_config myportal

Open AWS Web Console:

duploctl jit web

Get Kubernetes config:

duploctl jit update_kubeconfig myinfra

Python Module

Spawn your client from a Python script using the DuploClient.from_env() method and arguments. The second return value are the unparsed arguments from the command line. This example uses the client as a callable using command like syntax.

duplo, args = DuploClient.from_env()
t = duplo("tenant", "find", "mytenant")
print(t)

Spawn a client with a custom host and token from a Python script. This example loads a resource and runs a method manually.

duplo = DuploClient.from_creds(host="https://example.duplocloud.net", token="mytoken")
tenants = duplo.load("tenant")
t = tenants.find("mytenant")
print(t)

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc