imageprobe
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.
Metadata
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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| imageprobe-0.3.0.tar.gz | 6.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|
Security for imageprobe 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.