API client for Cluster API.
Project description
python3-cyberfusion-cluster-apicli
API client for Cluster API.
Install
PyPI
Run the following command to install the package from PyPI:
pip3 install python3-cyberfusion-cluster-apicli
Generic
Run the following command to create a source distribution:
python3 setup.py sdist
Debian
Run the following commands to build a Debian package:
mk-build-deps -i -t 'apt -o Debug::pkgProblemResolver=yes --no-install-recommends -y'
dpkg-buildpackage -us -uc
Configure
Config file options
- Section
clusterapi
, keyserverurl
- Section
clusterapi
, keyusername
- Section
clusterapi
, keypassword
Class options
config_file_path
. Non-default config file path.authenticate
. Endpoint is called without token when set.
Usage
Basic
from cyberfusion.ClusterApiCli import ClusterApiRequest
endpoint = "/api/v1/certificates"
r = ClusterApiRequest()
Request
First, set the request:
r.GET(endpoint)
r.PATCH(endpoint)
r.PUT(endpoint)
r.POST(endpoint)
r.DELETE(endpoint)
Then execute the request:
print(r.execute())
Tests
Run tests with pytest:
pytest tests/
The config file in cyberfusion.cfg
(working directory) is used.
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
Close
Hashes for python3-cyberfusion-cluster-apicli-2.5.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c31cdb2a9e8ffebdee5b6f2534a6209e1436e4383ccac0ad2473d236be118349 |
|
MD5 | dfb4c836410a23b4ab4c5636f04f8071 |
|
BLAKE2b-256 | 4136231dd88fcbb4e03f0de443f5ec68f36c736cc96a4148f436c6946835f439 |