psd-tools
Python package for working with Adobe Photoshop PSD files
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-toolsuv
uv add psd-toolspoetry
poetry add psd-toolsInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pillowPillow adds image processing capabilities to…
permissive · top 100 on PyPI
blend-modesImplements blend modes (soft light, dodge,…
permissive · top 15,000 on PyPI
blendmodesApplies a range of blending modes to composite…
permissive · top 15,000 on PyPI
aspose-slidesAspose.Slides generates, modifies, converts,…
unclear · top 15,000 on PyPI
borbborb reads, writes, and manipulates PDF files…
agpl · top 15,000 on PyPI
OpenEXRRead and write OpenEXR image files with support…
unclear · top 15,000 on PyPI
fig2sketchConverts Figma .fig design files into Sketch…
unclear · top 15,000 on PyPI
svglibSvglib reads SVG files and converts them to…
copyleft · top 5,000 on PyPI
CairoSVGCairoSVG converts SVG files to PDF, EPS, PS,…
copyleft · top 5,000 on PyPI
docker-squashCombines multiple Docker image layers into…
permissive · top 15,000 on PyPI