Skip to main content

A python library for the HAProxy Runtime API

Project description

HAProxi

HAProxi is a Python library for interacting with HAProxy's runtime API. It provides a simple and intuitive interface to manage and monitor HAProxy instances programmatically.

Features

  • Connect to HAProxy's runtime API
  • Retrieve HAProxy information and statistics
  • Manage backend servers (enable/disable)
  • Manage frontends (enable/disable)
  • Parse and structure HAProxy data

Installation

To install HAProxi, run the following command:

pip install haprapi

Usage

Here's a basic example of how to use HAProxi:

from haprapi import Client

# Initialize the client
client = Client('localhost', 9999)

# Get HAProxy information
info = client.get_info()
print(info)

# Get statistics
stats = client.get_stat()
print(stats)

# Enable a server
client.enable_server('backend_name', 'server_name')

# Disable a frontend
client.disable_frontend('frontend_name')

Documentation

For detailed documentation, please refer to the docstrings in the source code.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is open source and available under the GPL-3.0 License.

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

haprapi-0.1.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

haprapi-0.1.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file haprapi-0.1.0.tar.gz.

File metadata

  • Download URL: haprapi-0.1.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/6.9.3-76060903-generic

File hashes

Hashes for haprapi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f4154998b5d4cbbd6d02350635656812c6460647ee5825e8de3c6c68ba071a8b
MD5 d971b4a8e233bb45d599eedfebd81f81
BLAKE2b-256 0dc954f76f5067ad3cb64e9178cdfdd4ea566ccd36b065bb93b8dfcfb0ac2b45

See more details on using hashes here.

File details

Details for the file haprapi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: haprapi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/6.9.3-76060903-generic

File hashes

Hashes for haprapi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 865bd1fa813ec75489b3bf00f57fa937293250657ca48a61694283a3cea57c1f
MD5 79fb62f5a3781739ad59cf15a1f8e793
BLAKE2b-256 ef29ed735f56483f7df22336edbcb6310da1b940d6a0ab7981b6ee33c1e61779

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