skillfed

psd-tools

Python package for working with Adobe Photoshop PSD files

psd-tools v1.18.0 645.4K downloads/30d#5,599 on PyPI
Permissive license MIT Active released

What it is and what it does

psd-tools is a Python library for parsing and manipulating Adobe Photoshop PSD and PSB files according to Adobe's specification. It lets you open a PSD file, inspect its layer structure, extract individual layer images as NumPy arrays or PIL images, and compose layers into a final flattened image. The library handles low-level PSD file structure directly, so you can read and write the raw format.

The package supports basic pixel-based layer composition, fill layer effects, adjustment layers (Brightness/Contrast, Levels, Curves, Exposure, Invert, Posterize, Threshold), vector masks, and blending modes. It can edit layer names and perform basic layer group operations (add/remove layers). Advanced features like type layer editing, smart objects, and many layer effects are not supported. For advanced rendering (vector shapes, gradients, patterns, layer effects), you can install optional dependencies via the 'composite' extra.

Use it for:

  • Batch export all layers from a PSD file as individual PNG images for asset pipelines
  • Programmatically read layer metadata and structure from PSD files in automated workflows
  • Convert PSD files to flattened images (PNG, JPEG) without opening Photoshop
  • Extract layer images as NumPy arrays for computer vision or image processing pipelines
  • Automate layer renaming or basic structural edits in PSD files

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

psd-tools reads and writes Adobe Photoshop PSD/PSB files, exports layer images as NumPy arrays or PIL images, and can compose layers back into flattened images.

Yes, if you need to read PSD files or export layers programmatically. The library is actively maintained, has no known vulnerabilities, and covers the most common use cases (reading, layer extraction, basic composition). Install with caution if you rely on advanced layer effects or type layer editing—those are not supported. The 'composite' extra adds rendering capabilities but may not be available on all platforms.

Install

psd-tools on PyPI

pip

pip install psd-tools

uv

uv add psd-tools

poetry

poetry add psd-tools

Installing psd-tools

Before you install

Medium install friction due to compiled wheels for multiple Python versions and platforms (3.10–3.14, x86_64, ARM, Windows, macOS, Linux). Active maintenance with a release 7 days ago. Depends on Pillow and NumPy, which are themselves well-maintained but add system-level dependencies.

License in practice

MIT license is permissive; you can use, modify, and distribute psd-tools freely in commercial and private projects with minimal restrictions.

Quickstart

pip install psd-tools

from psd_tools import PSDImage

psd = PSDImage.open('example.psd')
composite = psd.composite()
composite.save('output.png')

Requires Python 3.10 or later. Pillow and NumPy must be installed (pulled in automatically). Advanced compositing (vector rendering, gradients, effects) requires optional dependencies (aggdraw, scipy, scikit-image) installed via the 'composite' extra.

Verify before relying

  • Exact scope of layer attribute editing beyond layer name changes
  • Performance characteristics on large or deeply nested PSD files
  • Compatibility with PSD files created by recent Photoshop versions

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 4 — typing-extensions, attrs, Pillow, numpy
Maintenance actively maintained — 7 days since the last release
First released
Downloads 645,353/month — #5,599 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: psd_tools-1.18.0-cp310-cp310-macosx_10_9_x86_64.whl; psd_tools-1.18.0-cp310-cp310-macosx_11_0_arm64.whl; psd_tools-1.18.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; psd_tools-1.18.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; psd_tools-1.18.0-cp310-cp310-musllinux_1_2_aarch64.whl; psd_tools-1.18.0-cp310-cp310-musllinux_1_2_x86_64.whl; psd_tools-1.18.0-cp310-cp310-win_amd64.whl; psd_tools-1.18.0-cp311-cp311-macosx_10_9_x86_64.whl; psd_tools-1.18.0-cp311-cp311-macosx_11_0_arm64.whl; psd_tools-1.18.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; psd_tools-1.18.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; psd_tools-1.18.0-cp311-cp311-musllinux_1_2_aarch64.whl; psd_tools-1.18.0-cp311-cp311-musllinux_1_2_x86_64.whl; psd_tools-1.18.0-cp311-cp311-win_amd64.whl; psd_tools-1.18.0-cp311-cp311-win_arm64.whl; psd_tools-1.18.0-cp312-cp312-macosx_10_13_x86_64.whl; psd_tools-1.18.0-cp312-cp312-macosx_11_0_arm64.whl; psd_tools-1.18.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; psd_tools-1.18.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; psd_tools-1.18.0-cp312-cp312-musllinux_1_2_aarch64.whl

Keywords: photoshop, psd

Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Multimedia :: GraphicsTopic :: Multimedia :: Graphics :: Graphics ConversionTopic :: Multimedia :: Graphics :: ViewersTopic :: Software Development :: Libraries :: Python Modules

Tags

photoshop psd file parserextract layers from psdpsd to png conversionread adobe photoshop filespsd layer image exportphotoshop file manipulation python
photoshop-automationimage-processing

More Python Modules packages