imgproxykit
A typed Python toolkit for building imgproxy URLs.
Features
- Fully typed and checked with
mypy,pyright,tyandpyreflyin strict modes - Immutable, reusable transforms combining typed options and scalar arguments
- Variants: generate multiple image URLs from a reusable set of transforms
- Support for named presets configured on your imgproxy server
- Native
Djangointegration with settings, shortcuts, and template tags - Native
FastAPIintegration with dependency injection
Installation
Requires Python 3.12+ and a running imgproxy server.
pip install imgproxykit
Examples
Single URL
Build a URL for a cropped WebP thumbnail:
>>> from imgproxykit import Client, Transform
>>> from imgproxykit.options import Resize
>>> # Public URL of your imgproxy server.
>>> client = Client('https://imgproxy.example.com')
>>> thumbnail = Transform(
... Resize(width=300, height=300, mode='fill'), # Pass typed option objects.
... quality=80, # Or scalar keywords, equivalent to Quality(80).
... format='webp',
... )
>>> source_url = 'https://originals.example.com/products/backpack.jpg'
>>> thumbnail_url = client.url(source=source_url, transform=thumbnail)
thumbnail_url points to a 300×300 WebP thumbnail with smart cropping.
Imgproxy fetches and processes the original image when this URL is requested.
Variants
Build variants by combining shared settings with different sizes:
>>> from imgproxykit import Client, Transform
>>> client = Client('https://imgproxy.example.com')
>>> # Share quality and output format across all variants.
>>> base = Transform(quality=85, format='webp')
>>> products = {
... 'small': Transform(*base.options, width=320),
... 'medium': Transform(*base.options, width=640),
... 'large': Transform(*base.options, width=1280),
... }
>>> source_url = 'https://originals.example.com/products/backpack.jpg'
>>> # Build one URL per variant for the same source image.
>>> product_urls = client.variants(source=source_url, variants=products)
>>> small_url = product_urls['small'] # Access a URL by its variant name.
product_urls contains a URL for each size, all using the shared quality
and WebP format. Reuse products with other source images to keep the same
variants across your catalog.
Next steps
- Read the documentation for client configuration, transformations, variants, and processing options.
- Find published releases on PyPI.
Contributing
See the contributing guide for development setup and checks. Bug reports and feature requests are welcome on the issue tracker.
License
Credits
Generated with
wemake-python-package
(template version).
Metadata
Release files for imgproxykit 0.4.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 | Actions |
|---|---|---|---|---|
| imgproxykit-0.4.0.tar.gz | 28.1 kB | With provenance | Details for imgproxykit-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| imgproxykit-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for imgproxykit-0.4.0-py3-none-any.whl |
Total release size: 81.2 kB
Release files / imgproxykit-0.4.0.tar.gz
| Download URL | imgproxykit-0.4.0.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad2fe642cea95dc7e773dda7534322b2751f7298afa7fb06f4656f9337a3d037
|
|
BLAKE2b-256 checksum How to use checksums |
2576b09c05ecfea954567e59b33815746dfcfd05daaf3ee0069ec5325124da7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logRelease files / imgproxykit-0.4.0-py3-none-any.whl
| Download URL | imgproxykit-0.4.0-py3-none-any.whl |
|---|---|
| Size | 53.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ac2e25513db5bcdcf4ef0d28644ab60280b8713204d188700b7be49967a285f
|
|
BLAKE2b-256 checksum How to use checksums |
f56135546d25e6f17795b7e01ce0ec125664fc7640ca4db942f1d318e1c7b06e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logSecurity for imgproxykit 0.4.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for imgproxykit-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logA 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.