Proxenos
A rendezvous hashing and service routing toolkit for Python.
Install / Use
/learn @darvid/ProxenosREADME
======== proxenos
.. image:: https://img.shields.io/pypi/v/proxenos.svg :target: https://pypi.python.org/pypi/proxenos
.. image:: https://img.shields.io/pypi/pyversions/proxenos.svg :target: https://pypi.python.org/pypi/proxenos
.. image:: https://travis-ci.org/darvid/proxenos.svg?branch=master :target: https://travis-ci.org/darvid/proxenos
.. image:: https://img.shields.io/coveralls/darvid/proxenos.svg :target: https://coveralls.io/github/darvid/proxenos
.. image:: https://badges.gitter.im/python-proxenos/Lobby.svg :alt: Join the chat at https://gitter.im/python-proxenos/Lobby :target: https://gitter.im/python-proxenos/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
A Python toolkit for Rendezvous/Highest Random Weight (HRW) hash based routing.
.. code-block:: pycon
import proxenos.mappers.consul import proxenos.rendezvous mapper = proxenos.mappers.consul.ConsulClusterMapper( ... host='localhost', port=8500) mapper.update() mapper.cluster {SocketAddress(host=IPAddress('::'), port=8000), SocketAddress(host=IPAddress('::'), port=8001), SocketAddress(host=IPAddress('::'), port=8300), SocketAddress(host=IPAddress('::'), port=8500)} mapper.select('github.com', proxenos.rendezvous.HashMethod.SIPHASH) SocketAddress(host=IPAddress('::'), port=8001)
.. code-block:: shell
$ proxenos select -b consul -h localhost -p 8500 github.com 0.0.0.0:8300
Features
- Support for multiple service discovery backends possible. Currently only support for Consul is implemented, but other backends coming eventually.
- Supports many different hash functions and PRFs. The default hashing
method is the
SipHash <https://131002.net/siphash/>_ PRF. - Provides a command-line interface for quickly testing/debugging node selection.
Installation
.. code-block:: shell
$ pip install proxenos[consul] $ # If you'd like Murmur3 support, use: $ pip install proxenos[consul,murmur]
Configuration
Proxenos can be configured through environment variables.
- PROXENOS_MMH_SEED (int): The seed used for MurMur3 hashes.
- PROXENOS_MMH_OPTIMIZE (str): Set to
x64orauto. - PROXENOS_PRF (str): The default hashing method to use. Defaults to
siphash. Can be set to one ofmd5,sha1,sha224,sha256,sha384,sha512,mmh_32,mmh_64,mmh_128, orsiphash. - PROXENOS_SIPHASH_KEY (str): The 128-bit SipHash key. A default key is provided, but users are advised to generate their own.
Notes
proxenos uses Python's PRNG for calculating the weight of nodes in
a cluster, rather than using a linear congruential generator (LCG_)
as described in the original paper on Rendezvous hashing__. Seeded
weights generated are limited to sys.maxsize, which means the
resulting weights will differ depending on the platform architecture.
.. _LCG: https://en.wikipedia.org/wiki/Linear_congruential_generator .. _thaler_ravishankar_1996: http://www.eecs.umich.edu/techreports/cse/96/CSE-TR-316-96.pdf
__ thaler_ravishankar_1996_
Similar projects
clandestined <https://github.com/ewdurbin/clandestined-python>_nikhilgarg28/rendezvous <https://github.com/nikhilgarg28/rendezvous>_
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
109.8kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
349.9kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
