{"id":18054295,"url":"https://github.com/darvid/proxenos","last_synced_at":"2025-04-10T23:03:01.067Z","repository":{"id":220232978,"uuid":"79762292","full_name":"darvid/proxenos","owner":"darvid","description":"A rendezvous hashing and service routing toolkit for Python.","archived":false,"fork":false,"pushed_at":"2021-10-21T18:11:14.000Z","size":63,"stargazers_count":8,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T19:52:33.798Z","etag":null,"topics":["hash","hashing","python","python-3","rendezvous","routing","routing-algorithm"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darvid.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-01-23T02:22:21.000Z","updated_at":"2022-08-26T23:53:33.000Z","dependencies_parsed_at":"2024-02-01T01:21:30.383Z","dependency_job_id":"24d148e7-f71e-4701-9622-9f093944fecb","html_url":"https://github.com/darvid/proxenos","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":"0.045454545454545414","last_synced_commit":"82a1cab5eee87ff7d53e0a093eb9ba1750d9fe96"},"previous_names":["darvid/proxenos"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darvid%2Fproxenos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darvid%2Fproxenos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darvid%2Fproxenos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darvid%2Fproxenos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darvid","download_url":"https://codeload.github.com/darvid/proxenos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247886852,"owners_count":21012909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hash","hashing","python","python-3","rendezvous","routing","routing-algorithm"],"created_at":"2024-10-31T00:10:25.863Z","updated_at":"2025-04-10T23:03:01.050Z","avatar_url":"https://github.com/darvid.png","language":"Python","readme":"========\nproxenos\n========\n\n.. image:: https://img.shields.io/pypi/v/proxenos.svg\n   :target: https://pypi.python.org/pypi/proxenos\n\n.. image:: https://img.shields.io/pypi/pyversions/proxenos.svg\n   :target: https://pypi.python.org/pypi/proxenos\n\n.. image:: https://travis-ci.org/darvid/proxenos.svg?branch=master\n   :target: https://travis-ci.org/darvid/proxenos\n\n.. image:: https://img.shields.io/coveralls/darvid/proxenos.svg\n   :target: https://coveralls.io/github/darvid/proxenos\n\n.. image:: https://badges.gitter.im/python-proxenos/Lobby.svg\n   :alt: Join the chat at https://gitter.im/python-proxenos/Lobby\n   :target: https://gitter.im/python-proxenos/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n\nA Python toolkit for Rendezvous/Highest Random Weight (HRW) hash based routing.\n\n.. code-block:: pycon\n\n   \u003e\u003e\u003e import proxenos.mappers.consul\n   \u003e\u003e\u003e import proxenos.rendezvous\n   \u003e\u003e\u003e mapper = proxenos.mappers.consul.ConsulClusterMapper(\n   ...     host='localhost', port=8500)\n   \u003e\u003e\u003e mapper.update()\n   \u003e\u003e\u003e mapper.cluster\n   {SocketAddress(host=IPAddress('::'), port=8000),\n    SocketAddress(host=IPAddress('::'), port=8001),\n    SocketAddress(host=IPAddress('::'), port=8300),\n    SocketAddress(host=IPAddress('::'), port=8500)}\n   \u003e\u003e\u003e mapper.select('github.com', proxenos.rendezvous.HashMethod.SIPHASH)\n   SocketAddress(host=IPAddress('::'), port=8001)\n\n.. code-block:: shell\n\n   $ proxenos select -b consul -h localhost -p 8500 github.com\n   0.0.0.0:8300\n\nFeatures\n========\n\n* Support for multiple service discovery backends possible. *Currently\n  only support for Consul is implemented, but other backends coming\n  eventually.*\n* Supports many different hash functions and PRFs. The default hashing\n  method is the `SipHash \u003chttps://131002.net/siphash/\u003e`_ PRF.\n* Provides a command-line interface for quickly testing/debugging\n  node selection.\n\nInstallation\n============\n\n.. code-block:: shell\n\n   $ pip install proxenos[consul]\n   $ # If you'd like Murmur3 support, use:\n   $ pip install proxenos[consul,murmur]\n\nConfiguration\n=============\n\nProxenos can be configured through environment variables.\n\n* **PROXENOS_MMH_SEED** (int): The seed used for MurMur3 hashes.\n* **PROXENOS_MMH_OPTIMIZE** (str): Set to ``x64`` or ``auto``.\n* **PROXENOS_PRF** (str): The default hashing method to use. Defaults to\n  ``siphash``. Can be set to one of ``md5``, ``sha1``, ``sha224``,\n  ``sha256``, ``sha384``, ``sha512``, ``mmh_32``, ``mmh_64``,\n  ``mmh_128``, or ``siphash``.\n* **PROXENOS_SIPHASH_KEY** (str): The 128-bit SipHash key. A default\n  key is provided, but users are advised to generate their own.\n\nNotes\n=====\n\n**proxenos** uses Python's PRNG for calculating the weight of nodes in\na cluster, rather than using a linear congruential generator (LCG_)\nas described in the `original paper on Rendezvous hashing`__. Seeded\nweights generated are limited to ``sys.maxsize``, which means the\nresulting weights will differ depending on the platform architecture.\n\n.. _LCG: https://en.wikipedia.org/wiki/Linear_congruential_generator\n.. _thaler_ravishankar_1996: http://www.eecs.umich.edu/techreports/cse/96/CSE-TR-316-96.pdf\n\n__ thaler_ravishankar_1996_\n\nSimilar projects\n================\n\n* `clandestined \u003chttps://github.com/ewdurbin/clandestined-python\u003e`_\n* `nikhilgarg28/rendezvous \u003chttps://github.com/nikhilgarg28/rendezvous\u003e`_\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarvid%2Fproxenos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarvid%2Fproxenos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarvid%2Fproxenos/lists"}