This is a python implementation of a rolling hash function. The implementation is based off the wikipedia article.
The easiest way to install is simply pip install rollinghash
Alternatively you can clone this repository and run pip install /path/to/rollinghash
This package is very simple to use
import rollinghash
a = rollinghash.RollingHash()
# or alternatively
a = rollinghash.RollingHash('some stuff to hash first')
# to add to the window
a.push('some more stuff') # returns new hash of window
# get current hash
curr_hash = a.hash
# pop off first
a.pop() # returns new hash of window
# alternatively pop more off
a.pop(10)
If you pop more than there are values, it will pop everything off and return None