MCPcopy Create free account
hub / github.com/pyathena-dev/PyAthena / getxattr

Method getxattr

pyathena/filesystem/s3.py:1446–1457  ·  view source on GitHub ↗

Get an attribute from the user-defined metadata of the path. Args: path: S3 path (s3://bucket/key) to get the attribute for. attr_name: The name of the attribute. **kwargs: Additional parameters passed to :meth:`metadata`. Returns: Th

(self, path: str, attr_name: str, **kwargs)

Source from the content-addressed store, hash-verified

1444 return S3Metadata(response)
1445
1446 def getxattr(self, path: str, attr_name: str, **kwargs) -> str | None:
1447 """Get an attribute from the user-defined metadata of the path.
1448
1449 Args:
1450 path: S3 path (s3://bucket/key) to get the attribute for.
1451 attr_name: The name of the attribute.
1452 **kwargs: Additional parameters passed to :meth:`metadata`.
1453
1454 Returns:
1455 The value of the attribute, or None if the attribute is not set.
1456 """
1457 return self.metadata(path, **kwargs).get(attr_name)
1458
1459 def setxattr(self, path: str, copy_kwargs: dict[str, Any] | None = None, **kw_args) -> None:
1460 """Set the user-defined metadata of the path.

Callers

nothing calls this directly

Calls 2

metadataMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected