Is there a CityHash Python (2.7) Implementation for Google App Engine?

708 views Asked by At

I'm planning an application and BigQuery seems to fit the bill, BUT there's an issue.

The hash in BigQuery is CityHash (1.0.3) and I'd like to use Google App Engine (Python 2.7) to write the application.

All I need know how to do is take strings and create hashes that match the BigQuery hash function in the standard python 2.7 ecosystem on app engine (or how to extend it to do that).

I know that could send a query to BigQuery to calculate the hashes that I need but BigQuery isn't meant to be used that way (and it will result in unacceptable latency).

1

There are 1 answers

1
Mosha Pasumansky On

The code for cityhash 1.0.3 is still available here: https://code.google.com/p/cityhash/downloads/detail?name=cityhash-1.0.3.tar.gz But it is C code which won't be allowed inside App Engine. If you have mastery of python, you could rewrite it in Python. There is a test suite to verify the correctness. Sorry, this is the best I could come up with.