| |
- abc.ABC(builtins.object)
-
- Serializable
-
- FileEntity
class FileEntity(Serializable) |
|
FileEntity(location: Union[pathlib.Path, str, NoneType]) -> None
A class for working with objects that are backed by a disk location. |
|
- Method resolution order:
- FileEntity
- Serializable
- abc.ABC
- builtins.object
Methods defined here:
- __hash__(self) -> int
- Use this instance's disk location for hashing.
- __init__(self, location: Union[pathlib.Path, str, NoneType]) -> None
- Initialize this file-backed entity.
- default_location(self) -> Union[pathlib.Path, str, NoneType]
- Get a default serialization destination for this instance.
Data and other attributes defined here:
- __abstractmethods__ = frozenset({'to_stream'})
Methods inherited from Serializable:
- to_file(self, path: Union[pathlib.Path, str, NoneType] = None, encoding: str = 'utf-8', **kwargs) -> None
- Write this object to a file.
- to_stream(self, stream: <class 'TextIO'>, **kwargs) -> None
- Write this object to a text stream.
Data descriptors inherited from Serializable:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class Serializable(abc.ABC) |
|
An interface definition for serializable classes. |
|
- Method resolution order:
- Serializable
- abc.ABC
- builtins.object
Methods defined here:
- default_location(self) -> Union[pathlib.Path, str, NoneType]
- Get a default serialization destination for this instance.
- to_file(self, path: Union[pathlib.Path, str, NoneType] = None, encoding: str = 'utf-8', **kwargs) -> None
- Write this object to a file.
- to_stream(self, stream: <class 'TextIO'>, **kwargs) -> None
- Write this object to a text stream.
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Data and other attributes defined here:
- __abstractmethods__ = frozenset({'to_stream'})
| |