Skip to main content

xattr-compat

Support for extended attributes on multiple platforms. Also includes a mutable mapping class for easy access to file xattrs.

No C modules have to be compiled to use this library and it has no dependencies. The ctypes module in the standard library is used to make the required libc calls. Performance should be fine for all purposes. I mean, it's just xattrs, who is making so many xattr calls from Python that they need something above and beyond this?

Usage

The package exports the getxattr, listxattr, removexattr and setxattr functions. They have identical function signatures to the versions implemented in the os module in the standard library.

There's also a class Xattrs that provides a simple mutable mapping over a file's extended attributes:

# class Xattrs(path: os.PathLike, follow_symlinks: bool = True)

import xattr_compat

xattrs = xattr_compat.Xattrs("./my_file")

xattrs["user.humanfund.xattr"] = b"hello\0world"

print("Extended attributes:", xattrs.items())

License

MIT

Sponsorship

Development of xattr-compat is sponsored by Pro Football History.com, your source for NFL coaching biographies.

Metadata

Release files for xattr-compat 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xattr-compat 1.0.0
File Size Uploaded Provenance Actions
xattr-compat-1.0.0.tar.gz 5.3 kB Without provenance Details for xattr-compat-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xattr-compat 1.0.0
File Interpreter ABI Platform Actions
xattr_compat-1.0.0-py3-none-any.whl Python 3 none any Details for xattr_compat-1.0.0-py3-none-any.whl

Total release size: 12.4 kB

Release files / xattr-compat-1.0.0.tar.gz

Download URL xattr-compat-1.0.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5ef02e523585276d78a4ebbc05f2d08f0ddc200116c847826b1a18d8aa71f5bc
BLAKE2b-256 checksum
How to use checksums
75825ffb78d69936e7148d6ee907dd44581b6478dbfc313cda32c122b264f505
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

Release files / xattr_compat-1.0.0-py3-none-any.whl

Download URL xattr_compat-1.0.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fafcd360b274b362a46c88871473c26236a858071fbbe787a05f8df062899fa
BLAKE2b-256 checksum
How to use checksums
06514708370113789e0ab876c9bcb895a66fa116bb9e90e8940f6f6c932db5c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

Security for xattr-compat 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page