Skip to main content

A library to quickly get or download images from the internet.

Project description

GETENMAGEN — Advanced Image Downloader & Viewer

An efficient, flexible, and robust open-source library designed to automate image downloading using Bing scraping capabilities with full configuration control.

📌 Introduction

Hello! Thank you for using getenmagen. This library was developed to provide an intuitive and powerful way to build image datasets or feed visual interfaces directly from the terminal.

⚠️ Author Responsibility: This library was created for automation and educational purposes. The author is not responsible for any malicious use or scraping violations.


🛠️ Documentation & Architecture

The library is built around an Object-Oriented design, featuring two main classes: Downloader (which handles execution) and Defaults (which handles global configuration states).

1. Initialization & Custom Directory

By default, the library saves downloaded assets in your module's local directory. You can instantiate the downloader and define a custom root storage folder:

from getenmagen.core import Downloader

# Instantiates the downloader with a custom storage path
downloader = Downloader(default_save_dir="my_custom_folder")

2. Executing Downloads (The download Method)

The core execution method is .download(). It accepts four parameters:

  • query (str): The search term or keyword for the images (Required).
  • save_dir (str, optional): Overrides the instance default storage folder for this specific execution.
  • qt (int, optional): Number of images to fetch. Bound between 1 and 16.
  • cooldown (float, optional): Seconds to pause between image display popups.

Example Usage:

downloader.download(query="cyberpunk triangle", qt=5, cooldown=1.5)

3. Runtime Mutability & Global Configurations

The Defaults class allows you to dynamically mutate configuration states globally without modifying your core execution scripts.

Example Usage:

from getenmagen.defaults import Defaults
from getenmagen.core import Downloader

# Initialize global configuration
config = Defaults()
config.set_default("min_qt", 8) # Mutates the state dynamically

# Pass the mutability object to the downloader
downloader = Downloader(defaults_obj=config)

🚨 Error Handling

getenmagen comes equipped with explicit, strictly typed custom exceptions to help you build safer scripts:

DownloadImageError: Raised when network connections fail or the search query yields 0 results.

ShowImageError: Raised when the Operating System image viewer cannot be initialized or fails to open.

InvalidImageError: Raised if corrupted or broken file formats are intercepted during execution.

📄 License & Contribution Distributed under the MIT License. Feel free to open Issues or submit Pull Requests on our official page!

Official Project Page: https://pypi.org/project/getenmagen/

Thank you for using getenmagen! Happy coding ;)

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

getenmagen-0.2.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

getenmagen-0.2.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file getenmagen-0.2.2.tar.gz.

File metadata

  • Download URL: getenmagen-0.2.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for getenmagen-0.2.2.tar.gz
Algorithm Hash digest
SHA256 54aa42a22df1c09e5548a350d1592b4d0820355fc207133e6a7daccbf2455758
MD5 eec2fa6fffcbb170a80136fb6c51aef8
BLAKE2b-256 815e0b555971b209be4e4a2ed179aed30ff3eb40c6ae5b9007b8f4d057b768cb

See more details on using hashes here.

File details

Details for the file getenmagen-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: getenmagen-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for getenmagen-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d2606084b4fc9b1269ae03e41bcbdbe7ee90d3ad3654a829fd3ecfb3ac12b8f0
MD5 07c6ca9f1dab60450a29db4c7949d325
BLAKE2b-256 40ef5c50b994347105b58ae35dfa1c3bdae107a2cb3d2d3e0f0c210295c2c08c

See more details on using hashes here.

Supported by

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