Skip to main content

imageprobe

Latest PyPI package version Supported Python versions Development status CI Codecov

Asynchronous library to get image dimensions by fetching as little data as possible.

It temporarily supports only GIF, PNG because development is still in a very early stage.

Usage

To install this library, run:

pip install imageprobe

The probe() function returns metadata of an image from an URL, or throws an exception if an error occurred.

import asyncio
from imageprobe import probe

url = "https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png"
image_data = asyncio.run(probe(url))
print(image_data.width, image_data.height)

# 172 178

Under the hood, probe() creates an aiohttp.ClientSession, but you can pass a pre-existing session as an optional argument if you prefer.

Contributing

I won't accept pull requests until the first beta release.

Release files for imageprobe 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imageprobe 0.3.0
File Size Uploaded
imageprobe-0.3.0.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for imageprobe 0.3.0
File Interpreter ABI Platform
imageprobe-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / imageprobe-0.3.0.tar.gz

Download URL imageprobe-0.3.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7d9301819253267b3e6638fa11b384640d4eabfaee7fe3b76ba2d2af249d6b71
BLAKE2b-256 checksum
How to use checksums
6bbcf80ac75a93fcf9e230b49546e419c033f8f0d868c5f7ee66e1a01cd3b262
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / imageprobe-0.3.0-py3-none-any.whl

Download URL imageprobe-0.3.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
703c94aec4214d9c70897e940889a35420334bcd02337c773fa52db0a74ae13a
BLAKE2b-256 checksum
How to use checksums
16bc620b1a2adade467fb2913328638ba1b78b9b3b4075feaaec59acfcfad5e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page