Chainable image URL generator for Imagor, Thumbor and Wsrv.nl with full filter support
Project description
Imgora
Chainable Python client for Imagor and Thumbor image processing servers
Imgora provides a clean, chainable interface for generating image URLs for Imagor, Thumbor and Wsrv.nl image processing servers. It supports all standard operations and filters with full type hints and documentation.
Features
- Imagor, Thumbor & Wsrv.nl Support: Compatible with Imagor, Thumbor and Wsrv.nl servers
- URL Signing: Built-in support for secure URL signing
- Chainable API: Fluent interface for building complex image processing pipelines
- Comprehensive Filter Support: Implements all standard filters and operations
- Fully Typed: Built with Python's type hints for better IDE support and code quality
Installation
Using uv (recommended):
uv pip install imgora
Or with pip:
pip install imgora
Quick Start
from imgora import WsrvNl
image_url = "https://wsrv.nl/puppy.jpg"
img = (
# Imagor(base_url="http://localhost:8018", signer=Signer(key="my_key", type="sha256"))
WsrvNl()
.with_image(image_url)
.crop(0.1, 0.2, 0.6, -100)
.resize(200, 150)
.blur(3)
.grayscale()
.quality(50)
)
# print(img.path()) # path without url
print(img.url())
Which returns:
https://wsrv.nl/?url=https%3A%2F%2Fwsrv.nl%2Fpuppy.jpg&cx=166&cy=221&cw=831&ch=787&precrop&w=200&h=150&blur=2.50&filt=greyscale&quality=50
NOTE:
In order to test the url with Imagor or Thumbor you need to start a server. You can do this with the following command:
docker compose up imagor -d
docker compose up thumbor -d
More Examples
docker compose up -d # start imagor and thumbor server
uv run examples/compare_backends.py
Documentation
For complete documentation, including API reference and advanced usage, please visit the documentation site.
Development
To set up the development environment:
# Clone the repository
git clone https://github.com/burgdev/imgora.git
cd imgora
# Install development dependencies
make
uv run invoke install # install 'dev' and 'test' dependencies per default, use --all to install all dependencies
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
License
MIT - See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file imgora-0.0.1.tar.gz.
File metadata
- Download URL: imgora-0.0.1.tar.gz
- Upload date:
- Size: 75.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae44cc42eebe2c0a08e570a2ce1dd15ba2a051ad6a2e7efb4ee9ec60fea521f7
|
|
| MD5 |
3248eca5a05c4e23ddbac6de0f34e842
|
|
| BLAKE2b-256 |
d1439657a58188b219c14c2a7569ccb3016346163cf6b4656205c599ba8f0502
|
Provenance
The following attestation bundles were made for imgora-0.0.1.tar.gz:
Publisher:
publish-pypi.yml on burgdev/imgora
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imgora-0.0.1.tar.gz -
Subject digest:
ae44cc42eebe2c0a08e570a2ce1dd15ba2a051ad6a2e7efb4ee9ec60fea521f7 - Sigstore transparency entry: 495894207
- Sigstore integration time:
-
Permalink:
burgdev/imgora@7a3f7cf0bf7f0dd360cef0b1263d411a910caaad -
Branch / Tag:
refs/heads/main - Owner: https://github.com/burgdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7a3f7cf0bf7f0dd360cef0b1263d411a910caaad -
Trigger Event:
repository_dispatch
-
Statement type:
File details
Details for the file imgora-0.0.1-py3-none-any.whl.
File metadata
- Download URL: imgora-0.0.1-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dfe17baaed28344bfa8d2f070c1cf43bc1f04d8c83ded03c59abbb864988302
|
|
| MD5 |
4d381d971047a7a16dbd52bdd2a9e7d7
|
|
| BLAKE2b-256 |
4d4e0f8ab545af4052876c3c2d07d4e7e8bced2ead7bb2d0a5f46adce766eced
|
Provenance
The following attestation bundles were made for imgora-0.0.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on burgdev/imgora
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imgora-0.0.1-py3-none-any.whl -
Subject digest:
0dfe17baaed28344bfa8d2f070c1cf43bc1f04d8c83ded03c59abbb864988302 - Sigstore transparency entry: 495894261
- Sigstore integration time:
-
Permalink:
burgdev/imgora@7a3f7cf0bf7f0dd360cef0b1263d411a910caaad -
Branch / Tag:
refs/heads/main - Owner: https://github.com/burgdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7a3f7cf0bf7f0dd360cef0b1263d411a910caaad -
Trigger Event:
repository_dispatch
-
Statement type: