Source code

Download source archive ↓

src/openpyxl/packaging/interface.py

1# Copyright (c) 2010-2024 openpyxl
2
3from abc import abstractproperty
4from openpyxl.compat.abc import ABC
5
6
7class ISerialisableFile(ABC):
8
9    """
10    Interface for Serialisable classes that represent files in the archive
11    """
12
13
14    @abstractproperty
15    def id(self):
16        """
17        Object id making it unique
18        """
19        pass
20
21
22    @abstractproperty
23    def _path(self):
24        """
25        File path in the archive
26        """
27        pass
28
29
30    @abstractproperty
31    def _namespace(self):
32        """
33        Qualified namespace when serialised
34        """
35        pass
36
37
38    @abstractproperty
39    def _type(self):
40        """
41        The content type for the manifest
42        """
43
44
45    @abstractproperty
46    def _rel_type(self):
47        """
48        The content type for relationships
49        """
50
51
52    @abstractproperty
53    def _rel_id(self):
54        """
55        Links object with parent
56        """