Skip to main content

Python wrapper for extended filesystem attributes

Project description

xattr is a Python wrapper for extended filesystem attributes.

xattr also ships with an xattr command line tool for viewing and editing extended filesystem attributes. On platforms that support or ship with the attr package, you may prefer to use the getfattr and setfattr command line tools from the attr package.

Extended attributes extend the basic attributes of files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).

Extended attributes are currently only available on Darwin 8.0+ (Mac OS X 10.4) and Linux 2.6+. Experimental support is included for Solaris and FreeBSD.

Python 3.8+ is required as of v1.0.0, and this is the minimum version that is compatible with Python 3.12+.

Versions older than v1.0.0 are no longer supported, but are available for use. v0.10.1 is the last version to support older versions of Python (including 2.7).

Note: On Linux, custom xattr keys need to be prefixed with the user namespace, ie: user.your_attr.

Note: If you need to read or write Spotlight metadata attributes on macOS, see osxmetadata which provides a native macOS means to do so without directly manipulating extended attributes. osxmetadata also provides access to other macOS metadata attributes and extended attributes via xattr.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xattr-1.0.0.tar.gz (15.9 kB view hashes)

Uploaded source

Built Distributions

xattr-1.0.0-cp312-cp312-macosx_11_0_arm64.whl (18.6 kB view hashes)

Uploaded cp312

xattr-1.0.0-cp311-cp311-macosx_11_0_arm64.whl (18.6 kB view hashes)

Uploaded cp311

xattr-1.0.0-cp310-cp310-macosx_11_0_arm64.whl (18.6 kB view hashes)

Uploaded cp310

xattr-1.0.0-cp39-cp39-musllinux_1_1_i686.whl (38.3 kB view hashes)

Uploaded cp39

xattr-1.0.0-cp39-cp39-macosx_11_0_arm64.whl (18.6 kB view hashes)

Uploaded cp39

xattr-1.0.0-cp39-cp39-macosx_10_9_x86_64.whl (18.3 kB view hashes)

Uploaded cp39

xattr-1.0.0-cp38-cp38-musllinux_1_1_i686.whl (38.7 kB view hashes)

Uploaded cp38

xattr-1.0.0-cp38-cp38-macosx_11_0_arm64.whl (18.6 kB view hashes)

Uploaded cp38

xattr-1.0.0-cp38-cp38-macosx_10_9_x86_64.whl (18.3 kB view hashes)

Uploaded cp38

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page