Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/HorlogeSkynet/archey4
/ types & classes
Types & classes
72 in github.com/HorlogeSkynet/archey4
⨍
Functions
342
◇
Types & classes
72
↳
Endpoints
133
↓ 15 callers
Class
Output
This is the object handling output entries populating. It also handles the logo choice based on some system detections.
archey/output.py:21
↓ 15 callers
Class
Packages
Relies on the first found packages manager to list the installed packages
archey/entries/packages.py:50
↓ 13 callers
Class
Colors8Bit
ANSI Terminal colors using 8-bit values (256 available) Instantiated using a `bright` int and `value` int, similar to a `Colors` tuple. S
archey/colors.py:94
↓ 11 callers
Class
Custom
Custom entry gathering info based on configuration options
archey/entries/custom.py:14
↓ 9 callers
Class
Configuration
Values present in `DEFAULT_CONFIG` dictionary are required. New optional values may be added with `Utility.update_recursive` method. If
archey/configuration.py:30
↓ 9 callers
Class
LanIP
Relies on the `netifaces` module to detect LAN IP addresses
archey/entries/lan_ip.py:15
↓ 9 callers
Class
Terminal
Simple terminal detection based on the `TERM` environment variable. It also displays the colors palette afterwards.
archey/entries/terminal.py:57
↓ 7 callers
Class
Kernel
Retrieve kernel identity. [GNU/LINUX] If user-enabled, implement a version comparison against upstream data.
archey/entries/kernel.py:15
↓ 7 callers
Class
_SimpleEntry
archey/test/test_archey_entry.py:10
↓ 5 callers
Class
Processes
Simple wrapper to `archey.processes` to provide the number of running processes as an entry.
archey/entries/processes.py:7
↓ 4 callers
Class
ArcheyException
Archey own exception class
archey/exceptions.py:4
↓ 4 callers
Class
Distributions
This enumeration lists supported operating systems (keys). Values contain their respective `distro` identifier. See <https://distro.readt
archey/distributions.py:18
↓ 3 callers
Class
Colors
ANSI terminal colors enumeration. See <https://web.archive.org/web/20200627145120/http://www.termsys.demon.co.uk/vtansi.htm> or <https
archey/colors.py:54
↓ 3 callers
Class
Shell
Simple shell path detection based either on the `SHELL` environment variable or the local administrative database.
archey/entries/shell.py:10
↓ 3 callers
Class
WindowManager
Uses `wmctrl` to retrieve some information about the window manager. If not available, fall back on a simple iteration over the processes.
archey/entries/window_manager.py:61
↓ 2 callers
Class
API
This class provides results serialization for external usages. At the moment, only JSON has been implemented. Feel free to contribute to
archey/api.py:13
↓ 2 callers
Class
Hostname
Read system file with fallback on `platform` module to retrieve the system host-name
archey/entries/hostname.py:9
↓ 2 callers
Class
User
Retrieves the session name of the current logged in user
archey/entries/user.py:8
↓ 2 callers
Class
_SimpleCounter
archey/test/test_archey_singleton.py:9
↓ 1 callers
Class
Environment
At startup, instantiate this class and set up some attributes according to their respective environment variable value.
archey/environment.py:12
↓ 1 callers
Class
Processes
At startup, instantiate this class to populate a list of running processes
archey/processes.py:10
Class
CPU
Parse `/proc/cpuinfo` file to retrieve model names. If no information could be retrieved, call `lscpu`. `value` attribute is populated a
archey/entries/cpu.py:13
Class
CustomAssertions
This class defines our custom assertion methods being used in Archey unit testing
archey/test/__init__.py:15
Class
DesktopEnvironment
Return static values for macOS and Windows. On Linux, use extensive environment variables processing to find known identifiers. Fallback
archey/entries/desktop_environment.py:57
Class
Disk
Uses `df` to compute disk usage across devices
archey/entries/disk.py:13
Class
Distro
Uses `distro` and `platform` modules to retrieve distribution and architecture information
archey/entries/distro.py:11
Class
Entries
An enumeration to store and declare each one of our entries. The string representation of keys will act as entries names. Values will be
archey/__main__.py:49
Class
Entry
Module base class
archey/entry.py:11
Class
GPU
Relies on `lspci` or `pciconf` to retrieve graphical device(s) information
archey/entries/gpu.py:28
Class
HelperMethods
This class contains helper methods we commonly use in our entry unit tests.
archey/test/entries/__init__.py:15
Class
LoadAverage
System load average detection entry
archey/entries/load_average.py:10
Class
Model
Uses multiple methods to retrieve some information about the host hardware
archey/entries/model.py:14
Class
RAM
First tries to use the `free` command to retrieve RAM usage. If not available, falls back on the parsing of `/proc/meminfo` file.
archey/entries/ram.py:15
Class
Singleton
Taken from : <https://stackoverflow.com/q/6760685/10599709> This meta-class allows us to declare `Configuration` as a singleton. This way
archey/singleton.py:7
Class
Style
Style base-class supporting terminal escape sequences for bold, colour, etc. Supports an arbitrary number of display attributes.
archey/colors.py:15
Class
Temperature
Tries to compute an average temperature from `sensors` (LM-Sensors). If not available, falls back on system thermal zones files (GNU/Linux)
archey/entries/temperature.py:15
Class
TestApi
Simple test cases to check `API` formatting behaviors.
archey/test/test_archey_api.py:11
Class
TestCPUEntry
Here, we mock the `open` call on `/proc/cpuinfo` with fake content. In some cases, `lscpu` output is being mocked too.
archey/test/entries/test_archey_cpu.py:12
Class
TestColors
Test cases for the `Style` and `Colors` (enumeration / utility) classes
archey/test/test_archey_colors.py:9
Class
TestConfiguration
Simple test cases to check the behavior of `Configuration` singleton utility class. Values will be manually set in the tests below.
archey/test/test_archey_configuration.py:18
Class
TestCustomAssertions
This class implements test cases for the custom Archey unit testing framework (#inception)
archey/test/__init__.py:37
Class
TestCustomEntry
Custom entry unit test cases
archey/test/entries/test_archey_custom.py:12
Class
TestDesktopEnvironmentEntry
DesktopEnvironment test cases
archey/test/entries/test_archey_desktop_environment.py:9
Class
TestDiskEntry
Here, we mock `subprocess.run` calls to disk utility tools.
archey/test/entries/test_archey_disk.py:11
Class
TestDistributions
Test cases for the `Distributions` (enumeration / utility) class.
archey/test/test_archey_distributions.py:9
Class
TestDistroEntry
`Distro` entry simple test cases
archey/test/entries/test_archey_distro.py:11
Class
TestEntry
Simple test cases for our `Entry` abstract class
archey/test/test_archey_entry.py:21
Class
TestGPUEntry
Here, we mock the `check_output` call to `lspci` to test the logic
archey/test/entries/test_archey_gpu.py:15
Class
TestHelperMethods
This class implements test cases for our helper methods.
archey/test/entries/__init__.py:98
Class
TestHostnameEntry
Test cases mocking for `/etc/hostname` file and `platform.node` call
archey/test/entries/test_archey_hostname.py:9
Class
TestKernelEntry
Here, we mock the `platform` module calls and check afterwards that the output is correct.
archey/test/entries/test_archey_kernel.py:11
Class
TestLanIPEntry
Here, we mock the `netifaces` usages (interfaces and addresses detection calls)
archey/test/entries/test_archey_lan_ip.py:14
Class
TestLoadAverageEntry
LoadAverage `output` configuration-based coloration test class
archey/test/entries/test_archey_load_average.py:11
Class
TestLogos
Simple tests checking logos consistency and utility function logic
archey/test/test_archey_logos.py:12
Class
TestModelEntry
For this test we have to go through several eventualities : * Laptop / Desktop "regular" environments * Raspberry Pi * Virtual enviro
archey/test/entries/test_archey_model.py:12
Class
TestOutput
Simple test cases to check the behavior of the `Output` class.
archey/test/test_archey_output.py:15
Class
TestPackagesEntry
Here, we mock the `check_output` calls and check afterwards that the outputs are correct. Sorry for the code style, mocking this class
archey/test/entries/test_archey_packages.py:13
Class
TestProcesses
Test cases for the `Processes` (singleton) class. To work around the singleton, we reset the internal `_instances` dictionary. This way,
archey/test/test_archey_processes.py:16
Class
TestRAMEntry
Here, we mock the `check_output` call to `free` using all three levels of available ram. In the last test, mock with `/proc/meminfo` file ope
archey/test/entries/test_archey_ram.py:12
Class
TestShellEntry
For this entry, we'll just verify that the output is non-null.
archey/test/entries/test_archey_shell.py:12
Class
TestSingleton
Test cases for our `Singleton` meta-class
archey/test/test_archey_singleton.py:23
Class
TestTemperatureEntry
This module verifies Archey temperature detection
archey/test/entries/test_archey_temperature.py:15
Class
TestTerminalEntry
For this entry, we'll verify that the output contains what the environment is supposed to give, plus the right number of "colorized" charac
archey/test/entries/test_archey_terminal.py:11
Class
TestUptimeEntry
Test cases for `Uptime` entry module
archey/test/entries/test_archey_uptime.py:13
Class
TestUserEntry
For this entry, we'll simply mock `getpass.getuser` call. If internals happen to fail, `ImportError` might be raised.
archey/test/entries/test_archey_user.py:11
Class
TestUtility
Simple test cases to check the behavior of `Utility` singleton utility class. Values will be manually set in the tests below.
archey/test/test_archey_utility.py:8
Class
TestWanIPEntry
Here, we end up mocking calls to `dig` or `urlopen`.
archey/test/entries/test_archey_wan_ip.py:18
Class
TestWindowManagerEntry
Here, we mock the `check_output` call and check afterwards that the output is correct. We've to test the case where `wmctrl` is not ins
archey/test/entries/test_archey_window_manager.py:15
Class
Uptime
Returns a pretty-formatted string representing the host uptime
archey/entries/uptime.py:13
Class
Utility
Miscellaneous logic used in Archey internals
archey/utility.py:8
Class
WanIP
Uses different ways to retrieve the public IPv{4,6} addresses
archey/entries/wan_ip.py:13
Class
_SimpleEntry
A simple (sub-)class inheriting from `Entry` to use in testing.
archey/test/entries/__init__.py:101