--- id: pyxattr version: "0.8.1" license: LGPL license_treatment: copyleft maintenance: aging --- # pyxattr — Filesystem extended attributes for python License: copyleft · Maintenance: aging · Downloads: 86.3K/mo ## What it is and what it does pyxattr is a Python extension module that exposes the extended attributes API available on Linux and macOS filesystems. It wraps the underlying C functions to let you read, write, list, and delete metadata attributes attached to files and directories—attributes that live outside the standard Unix permission model. These are commonly used for storing MIME types, custom tags, access control lists, and other filesystem-level metadata. The module is a thin, direct binding to the OS-level calls, with no runtime dependencies beyond the Python standard library. It requires compilation against your system's C headers and a C compiler at install time, which makes it less portable than pure-Python packages but necessary for direct filesystem access. It supports Python 3.7+ and PyPy 3.7+, is marked Production/Stable, and has no known vulnerabilities. Use it for: - Store and retrieve custom metadata (MIME types, tags, comments) on files without modifying the files themselves - Implement filesystem-level access control or security labels on Linux systems - Build backup or archival tools that preserve extended attributes across systems - Develop file management utilities that tag or annotate files with searchable attributes ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python access to extended attributes (xattr) on filesystem objects in Linux and macOS, allowing you to read, write, list, and remove metadata beyond standard file permissions. Yes, if you need direct access to extended file attributes on Linux or macOS and are willing to handle the compilation requirement. The package is stable and production-ready with no known vulnerabilities. No, if you cannot install a C compiler or Python development headers in your environment, or if your filesystem does not support extended attributes. Consider pre-built distributions from your OS package manager to avoid building from source. ## Install pip install pyxattr uv add pyxattr poetry add pyxattr ## Installing pyxattr Before you install: High install friction: requires a C compiler and Python development headers to build from source. The package is aging (last release 2023-04-17), though the repository remains active with recent commits. Pre-built distributions may be available from your OS package manager, which sidesteps compilation. License in practice: Licensed under LGPL 2.1 or later (copyleft). You may use and modify the package freely, but any derivative works must also be distributed under LGPL 2.1 or a compatible license. Linking against this library in a proprietary application requires careful license review. Quickstart: pip install pyxattr import xattr xattr.setxattr('file.txt', 'user.comment', 'My note') print(xattr.getxattr('file.txt', 'user.comment')) Requires a C compiler and Python development libraries installed before pip install will succeed. Linux (kernel v2.4 or later) or macOS with xattr-supporting filesystems (XFS, ext2/ext3/ext4, etc.) required at runtime. Verify before relying: - Whether pre-built wheels are available for common platforms to avoid compilation - Current compatibility with Python versions beyond 3.12 (description notes testing up to 3.12) - Whether the aging maintenance status (1215 days since last release) affects reliability for new use cases ## Package facts - License: LGPL (copyleft) - Python support: supports_current - Install friction: high - Maintenance: aging - Downloads: 86.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags extended attributes filesystem, xattr python, file metadata attributes, linux xattr access, filesystem extended attributes, python xattr module, file attribute manipulation, filesystem-metadata, c-extension [View on SkillFed](https://skillfed.io/packages/pyxattr) · [View on PyPI](https://pypi.org/project/pyxattr/)