Skip to main content

Generic DuploClient for Python apps.

Project description

Duplocloud Py Client

Tests PyPI - Version

duploctl is a package that spawns service clients that work with Duplocloud. 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

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:

Arg Env Var Description Default Required
--host, -H DUPLO_HOST The host to connect to Yes
--token, -T DUPLO_TOKEN The token to use for auth Yes
--tenant, -t DUPLO_TENANT The tenant to use for auth default No

CLI

CLI command syntax for invoking duploctl

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

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.

duplo, args = DuploClient.from_env()
out = duplo.run("tenant", "list")

Spawn a client with a custom host and token from a Python script.

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

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

duplocloud-client-0.1.15.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

duplocloud_client-0.1.15-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file duplocloud-client-0.1.15.tar.gz.

File metadata

  • Download URL: duplocloud-client-0.1.15.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for duplocloud-client-0.1.15.tar.gz
Algorithm Hash digest
SHA256 9989110bc013d356aecef8754f24e9c0f729c5b4aec519bfe2005270f61e2607
MD5 c306a4aa0fffecabfb3cbca989f38316
BLAKE2b-256 6a8ff4dc0351666b7586b6cc9433792014cf823c9543a93c1445646a42cf898a

See more details on using hashes here.

Provenance

File details

Details for the file duplocloud_client-0.1.15-py3-none-any.whl.

File metadata

File hashes

Hashes for duplocloud_client-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 ccf6fc98d58606f3cb0a6a40a812f45a261869bf283aa1b2535d2863f4451713
MD5 9c3479aebd00feaf6a4cb08c2be30d10
BLAKE2b-256 f4c6afc5136a558c4c16f7b1bb2443bf95c7f5b9a5ac4eff6f4a86691206f5bf

See more details on using hashes here.

Provenance

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