Skip to main content

pupyl pupyl-ci codecov anaconda PyPI version Documentation Status Downloads

pupyl - A Python Image Search Library

🧿 pupyl what?

The pupyl project (pronounced pyoo·piel) is a pythonic library to perform image search tasks. It's intended to made 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

or

# 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):

@dlanor_s

from pupyl.search import PupylImageSearch
from pupyl.web import interface

SEARCH = PupylImageSearch()

SEARCH.index(
    'https://github.com/policratus/pupyl'
    '/raw/master/samples/images.tar.xz'
)

QUERY_IMAGE = 'https://images.unsplash.com/photo-1520763185298-1b434c919102'

[*SEARCH.search(QUERY_IMAGE)]

# Here's the simplest result
> [427, 473, 129, 346]

# The results with image metadata
[*SEARCH.search(QUERY_IMAGE, return_metadata=True)]

> [
    {
        'original_file_name': '941444733_6de664bbbf.jpg',
        'original_path': '/tmp/tmp_i42jozv',
        'original_file_size': '80K',
        'original_access_time': '2021-07-06T20:31:07',
        'id': 427
    },
    {
        'original_file_name': '2673396259_f151fbe7c1.jpg',
        'original_path': '/tmp/tmp_i42jozv',
        'original_file_size': '66K',
        'original_access_time': '2021-07-06T20:31:07',
        'id': 473
    },
    ...
  ]

# Opening the web interface
interface.serve()

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

web

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

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

📌 Dependencies

See all dependencies here: dependencies.

📝 Documentation

See a getting start guide and the API reference on https://pupyl.readthedocs.io/.

🖊️ Citation

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

@misc{pupyl,
    author = {Nelson Forte de Souza Junior},
    title = {pupyl},
    howpublished = {\url{https://github.com/policratus/pupyl}},
    year = {2021}
}

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.11.3.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pupyl-0.11.3-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file pupyl-0.11.3.tar.gz.

File metadata

  • Download URL: pupyl-0.11.3.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for pupyl-0.11.3.tar.gz
Algorithm Hash digest
SHA256 2f00a8dd8a27d7d1a0aef8632522b3463709da6fecf90d29b48b914dbbd5a6a4
MD5 2b2682d351687ee3410ab6e3f1592c8c
BLAKE2b-256 bbd6e68219b5398aa712d325f6cd7b1f83026b88830d5d244f7602d400895ca5

See more details on using hashes here.

File details

Details for the file pupyl-0.11.3-py3-none-any.whl.

File metadata

  • Download URL: pupyl-0.11.3-py3-none-any.whl
  • Upload date:
  • Size: 33.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for pupyl-0.11.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6f2dfaca92451701e7b702cb84f8b9f2e8e5398c27060eba34d9281d90c2dc13
MD5 74654d0c531bb00ed9ef23eb7e87b80c
BLAKE2b-256 7fc772549f6c923b5cf530e9649342d22eda35c658f7a017e32f56e2f1bf1058

See more details on using hashes here.

Release history Release notifications | RSS feed

0.14.7

2 files

0.14.6

2 files

0.14.5

2 files

0.14.4

2 files

0.14.3

2 files

0.14.2

2 files

0.14.1

2 files

0.14.0

2 files

0.13.5

2 files

0.13.4

2 files

0.13.3

2 files

0.13.2

2 files

0.13.1

2 files

0.13.0

2 files

0.12.5

2 files

0.12.4

2 files

0.12.3

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.4

2 files

This release

0.11.3 This release

2 files

0.11.1

2 files

0.11.0

2 files

0.10.6

2 files

0.10.5

2 files

0.10.4

2 files

0.10.3

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.9

2 files

0.9.8

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page