![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
jump-consistent-hash
Advanced tools
.. image:: https://github.com/lithammer/python-jump-consistent-hash/workflows/Python/badge.svg :alt: Build Status :target: https://github.com/lithammer/python-jump-consistent-hash/actions
Python and C implementation of the jump consistent hash algorithm by John Lamping and Eric Veach[1]. Tested on Python 3.8+.
To install Jump Consistent Hash, simply run this simple command in your terminal of choice::
$ pip install jump-consistent-hash
The C implementation is optional but is about 10x faster than the pure Python implementation in CPython.
Usage
.. code:: python
>>> import jump
>>> jump.hash(256, 1024)
520
If you want to use a ``str`` as a key instead of an ``int``, you can pass it
through a hash function to compute a real key. Here's a couple of examples
using Python 3:
.. code:: python
>>> import hashlib
>>> int(hashlib.md5(b"127.0.0.1").hexdigest(), 16)
325870950296970981340734819828239218902
>>> int(hashlib.sha1(b"127.0.0.1").hexdigest(), 16)
431133456357828263809343936597625557575256328153
>>> import binascii
>>> binascii.crc32(b"127.0.0.1") & 0xffffffff
3619153832
>>> abs(hash("127.0.0.1"))
7536019783825143230
Links
FAQs
Implementation of the Jump Consistent Hash algorithm
We found that jump-consistent-hash demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.