pHashPy
Python bindings for the pHash (perceptual hashing) library.
Copyright (c) Dries007 2020.
Licensed under GPLv3 (or later), as is pHash itself.
The project uses cppyy to create a small wrapper around pHash functions.
Features
Working:
- Video hashing
- Image hashing (dct & mh)
Missing:
- Audio
- Text
Usage
As a Command Line Tool
You can use the tool as a command line utility to generate a list of hashes from a list of files.
Run python -m pHashPy --help for more info.
As a Library
Import functions from the package's __init__, this will automatically load the required library files.
If you import the functions from the individual py files, you must call helper.init yourself.
Background Info
For more info on pHash:
- https://github.com/aetilius/pHash
- https://www.phash.org/
- https://www.phash.org/docs/design.html (Theory.)
- https://www.phash.org/docs/howto.html (Help for developers, archived as DevelopmentGuide.md.)
Testing build manually
Using CentOS 7 (with docker container quay.io/pypa/manylinux2014_x86_64):
cd
yum install -y cmake3 libpng-devel libjpeg-turbo-devel libsamplerate-devel libsndfile-devel libtiff-devel libvdpau-devel libvorbis-devel
yum install -y epel-release
rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
yum install -y ffmpeg-devel
git clone https://github.com/dries007/pHashPy.git
cd pHashPy
git submodule init
git submodule update
cd pHash
echo "include_directories(/usr/include/ffmpeg)" >> CMakeLists.txt
sed -i s/SHARED/STATIC/g CMakeLists.txt
mkdir build
cd build
cmake3 .. -DCMAKE_BUILD_TYPE=Release -DWITH_VIDEO_HASH=1 -DWITH_AUDIO_HASH=1
make -j
Metadata
Release files for pHashPy 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pHashPy-0.1.2.tar.gz | 1.3 MB | Without provenance | Details for pHashPy-0.1.2.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pHashPy-0.1.2-cp38-cp38-manylinux2014_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.17+ x86-64 | Details for pHashPy-0.1.2-cp38-cp38-manylinux2014_x86_64.whl |
| pHashPy-0.1.2-cp37-cp37m-manylinux2014_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.17+ x86-64 | Details for pHashPy-0.1.2-cp37-cp37m-manylinux2014_x86_64.whl |
| pHashPy-0.1.2-cp36-cp36m-manylinux2014_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.17+ x86-64 | Details for pHashPy-0.1.2-cp36-cp36m-manylinux2014_x86_64.whl |
Total release size: 40.9 MB
Release files / pHashPy-0.1.2.tar.gz
| Download URL | pHashPy-0.1.2.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a292f213daf5b9fecd13e600c7e21bc088c1f6255ad4261fc424eab9c3ced6e
|
|
BLAKE2b-256 checksum How to use checksums |
7fc0c4e328cf393faf757d8e27e234b83ab6caf3362f0a05b5ebf591a70bc4e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
|
Release files / pHashPy-0.1.2-cp38-cp38-manylinux2014_x86_64.whl
| Download URL | pHashPy-0.1.2-cp38-cp38-manylinux2014_x86_64.whl |
|---|---|
| Size | 13.2 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
ed0465f304c433105902c2a1e40ac25719c548b298efbe304f752f118ab88d1d
|
|
BLAKE2b-256 checksum How to use checksums |
9bf39a1a0d959b0f18948470540acf799664c3fdf2255f8fca0319d9736575bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
|
Release files / pHashPy-0.1.2-cp37-cp37m-manylinux2014_x86_64.whl
| Download URL | pHashPy-0.1.2-cp37-cp37m-manylinux2014_x86_64.whl |
|---|---|
| Size | 13.2 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
16107f4e1b41a27d3c0b848f5546ca5d1bcb880981572b43c96b32a8289b9230
|
|
BLAKE2b-256 checksum How to use checksums |
b6a3edf36b738fb153b2daed54fbfe9b25ac11db00825ee56eb2e9402553d3e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
|
Release files / pHashPy-0.1.2-cp36-cp36m-manylinux2014_x86_64.whl
| Download URL | pHashPy-0.1.2-cp36-cp36m-manylinux2014_x86_64.whl |
|---|---|
| Size | 13.2 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
44bbb9be6293fa0508feab085f926e62863f080a2e174c8ad05dab206663a337
|
|
BLAKE2b-256 checksum How to use checksums |
484555e0eaa587e75cacb48ef45996203c3325d6b0fdcf1ed9144dcb9959d042
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
|
Security for pHashPy 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.