Skip to content

Cross Sectoral Standard

This part of the project documentation focuses on an information-oriented approach. Use it as a reference for the technical implementation of the pact_methodology project code.

CrossSectoralStandard

Bases: str, Enum

CrossSectoralStandard is the enumeration of accounting standards used for product carbon footprint calculation. Valid values are:

  • GHG_PROTOCOL: Represents the GHG Protocol Product standard.
  • ISO_14067: Represents ISO Standard 14067.
  • ISO_14044: Represents ISO Standard 14044.

Each CrossSectoralStandard MUST be encoded as a JSON string.

Examples:

Select a standard:

>>> standard = CrossSectoralStandard.GHG_PROTOCOL
>>> print(standard)
GHG Protocol Product standard
>>> print(repr(standard))
CrossSectoralStandard.GHG_PROTOCOL

Iterating over all standards:

>>> for standard in CrossSectoralStandard:
...     print(standard)
GHG Protocol Product standard
ISO Standard 14067
ISO Standard 14044
Source code in pact_methodology/carbon_footprint/cross_sectoral_standard.py
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class CrossSectoralStandard(str, Enum):
    """
    CrossSectoralStandard is the enumeration of accounting standards used for product carbon footprint calculation.
    Valid values are:

    - GHG_PROTOCOL: Represents the GHG Protocol Product standard.
    - ISO_14067: Represents ISO Standard 14067.
    - ISO_14044: Represents ISO Standard 14044.

    Each CrossSectoralStandard MUST be encoded as a JSON string.

    Examples:
        Select a standard:
        >>> standard = CrossSectoralStandard.GHG_PROTOCOL
        >>> print(standard)
        GHG Protocol Product standard

        >>> print(repr(standard))
        CrossSectoralStandard.GHG_PROTOCOL

        Iterating over all standards:
        >>> for standard in CrossSectoralStandard:
        ...     print(standard)
        GHG Protocol Product standard
        ISO Standard 14067
        ISO Standard 14044
    """

    GHG_PROTOCOL = "GHG Protocol Product standard"
    ISO_14067 = "ISO Standard 14067"
    ISO_14044 = "ISO Standard 14044"

    def __str__(self):
        return self.value

    def __repr__(self):
        return f"CrossSectoralStandard.{self.name}"