Skip to main content

Generic DuploClient for Python apps.

Project description

Duplocloud Py Client

Tests PyPI - Version

A package to spawn service clients for working with Duplocloud. This is a cli for interacting with duplocloud resources. This is great within cli pipelines. Built to be as extensible as possible and can be used as normal python module as well as cli.

Installation

From PyPi:

pip install duplocloud-client

Usage

This project may bes used as a cli or as a python module in your own unique script.

Configuration

The following inputs are global:

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

Here is a quick template on how the cli breaks down.

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

Python Module

Here is how to spawn your own client the quick way from args and env.

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

Here we show how to spawn a client with a custom host and token.

duplo = DuploClient(host="https://example.duplocloud.com", token="mytoken")
svc = duplo.load("tenant")
t = svc.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.8.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

duplocloud_client-0.1.8-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for duplocloud-client-0.1.8.tar.gz
Algorithm Hash digest
SHA256 b4d284b1b24a2d49f47fc39bcaf6378eef1fb3f190696886fa443c7a783e42b3
MD5 519d852a9ec893546405b9c2eff3a66b
BLAKE2b-256 bc07ae99dce1e65f2e0a682b1c9d6c4ef5e0eedfb21a0d2ae66ad809eaa102c2

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for duplocloud_client-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 16d226da886c1a5090d1700b4b40fefeeaf93bcb236bd7b747c8700e13bc092d
MD5 3f4b49be784ad6460d62be14ba276229
BLAKE2b-256 d17ba2ec67bd450d6979f3bae94646c89cb00964fadbf92876c288da7b64ed4a

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