Skip to main content

ThumbMoves

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 from PyPI after the first production release:

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.0

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.0
File Size Uploaded
thumbmoves-0.1.0.tar.gz 10.2 kB Details

Built distribution (wheel)

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

Total release size: 19.9 kB

Release files / thumbmoves-0.1.0.tar.gz

Download URL thumbmoves-0.1.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e5c6b47b80d41a38ccbede63c1ab1b710322155d54083975fdbc77ad289059e7
BLAKE2b-256 checksum
How to use checksums
47f9afeacdbfae313e4a6df7d06d4f7de21e4579f3c0de9cfa07b3de3616d500
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 3, 2026.

Transparency log

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

Download URL thumbmoves-0.1.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9a03fe772e476b3d34253782d4ca49c82036130e55419ba0ac36c3d928b2da8
BLAKE2b-256 checksum
How to use checksums
11128ed3dea84a6548e5aac3254e5aa4f03de806c475c6b514df8ff79ad3f120
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 3, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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