Registry / ai-ml / pilgram

pilgram

JSON →
library2.0.0pypypiunverified

pilgram is a Python library that applies Instagram-like photo filters, CSS filters, and blend modes to images. It leverages the Pillow library for image manipulation. The current version, 2.0.0, requires Python 3.10+ and Pillow 10.3.0+. The library maintains an active development and release schedule.

pip install "Pillow>=10.3.0" numpy pilgram
INSTALL
IMPORT
SIG · PILGRAM
P
pilgram
ai-mlpythonv2.0.0
Install
4.3s avg
Import
72ms
Disk
110MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 4.21s
py 3.11
✓ —
✓ 4.03s
py 3.12
✓ —
✓ 3.81s
py 3.13
4/8 runs
4/8 runs
py 3.9
✓ —
✓ 5.04s
110MB installed
● package 110MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Image
from PIL import Image
pilgram
import pilgram
pilgram.css
import pilgram.css
pilgram.css.blending
import pilgram.css.blending

This example demonstrates how to load an image, apply an Instagram-like filter, a CSS filter, and a blend mode. It creates dummy images if input files are not found, ensuring the code is runnable out-of-the-box.

from PIL import Image import pilgram import os # Create a dummy image if 'sample.jpg' does not exist if not os.path.exists('sample.jpg'): print("Creating dummy 'sample.jpg' for demonstration.") img = Image.new('RGB', (600, 400), color = 'red') img.save('sample.jpg') # Load an image im = Image.open('sample.jpg') # Apply an Instagram-like filter (e.g., Aden) pilgram.aden(im).save('sample-aden.jpg') print("Applied 'aden' filter, saved as 'sample-aden.jpg'") # Apply a CSS filter (e.g., sepia) import pilgram.css pilgram.css.sepia(im).save('sample-sepia.jpg') print("Applied CSS 'sepia' filter, saved as 'sample-sepia.jpg'") # Apply a blend mode (requires two images) if not os.path.exists('backdrop.jpg'): print("Creating dummy 'backdrop.jpg' for demonstration.") backdrop = Image.new('RGB', (600, 400), color = 'blue') backdrop.save('backdrop.jpg') else: backdrop = Image.open('backdrop.jpg') if not os.path.exists('source.jpg'): print("Creating dummy 'source.jpg' for demonstration.") source = Image.new('RGB', (600, 400), color = 'green') source.save('source.jpg') else: source = Image.open('source.jpg') import pilgram.css.blending pilgram.css.blending.color(backdrop, source).save('blending.jpg') print("Applied 'color' blend mode, saved as 'blending.jpg'")
Debug
Known issues
breakingpilgram v2.0.0 dropped support for Python versions older than 3.10 and Pillow versions older than 10.3.0. It also no longer supports `pillow-simd`.
fix
Upgrade Python to 3.10 or newer, and Pillow to 10.3.0 or newer. If using `pillow-simd` or older Pillow, you must pin `pilgram<2.0.0` during installation.
affects: >=2.0.0
breakingIn pilgram v2.0.0, the internal implementation changed from `ImageMath.eval` to `ImageMath.lambda_eval`. This specifically breaks compatibility with `pillow-simd` and older Pillow versions which do not provide `ImageMath.lambda_eval`.
fix
Ensure Pillow >= 10.3.0 is installed. If you rely on `pillow-simd` or need to use older Pillow versions, you must install `pilgram<2.0.0`.
affects: >=2.0.0
breakingThe signature for the `fill` function within pilgram has been changed in v2.0.0, specifically removing a list from its signature.
fix
Consult the latest pilgram documentation or source for the updated `fill` function signature and adjust your code accordingly. Old usages will result in `TypeError`.
affects: >=2.0.0
deprecatedPython 2.x support was officially dropped with pilgram v1.2.0. Attempting to install or run pilgram on Python 2.x will fail.
fix
Migrate your project to Python 3. If you must use Python 2.x, use `pilgram<1.2.0`.
affects: >=1.2.0
gotchaPillow compatibility is crucial for pilgram. Installing an incompatible version of Pillow with pilgram can lead to `AttributeError` or other runtime issues.
fix
Always install Pillow and pilgram according to the recommended version selection guide. For pilgram >= 2.0.0, use Pillow >= 10.3.0. For pilgram < 2.0.0, use Pillow < 10.3.0 or `pillow-simd`.
affects: All
Upgrade
Version history
2.0.0latest on PyPI · released Nov 23, 2025
Audit
Dependencies
PillowrequiredCore image manipulation library. Version compatibility is critical for pilgram versions.
numpyrequiredUsed for numerical operations, specifically array manipulation within image processing.
Agent activity
4 hits · last 30 days
node
4
Resources