simple_module_images
Image collections for SimpleModule hosts. A collection holds images whose originals are immutable; everything derived from them (EXIF and location, renditions, quality metrics, an optionally anonymised display copy, map tiles) is produced by pipeline steps that run as background tasks. Collections are private to their owner, shared with chosen users, internal to the organisation or public.
Imports take single files, batches, large direct uploads, ZIP archives and
GeoJSON sources of up to a million located images. Groups, AI prompts with a
review queue, a map (GeoJSON points and PMTiles) and a public gallery are
included. Design:
docs/superpowers/specs/2026-10-28-images-module-design.md in the source repo;
the guides are in docs/.
Install
pip install simple_module_images
Add simple_module_images to your host's dependencies; for an in-repo checkout,
resolve it from the workspace:
[tool.uv.sources.simple_module_images]
workspace = true
A plain install pulls no onnxruntime or OpenCV. Heavy processors are extras, imported only inside the step that needs them:
| Extra | Adds |
|---|---|
quality |
OpenCV: resolution, blur and exposure metrics |
anonymize |
onnxruntime: YuNet face and YOLOv9 plate detection (MIT models), blurred into a display copy (the original is kept); weights from anonymize_weights_path or a pinned, checksummed download on first use |
ai |
simple_module_ai: prompt-based image analysis |
billing |
simple_module_billing: storage and request metering |
pagebuilder |
simple_module_pagebuilder: an image gallery block |
The map view needs no extra: its PMTiles archive is built by the tippecanoe
binary (tippecanoe_path), which must be on the worker's machine.
Models and licences. The anonymize extra installs only onnxruntime
(MIT). The step downloads two MIT-licensed ONNX models on first use, pinned by
SHA-256: YuNet (faces; Shiqi Yu, via
OpenCV Zoo)
and YOLOv9 licence-plate detector (ankandrew,
open-image-models). Their
copyright notices are in this module's NOTICE. Recall is unverified, and
weights are cached under ~/.cache/simple_module_images/models unless
anonymize_weights_path points at face.onnx and plate.onnx. See
docs/index.md.
The module needs the framework's settings, sharing, file_storage and
background_tasks modules. Migrations live in the consuming host
(make migration), never in the wheel.
Image processing runs in Celery workers (make worker, worker-imports,
worker-heavy, worker-gpu, beat) or inline with
SM_BG_TASKS_TASK_ALWAYS_EAGER=true. A plugin that adds steps ships an
images_extensions.py and must be installed in the web process and every
worker. See docs/worker.md and
docs/writing-a-plugin.md.
Usage
The console is at /admin/images, the JSON API under /api/images and public
collections at /images/c/{slug}. Every router binds a tenant: a single-tenant
host uses default, a multi-tenant host the organisation the framework
resolved (403 tenant_required for the console, 404 for public routes when
none).
Permissions
| Permission | Allows |
|---|---|
images.view |
See collections and images the access policy admits |
images.create |
Create collections and upload images |
images.publish |
Make a collection public or internal |
images.manage |
Manage every collection regardless of owner |
images.originals.view |
Download the immutable original |
Settings
The module's settings are governed by the framework's settings.edit, as every
other module's are; images has no settings permission of its own.
Stored in the database and edited on the Settings screen; there is no
SM_IMAGES_* environment variable. System scope: one configuration for every
tenant. Fields marked as needing a restart (tippecanoe_path,
public_asset_base_url) are read once at boot; workers pick up the rest within
about 30 seconds.
| Setting | Default |
|---|---|
max_image_bytes |
50 MiB |
batch_max |
50 |
upload_body_max_bytes |
100 MiB |
direct_upload_threshold |
20 MiB |
max_open_uploads_per_tenant |
20 |
zip_max_bytes / zip_max_entries |
2 GiB / 10 000 |
zip_max_entry_bytes / zip_max_total_bytes / zip_max_ratio |
200 MiB / 8 GiB / 200 |
geojson_max_features / geojson_max_bytes / geojson_max_feature_bytes |
1 000 000 / 2 GiB / 60 MiB |
download_concurrency_per_domain / download_concurrency_total (per download task) / download_timeout |
4 / 32 / 60 s |
thumbnail_sizes |
marker 64, small 160, medium 400, large 1024 |
dedupe_by_hash |
off |
tippecanoe_path, anonymize_weights_path |
tippecanoe, empty |
map_rebuild_threshold_pct / map_rebuild_threshold_abs |
5 / 100 |
map_style_url (basemap; empty = flat, no third-party request) |
https://tiles.openfreemap.org/styles/positron |
public_asset_base_url |
empty |
janitor_grace_days, step_output_max_bytes, step_lease_seconds |
7, 65 536, 1 800 |
Routes
Upload routes (/api/images/collections/{id}/images, .../imports,
.../imports/zip and /api/images/uploads/) carry a request-body ceiling of
upload_body_max_bytes plus multipart framing; the rest use the host's global
limit. Public exemptions are GET/HEAD only, under /images/c/ and
/api/images/public/.
Map
GET /api/images/collections/{id}/points?bbox=minx,miny,maxx,maxy&limit=&cursor=(anonymous twin:/api/images/public/c/{slug}/points) answers a GeoJSONFeatureCollection. Each point carries onlyid,captured_atandgroup_id; an image whose display mutator has not settled is not a point.limitis clamped to 5000; follownext_cursorfor the rest.GET|HEAD …/collections/{id}/map.pmtiles(twin:/api/images/public/c/{slug}/map.pmtiles) serves the collection's PMTiles archive withRange, checking access on every request. It is a 404 until a map is built.images.build_map(queueimages) builds the archive withtippecanoe. A rebuild starts once the changes since the last build reachmap_rebuild_threshold_absormap_rebuild_threshold_pctpercent of its points (both at least 1). A move does not wait for the threshold. A visibility change, a removed point (an image trashed or its location cleared) and a pipeline save that changes the redaction gate withdraw the archive in the same transaction and build a fresh one. An archive is stamped with the redaction gate it was built under, and is a 404 under any other (for example once a mutator plugin is removed) untilimages.reconcilerebuilds it.- The
images.tippecanoehealth check is degraded while the binary cannot be found. Points keep working. - The points are drawn over the basemap
map_style_urlnames (OpenFreeMap's Positron by default; its origin is added to the CSP). Viewers' browsers fetch its tiles from that host, so it sees their IP and the area they view; set it to empty for a flat background with no third-party request. A style that cannot be fetched falls back to the flat background.
Documentation
| Page | For |
|---|---|
| docs/index.md | Concepts, install, permissions, every setting |
| docs/access.md | Visibility, shares, originals, withheld images |
| docs/imports.md | Uploads, direct upload and bucket CORS, ZIP, GeoJSON, limits |
| docs/pipeline.md | Steps, leases, AI prompts, groups, presets, review, storage metering |
| docs/writing-a-plugin.md | Steps, presets and result views from another module |
| docs/worker.md | Workers, beat, timeouts, tuning, recovery times |
| docs/migrating-from-portal.md | Moving off the portal's feature |
Metadata
Release files for simple-module-images 0.0.14
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 |
|---|---|---|---|---|
| simple_module_images-0.0.14.tar.gz | 934.5 kB | With provenance | Details for simple_module_images-0.0.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simple_module_images-0.0.14-py3-none-any.whl | Python 3 | none | any | Details for simple_module_images-0.0.14-py3-none-any.whl |
Total release size: 1.6 MB
Release files / simple_module_images-0.0.14.tar.gz
| Download URL | simple_module_images-0.0.14.tar.gz |
|---|---|
| Size | 934.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae81631e9c440a70362d249f836f85cb79bbb1ac99f8aae87432990e5066d36b
|
|
BLAKE2b-256 checksum How to use checksums |
06459853c857e435a54fe2799fc8041c7ec80fb896e2dbdd0c5219ab5bf08db3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / simple_module_images-0.0.14-py3-none-any.whl
| Download URL | simple_module_images-0.0.14-py3-none-any.whl |
|---|---|
| Size | 641.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0395d1ad794106228922903b6a1c0f52e9c4b3d1cd809d2c62b1b115f488c93a
|
|
BLAKE2b-256 checksum How to use checksums |
c75193ec643b4ebdfcf5f22f73dac5c732c336d6b1121caf7354f9f0125ede9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logSecurity for simple-module-images 0.0.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for simple_module_images-0.0.14.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 Nov 7, 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.