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
, keysusername
andpassword
(optional) - Section
clusterapi
, keyapikey
(optional)
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-3.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3ad12d3fec3ffc4ff3325c6d435de915df78f188098b281c419ac0eef56c61b |
|
MD5 | 838fba0819d644c9b0597797e31db6e8 |
|
BLAKE2b-256 | e9d751092e535b7f25e9b24b883d4b8f05adab8dfefa6438976301845f8b7b38 |