ds-store
Manipulate Finder .DS_Store files from Python
What it is and what it does
ds_store is a pure-Python library for reading and modifying macOS Finder .DS_Store files, the hidden metadata files that store folder view settings and file attributes on macOS. Because it's written in pure Python rather than as a native macOS tool, it runs on any platform—Linux, Windows, or macOS—making it useful for build systems, disk image creation, and cross-platform tooling that needs to inspect or manipulate these files without running on a Mac.
The package wraps the binary .DS_Store format (reverse-engineered from public documentation) and exposes it through a Python API. It depends only on mac_alias, another pure-Python library for handling macOS alias records, keeping the dependency chain minimal and portable.
Use it for:
- Examine .DS_Store metadata in disk images or macOS filesystem backups on non-Mac systems
- Automate creation of DMG files with specific Finder view settings during cross-platform build processes
- Parse Finder folder attributes and custom icon positions from .DS_Store files in CI/CD pipelines
- Modify .DS_Store files to reset view preferences or clean up metadata in batch operations
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Read and modify macOS Finder .DS_Store files from Python code on any platform, without requiring macOS.
Yes, if you need to read or modify .DS_Store files outside macOS. Low install friction, no known vulnerabilities, MIT-licensed, actively maintained, and production-stable. The narrow use case (macOS filesystem metadata on non-Mac platforms) makes it essential for its niche but not generally useful otherwise.
Install
ds-store on PyPI
pip
pip install ds-storeuv
uv add ds-storepoetry
poetry add ds-storeInstalling ds-store
Before you install
Low install friction with a single pure-Python dependency (mac_alias). Actively maintained with recent commits and production-stable status.
License in practice
MIT license permits commercial and private use with minimal restrictions.
Quickstart
pip install ds-store
from ds_store import DSStore
with DSStore.open('path/to/.DS_Store') as ds:
for entry in ds:
print(entry.filename)
Verify before relying
- Specific API surface for modifying .DS_Store entries beyond reading them
- Performance characteristics when handling large or complex .DS_Store files
- Compatibility guarantees with different macOS versions' .DS_Store format variants
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — mac_alias |
| Maintenance | actively maintained — 52 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 211,115/month — #9,484 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ds_store-1.3.3-py3-none-any.whl
Keywords: DS_Store
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
mac-aliasmac_alias generates and reads binary Alias and…
permissive · top 15,000 on PyPI
pyobjc-framework-FinderSyncProvides Python bindings to macOS's FinderSync…
permissive · top 15,000 on PyPI
pyobjc-framework-AccountsProvides Python bindings to macOS's Accounts…
permissive · top 15,000 on PyPI
pyobjc-framework-DeviceDiscoveryExtensionProvides Python bindings for Apple's…
permissive · top 15,000 on PyPI
pyobjc-framework-CoreMIDIProvides Python bindings to macOS's CoreMIDI…
permissive · top 15,000 on PyPI
clipboardProvides a simple interface to copy text to and…
permissive · top 15,000 on PyPI
pyobjc-framework-FSKitProvides Python bindings to macOS's FSKit…
permissive · top 15,000 on PyPI
pyobjc-framework-GameSaveProvides Python bindings for macOS's GameSave…
permissive · top 15,000 on PyPI
pyobjc-framework-BackgroundAssetsProvides Python bindings to Apple's…
permissive · top 15,000 on PyPI
dmgbuilddmgbuild creates macOS disk images (.dmg files)…
permissive · top 15,000 on PyPI