Skip to main content

ThumbMoves

ThumbMoves logo

By Kieran Simkin · DanceFlow ecosystem · Vector logo and usage guide.

Cache-only thumbnail access for Windows and freedesktop, with explicit cache misses. https://kieransimkin.co.uk/

Part of the DanceFlow ecosystem, ThumbMoves is a small cross-platform Python library for retrieving existing thumbnails from the operating system's thumbnail cache without opening the original media file.

from thumbmoves import get_cached_thumbnail

result = get_cached_thumbnail("/photos/example.jpg", (320, 240))
if result:
    print(result.backend, result.size)
    open("thumb.jpg", "wb").write(result.data)

Or if you only want bytes:

from thumbmoves import get_cached_thumbnail_bytes

jpeg = get_cached_thumbnail_bytes("/photos/example.jpg")

Platform behavior

Platform Backend Strict cache-only? Behavior
Windows Shell IShellItemImageFactory Yes Requests `SIIGBF_INCACHEONLY
Linux / Unix desktops Freedesktop thumbnail spec Yes Reads $XDG_CACHE_HOME/thumbnails / ~/.cache/thumbnails by canonical file-URI MD5
macOS Quick Look capability No public equivalent Returns a miss rather than trigger thumbnail generation

The API is intentionally conservative: a cache miss is None. It never falls back to decoding the source file. Applications can implement their own fallback after the cache lookup.

Installation

Install the current release from PyPI:

python -m pip install thumbmoves

The same tested wheel and source distribution are attached to the matching GitHub release with SHA256SUMS.txt. Test releases are published separately on TestPyPI.

Or install a checkout for local development:

python -m pip install -e .[dev]
pytest

Windows installs comtypes automatically through a platform-scoped dependency. Other platforms do not install it.

Release tags use the thumbmoves-vX.Y.Z form because ThumbMoves currently lives in the PixelCue repository.

CLI

thumbmoves ~/Pictures/photo.jpg --size 320x240 -o thumb.jpg

Exit code 0 means cache hit; 1 means cache miss.

Design goals

  • no dependency on a GUI toolkit;
  • no opening the source media file;
  • no implicit thumbnail generation in the cache-only API;
  • one stable API across platforms;
  • Pillow images and encoded bytes both available;
  • OS-specific code isolated in backend modules.

License

MIT.

Metadata

Release files for thumbmoves 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thumbmoves 0.1.1
File Size Uploaded
thumbmoves-0.1.1.tar.gz 21.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for thumbmoves 0.1.1
File Interpreter ABI Platform
thumbmoves-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 43.0 kB

Release files / thumbmoves-0.1.1.tar.gz

Download URL thumbmoves-0.1.1.tar.gz
Size 21.9 kB
Tags Source
SHA-256 checksum
How to use checksums
72e58ab9bf55c66c7bba3d30a9a04cdb8e63c2aa018dd36ad94b3791a6a3dd88
BLAKE2b-256 checksum
How to use checksums
42d4f3161042f168536e39db1e0fbcfc97ed7c91fe16f127bf5bba0289ed2178
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 8, 2026.

Transparency log

Release files / thumbmoves-0.1.1-py3-none-any.whl

Download URL thumbmoves-0.1.1-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c38bf3296e24feead76e6e68d7b10d893224a1a55e420866878feca553e7a909
BLAKE2b-256 checksum
How to use checksums
6bd5f0cee79e3fa1e6cbd34b25c0855686744b932d7c92a5d4dc4af7029d36b0
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 8, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page