Generic DuploClient for Python apps.
Project description
Duplocloud Py Client
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.
duplo = 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")
svc = duplo.load("tenant")
t = svc.find("mytenant")
print(t)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for duplocloud_client-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a9a6e27929c748694f6326cade3cf985ae6b7dac3a2165d6e87180f5795f568 |
|
MD5 | 8fb318e905c6ca9370d12ef5299478c3 |
|
BLAKE2b-256 | 1db2ed7585463fc54e8be6ec8c4828d5b46594246498e36f975508b60f8d2d4e |