esrf_pathlib.core#
Classes
|
Provides all features of |
- class esrf_pathlib.core.ESRFPath(*args, **kwargs)[source]#
Bases:
_BaseESRFPathProvides all features of
pathlib.Pathwith additional attributes depending on the matching ESRF filesystem path template.- classmethod from_fields(schema_name=None, schema_version=None, template_name=None, **fields)[source]#
Create
ESRFPathfrom schema fields.- Raises:
- Parameters:
schema_name (
Optional[str])schema_version (
Optional[int])template_name (
Optional[str])fields (
Union[str,date,DataType,TomoResultType,None])
- Return type:
- classmethod from_path(path, schema_name=None, schema_version=None, template_name=None)[source]#
Instantiate
ESRFPathwith a specific schema, schema version and template.- Raises:
- Parameters:
path (
Union[str,Path])schema_name (
Optional[str])schema_version (
Optional[int])template_name (
Optional[str])
- Return type:
- replace_fields(template_name=None, **fields)[source]#
Creates a new ESRFPath, replacing fields with values from fields.
- Raises:
- Parameters:
template_name (
Optional[str])fields (
Union[str,date,DataType,TomoResultType,None])
- Return type:
- strip_mount_point()[source]#
Remove leading segments typically introduced by
ESRFPath.resolve().- Return type:
- property schema_name: str#
Name of the ESRF path schema if it matches a registered schema.
- property template_name: str#
Name of the ESRF path template if it matches a template from a registered schema.