Skip to main content

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

Project description

Getenmagen is a lib to quickly get or download images from the internet. You can search images by any queries or terms, download multiple images a time, just the way you prefer.

Here's a example of how you can use it right now:

import os, random
from Getenmagen.core import download_and_show as download_images, DownloadImageError

if __name__ == "__main__":
    SAVE_DIR = os.path.dirname(os.path.abspath(__file__)) # -> This is the default path where your .py file is running, but you can use any path, such as /Documents, /Downloads...

    # ↓ Below, you can use any amount of images you want to download, as long as it's within the established limits. You can customize the queries of your search and cooldowns for each image, if you need.
    recommended_queries = ["cats", "dogs", "family", "food"]
    recommended_qts = [1, 2, 3]
    recommended_cooldowns = [0.0, 1.0, 1.5, 2.0, 2.5]

    # ↓ Below, you should use a try/except to prevent unexpected errors. (Note: importing "DownloadImageError" is also recommended to catch download errors).
    try:
        print("Testing the capture of images...")

        results = download_images(
            query=random.choice(recommended_queries),
            save_dir=SAVE_DIR,
            qt=random.choice(recommended_qts),
            cooldown=random.choice(recommended_cooldowns),
        )

        print(f"Success! Images saved on: \"{SAVE_DIR}\"!")

    except DownloadImageError as e:
        print(f"An error occurred while downloading: {e}")

    except Exception as e:
        print(f"An unknown error occurred: {e}")

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.1.0.tar.gz (2.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.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: getenmagen-0.1.0.tar.gz
  • Upload date:
  • Size: 2.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.1.0.tar.gz
Algorithm Hash digest
SHA256 b7dbb2f180074a88f458b1bb49513e607a7ed072fe2e0332441e99ded672def8
MD5 90ca2363b9f677998e79a4ef8019a834
BLAKE2b-256 ea3031d417198f469ee7ddb17201aa990c21557c9f8a01ec2654379c50ff358c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: getenmagen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71163f8c389c9fa3db32e7e69f7fc32ad88bd6ed82ab2601edad0263d99963b8
MD5 964690f615c30b431fe9fe1059938740
BLAKE2b-256 b9ca77e499b77fbc854ec187fb051e79b9276d27e6edb53fa46b78f19d5450b0

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