Class to store information about the current status of the orca server.
| 754 | # Orca status class |
| 755 | # ------------------------ |
| 756 | class OrcaStatus(object): |
| 757 | """ |
| 758 | Class to store information about the current status of the orca server. |
| 759 | """ |
| 760 | |
| 761 | _props = { |
| 762 | "state": "unvalidated", # or 'validated' or 'running' |
| 763 | "executable_list": None, |
| 764 | "version": None, |
| 765 | "pid": None, |
| 766 | "port": None, |
| 767 | "command": None, |
| 768 | } |
| 769 | |
| 770 | @property |
| 771 | def state(self): |
| 772 | """ |
| 773 | A string representing the state of the orca server process |
| 774 | |
| 775 | One of: |
| 776 | - unvalidated: The orca executable has not yet been searched for or |
| 777 | tested to make sure its valid. |
| 778 | - validated: The orca executable has been located and tested for |
| 779 | validity, but it is not running. |
| 780 | - running: The orca server process is currently running. |
| 781 | """ |
| 782 | return self._props["state"] |
| 783 | |
| 784 | @property |
| 785 | def executable(self): |
| 786 | """ |
| 787 | If the `state` property is 'validated' or 'running', this property |
| 788 | contains the full path to the orca executable. |
| 789 | |
| 790 | This path can be specified explicitly by setting the `executable` |
| 791 | property of the `plotly.io.orca.config` object. |
| 792 | |
| 793 | This property will be None if the `state` is 'unvalidated'. |
| 794 | """ |
| 795 | executable_list = self._props["executable_list"] |
| 796 | if executable_list is None: |
| 797 | return None |
| 798 | else: |
| 799 | return " ".join(executable_list) |
| 800 | |
| 801 | @property |
| 802 | def version(self): |
| 803 | """ |
| 804 | If the `state` property is 'validated' or 'running', this property |
| 805 | contains the version of the validated orca executable. |
| 806 | |
| 807 | This property will be None if the `state` is 'unvalidated'. |
| 808 | """ |
| 809 | return self._props["version"] |
| 810 | |
| 811 | @property |
| 812 | def pid(self): |
| 813 | """ |