Skip to main content

Get result from

Project description


Get result from from CLI using python3.


- Written for python3
- iqdb and danbooru.iqdb parser
- Hydrus integration


Use as Hydrus as cli program

To parse folder of images (e.g. in this example image_folder:) and write tags to text file, use following command:

iqdb-tagger cli-run --resize --match-filter best-match --write-tags --input-mode folder image_folder

Use as Hydrus iqdb script server

  1. Run iqdb-tagger run and note the server address.

To run it on on port 5006, run the following command:

`iqdb-tagger run -h -p 5006`
  1. Import one of the parsing scripts below to Hydrus parsing scripts.

  2. Check the server address and edit it as needed.

IQDB parsing script

[32, "local iqdb", 2, ["", 1, 0, [55, 1, [[], "some hash bytes"]], "file", {"place": "0", "resize": "on"}, [[29, 1, ["link", [27, 5, [[["a", {"data-status": "best-match", "class": "img-match-detail"}, null]], 0, "href", [51, 1, [3, "", null, null, "example string"]], [55, 1, [[], "parsed information"]]]], [[30, 2, ["", 0, [27, 5, [[["li", {"class": "tag-creator"}, null]], 1, "", [51, 1, [3, "", null, null, "example string"]], [55, 1, [[], "parsed information"]]]], "creator"]], [30, 2, ["", 0, [27, 5, [[["li", {"class": "tag-series"}, null]], 1, "", [51, 1, [3, "", null, null, "example string"]], [55, 1, [[], "parsed information"]]]], "series"]], [30, 2, ["", 0, [27, 5, [[["li", {"class": "tag-character"}, null]], 1, "", [51, 1, [3, "", null, null, "example string"]], [55, 1, [[], "parsed information"]]]], "character"]], [30, 2, ["", 0, [27, 5, [[["li", {"class": "tag-general"}, null]], 1, "", [51, 1, [3, "", null, null, "example string"]], [55, 1, [[], "parsed information"]]]], ""]]]]]]]]

Every uploaded and match history can be seen on Front page (in this case

Using IQDB-tagger with Hydrus API

Set up your hydrus to get the access key, which will be used for this feature.

Install the required hydrus package

pip install

After that you can run the command below. For example to run the command with image tagged as ‘thread:cat’ on hydrus

# to get tags
iqdb-tagger search-hydrus-and-send-tag --access_key 1234_your_access_key 'thread:cat'
# to get matching urls
iqdb-tagger search-hydrus-and-send-url --access_key 1234_your_access_key 'thread:cat'

Note: hydrus version 349 have default bandwidth of 100 mb data per month, which may raise ApiError when the bandwidth reached.

to fix it, go to services menu -> manage services -> client api and raise your bandwidth limit

Setting Hydrus iqdb script server on NAS

Here is example for Synology DS1817+ with DSM6.1.7 running on an Intel Atom C2538

  1. Make sure SSH is turned on in your control panel

  2. Install python 3 community package:

  3. Install pip3

install pip3 with:
sudo -i
  1. Install iqdb-tagger

cd /volume1/@appstore/py3k/usr/local/bin
./pip install iqdb_tagger

3.1 Add bin folder to path (optional)

export PATH=$PATH:/volume1/@appstore/py3k/usr/local/bin

That command line above can also be put on ~/.bashrc, so NAS will run it everytime user login.


Install it with from pypi

$ pip install iqdb_tagger

Or install it manually

$ git clone
$ cd iqdb_tagger
# run the command below
$ python install
# for windows user: to force it using python3 run following command
$ python -3 install
# or
$ pip install .

If you are in windows and get SyntaxError, check your python version. To install under python3 follow the instruction on this link


libxml error in Windows

If you are encounter this error on Windows

Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?

Please follow this guide to install lxml: StackOverflow - how to install lxml on windows?


To test the program do the following:

$ # install required package
$ pip install -e ".[dev]"
$ cd docs
$ make test

To upload the new version, do the following:

  1. register to pypi and test.pypi

  2. upgrade setuptools. setuptools>=38.6.0 is required to produce a distribution with the new metadata

  3. make a source distribution. command: python sdist. in this example it will produce dist/iqdb_tagger-0.3.2.tar.gz

  4. install twine>=1.11.0.

  5. upload first to test.pypi. command: twine upload –repository-url dist/iqdb_tagger-0.3.2.tar.gz

  6. if upload success but result is not as intended, change the version with postn-suffix format. fix the program and go to number 5.

  7. if upload sucsess and result is as intended:

  1. check the program version. maybe rolled it back to original if possible

  2. upload it to pypi. command: twine upload –repository-url dist/iqdb_tagger-0.3.2.tar.gz

this guideline is based on this guide


This project is licensed under the MIT License - see the LICENSE file for details


iqdb_tagger was written by softashell and maintained by Rachmadani Haryono

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

iqdb_tagger-0.3.2.tar.gz (24.6 kB view hashes)

Uploaded Source

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