aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/psi/psi.py
blob: 8df0acd0953d2638c458ec3ff13f6665cbdbd3b9 (plain) (blame)
1
2
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

from psi.execution import Execution

__all__ = ['psi']

class psi:
    """
    A class representing a Psi object.

    Args:
        input: The input value for the Psi object.

    Returns:
        None

    Example:
        ```python
        obj = Psi("example")
        ```
    """

    def __init__(self, input):
        """
        Initializes a Psi object.

        Args:
            input: The input value for the Psi object.

        Returns:
            None
        """
        self.input = input
        self.execution = Execution(input)
        self.result = None

    def execute(self):
        """
        Executes the Psi object.

        Returns:
            The result of the execution.
        """
        self.result = self.execution.execute()
        return self.result

    def get_result(self):
        """
        Retrieves the result of the Psi object.

        Returns:
            The result of the execution.
        """
        return self.result

    def set_input(self, input):
        """
        Sets the input value for the Psi object.

        Args:
            input: The new input value.

        Returns:
            None
        """
        self.input = input
        self.execution = Execution(input)
        self.result = None