The python library is much more highly optimized than the JS one.
It exposes a single function,
SRP, that instantiates an object used for hashing.
Create an object which is used to hash further strings.
Object orientation is used, rather than functions, in order to build up a cache that allows faster operation.
hasher = SRP(640)
Running a hash of a string
Running a hash from word counts is also possible. The words will be re-tokenized to ensure they work with the SRP tokenization definition. The following command is equivalent to the one above.
hasher.SRP(["foo", "bar"], [1, 1])
If for some reason you need the tokenization the SRP creates, you can extract it as an ordered list.
Poke around the code and you'll see the option to change some things including the log count settings. I don't recommend doing this.