Skip to main content

A client and service wrapper for HAProxy Fusion API

Project description

haproxy-fusion-client

A Python client and service wrapper for interacting with the HAProxy Fusion API.

Features

  • Authenticates with HAProxy Fusion
  • Fetches configured frontend hosts
  • Filter by cluster names

Installation

pip install haproxy-fusion-client

Usage

from haproxy_fusion.api.haproxy_fusion_api_client import HAProxyFusionAPIClient
from haproxy_fusion.haproxy_fusion_service import HAProxyFusionService

haproxy_api_client = HAProxyFusionAPIClient(
    base_url="https://your-haproxy-fusion-url",
    username="your-username",
    password="your-password",
    verify=False
)

haproxy = HAProxyFusionService(haproxy_api_client)

include_clusters = ["Cluster1", "Cluster2"]
frontends = haproxy.get_configured_frontend_hosts(include_clusters)
print(frontends)

Low-level API Access

You can use the HAProxyFusionAPIClient directly if you want more control:

from haproxy_fusion.api.haproxy_fusion_api_client import HAProxyFusionAPIClient

client = HAProxyFusionAPIClient(
    base_url="https://your-haproxy-fusion-url",
    username="your-username",
    password="your-password",
    verify=False
)

response = client.get("/v1/clusters")
print(response.json())

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

haproxy_fusion_client-0.1.1.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

haproxy_fusion_client-0.1.1-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file haproxy_fusion_client-0.1.1.tar.gz.

File metadata

File hashes

Hashes for haproxy_fusion_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2255cf6cdecb2f77a6dab8b6363e361d6d7849fd3f72d9d1d3f8c69d3e0556c0
MD5 97b8724b49f5201d421fab1c47483546
BLAKE2b-256 25b0d1b33178daf99304d3a67400abc0ad8da2ff8aada70bc3ab0aa08b3e1705

See more details on using hashes here.

File details

Details for the file haproxy_fusion_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for haproxy_fusion_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b05e306553c47a33514b34482e2983c0714b0cca6b588092981882ae2657587e
MD5 09fd18263e47942c6a49dca36e2e5d30
BLAKE2b-256 aefe165e22e870df718922065dad3774d5b9bd99e7a172b3c16f71324ecdc983

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page