Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



21 Commits

Repository files navigation


Build Status

Quaidan is a python wrapper for mod_proxy_balancer's balancer manager.

Quaidan currently has two features:

  • Provide the current state of the load balancer.
  • Update cluster members.


This package is published on PyPi. You can use pip to install it.

pip install quaidan


The starting point for all interactions is a BalancerManager object. It is created by specifying the balancer manager's URL.

from quaidan import BalancerManager

balancer_manager = BalancerManager('')

This BalancerManager can be used to read the current state of the load balancer. The following snippet prints alle infos that are available from the balancer manager page.

status = balancer_manager.get_status()
for cluster in status.clusters:
    print('  -')
    print('    name: ' +
    print('    members:')
    for member in cluster.members:
        print('      -')
        print('        worker_url: "' + member.worker_url + '"')
        print('        route: "' + str(member.route) + '"')
        print('        route_redirect: "' + str(member.route_redirect) + '"')
        print('        load_factor: ' + str(member.load_factor))
        print('        lb_set: ' + str(member.lb_set))
        print('        ignore_errors: ' + str(member.ignore_errors))
        print('        draining_mode: ' + str(member.draining_mode))
        print('        enabled: ' + str(member.enabled))
        print('        hot_standby: ' + str(member.hot_standby))
        print('        elected: ' + str(member.elected))
        print('        busy: ' + str(member.busy))
        print('        load: ' + str(member.load))
        print('        transferred: ' + member.transferred)
        print('        read: ' +

The BalancerManager is used for updating members, too. Please import the UpdateMembercommand first.

from quaidan.command import UpdateMember

Now create an UpdateMember command from a Member tuple.

status = balancer_manager.get_status()
cluster = status.clusters[0]
update_member = UpdateMember(, cluster.members[0])

Update the attributes that should be changed and send the command to the balancer manager.

update_member.route = 'dummy route'
update_member.route_redirect = 'dummy route redirect'
update_member.load_factor = 1
update_member.lb_set = 1
update_member.ignore_errors = True
update_member.drainig_mode = True
update_member.enabled = True
update_member.hot_standby = True


If you have a feature request, found a bug or want to ask a question about Quaidan then please feel free to

Development Guide

Please write a test for every change you make. Run all tests and Pylint

python lint test

in order to ensure that you didn't break an existing feature and your code complies with the Pylint standards.

For this you need Pylint and a running Apache with a mod_proxy_balancer. The file can be used to set up a well configured Apache server if you're using Ubuntu Linux.

I strongly encourage you to use Vagrant. Qaidan provides a Vagrantfile that sets up a virtual machine with all prerequisites. You need three commands only to start the virtual machine and execute Quaidan's test suite.

vagrant up
vagrant ssh
python lint test

Release Guide

  • Ensure that the version is set in and quaidan/__init.py__.
  • Create a release tag: git tag quaidan-x.x.x -m "Release x.x.x".
  • Push the tag to GitHub: git push --tags.
  • Upload to PyPI: python sdist upload -r pypi.
  • Create a release on GitHub.

See also


Quaidan is a python wrapper for mod_proxy_balancer's balancer manager.







No packages published