Skip to main content

🧿 Pupyl is a really fast image search library which you can index your own (millions of) images and find similar images in millisecond.

Project description

pupyl pupyl-ci codecov anaconda PyPI version Documentation Status CII Best Practices Anaconda-Server Badge

pupyl - A Python Image Search Library


🧿 pupyl what?

The pupyl project (pronounced pyoo·piel) is a pythonic library to perform image search tasks (even over animated GIFs). It's intended to make easy reading, indexing, retrieving and maintaining a complete reverse image search engine. You can use it in your own data pipelines, web projects and wherever you find fit!

🎉 Getting started

📦 Installation

Installing pupyl on your environment is pretty easy:

# pypi
pip install pupyl


# anaconda
conda install -c policratus pupyl

For installation troubleshooting, visit troubleshooting.

🚸 Usage

You can call pupyl's objects directly from your application code. For this example, a sample database will be indexed and after that, the following image will be used as a query image (credits: @dlanor_s):


pupyl also supports using animated gifs as query images and can store and retrieve it too.

from import PupylImageSearch
from pupyl.web import interface

SEARCH = PupylImageSearch()


# Using, for instance, a remote image. Local images have pretty faster results.


This will return:

# Here's the simplest possible result
> [486, 12, 203, 176]

With more information and returning image metadata from the results:

# The results with image metadata
[*, return_metadata=True)]

Now an excerpt of the (possible) return is:

        "id": 486,
        "internal_path": "/tmp/pupyl/0/486.gif",
        "original_access_time": "2021-12-03T13:23:47",
        "original_file_name": "icegif-5690.gif",
        "original_file_size": "261K",
        "original_path": "/tmp/tmp3gdxlwr6"
        "id": 12,
        "internal_path": "/tmp/pupyl/0/12.gif",
        "original_access_time": "2021-12-03T13:23:46",
        "original_file_name": "roses.gif",
        "original_file_size": "1597K",
        "original_path": "/tmp/tmp3gdxlwr6"

To interact visually, use the web interface:

# Opening the web interface

A glimpse of the web interface, visualizing the results shown above:


Disclaimer: the example above creates pupyl assets on your temporary directory. To define a non-volatile database, you should define data_dir parameter.

Alternatively, you can interact with pupyl via command line. The same example above in CLI terms:

🐚 Command line interface

# Indexing images
pupyl --data_dir /path/to/your/data/dir index /path/to/images/

# Opening web interface
pupyl --data_dir /path/to/your/data/dir serve

# Searching using command line interface
pupyl --data_dir /path/to/your/data/dir search /path/to/query/image.ext

💡 Type pupyl --help to discover all the CLI's capabilities.

📌 Dependencies

See all dependencies here: dependencies.

📝 Documentation

See a getting started guide and the API reference on

🖊️ Citation

If you use pupyl in your publications or projects, please cite:

    author = {Nelson Forte de Souza Junior},
    title = {pupyl},
    howpublished = {\url{}},
    year = {2021}

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

pupyl-0.13.1.tar.gz (33.3 kB view hashes)

Uploaded Source

Built Distribution

pupyl-0.13.1-py3-none-any.whl (37.3 kB view hashes)

Uploaded Python 3

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