Skip to main content

Google FarmHash Bindings for Python

Project description

python-farmhash

Google's FarmHash binding for Python

Overview

This package provides bindings for the Google's FarmHash.
Code specific to this project is covered by The MIT License

Install

Update: Windows binary wheel uploaded to pypi

Currently, clone the repo and:

pip(Linux & Windows):

$ sudo pip install pyfarmhash  

From Source:

$ cd python-farmhash  
$ sudo python setup.py Install 

Build on Windows:

  1. Install Microsoft Visual C++ Compiler
  2. Install miniconda for Python
$ cd python-farmhash
$ sudo python setup.py install

Usage

import farmhash  
print farmhash.hash64('abc')  
2640714258260161385  

For more details, use ipython:
In [1]: import farmhash 

In [2]: farmhash.hash64withseed?  
Type:       builtin_function_or_method  
String Form:<built-in function hash64withseed>  
Docstring:  
Hash function for a string.  For convenience, a 64-bit seed is also hashed into the result.  
example: print farmhash.hash64withseed('abc', 12345)  
13914286602242141520L  

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfarmhash-0.3.2.tar.gz (99.9 kB view hashes)

Uploaded Source

Built Distributions

pyfarmhash-0.3.2-cp310-cp310-win_amd64.whl (14.4 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

pyfarmhash-0.3.2-cp39-cp39-win_amd64.whl (14.4 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

pyfarmhash-0.3.2-cp38-cp38-win_amd64.whl (14.4 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

pyfarmhash-0.3.2-cp37-cp37m-win_amd64.whl (14.3 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page