System
- class lib.system.system.System
Bases:
objectHolds information about the currently running system and environment
Attributes Summary
Trueif running on a Linux system otherwiseFalse.Trueif running on a macOS system otherwiseFalse.Trueif running on a Windows system otherwiseFalse.Methods Summary
validate()Perform validation that the running system can be used for faceswap.
validate_python([max_version])Check that the running Python version is valid
Attributes Documentation
- is_linux
Trueif running on a Linux system otherwiseFalse.
- is_macos
Trueif running on a macOS system otherwiseFalse.
- is_windows
Trueif running on a Windows system otherwiseFalse.
Methods Documentation
- validate() None
Perform validation that the running system can be used for faceswap. Log an error and exit if it cannot
- Return type:
None
- validate_python(max_version: tuple[int, int] | None = None) bool
Check that the running Python version is valid
- Parameters:
max_version (tuple[int, int] | None) – The max version to validate Python against.
Nonefor the project Maximum. Default:None(project maximum)- Return type:
Trueif the running Python version is valid, otherwise logs an error and exits
- cpu_count
The number of CPU cores on the system
- encoding
The system encoding
- is_admin
Trueif we are running with Admin privileges
- is_conda
Trueif running under Conda otherwiseFalse
- property is_linux: bool
Trueif running on a Linux system otherwiseFalse.
- property is_macos: bool
Trueif running on a macOS system otherwiseFalse.
- is_virtual_env
Trueif Python is being run inside a virtual environment
- property is_windows: bool
Trueif running on a Windows system otherwiseFalse.
- machine
“x86_64”)
- Type:
The machine type (eg
- platform
Human readable platform identifier
- processor
The processor in use, if detected
- python_architecture
64bit/32bit)
- Type:
The Python architecture that is running (eg
- python_implementation
The python implementation in use
- python_version
The <major>.<minor>.<release> version of Python that is running
- release
The OS Release that this code is running on
- system: Literal['darwin', 'linux', 'windows']
The system (OS type) that this code is running on. Always lowercase
- validate() None
Perform validation that the running system can be used for faceswap. Log an error and exit if it cannot
- Return type:
None
- validate_python(max_version: tuple[int, int] | None = None) bool
Check that the running Python version is valid
- Parameters:
max_version (tuple[int, int] | None) – The max version to validate Python against.
Nonefor the project Maximum. Default:None(project maximum)- Return type:
Trueif the running Python version is valid, otherwise logs an error and exits