Metadata-Version: 2.1
Name: haprapi
Version: 0.1.1
Summary: A python library for the HAProxy Runtime API
License: GPLv3
Author: Mike Introini
Author-email: michael.introini@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: pytest (>=8.3.3,<9.0.0)
Description-Content-Type: text/markdown

# HAPrapi

HAPrapi 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 HAPrapi, run the following command:

```bash
pip install haprapi
```

## Usage

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

```python
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.
