pyra.definitions#

Contains classes with attributes to common definitions (paths and filenames).

class pyra.definitions.Files[source]#

Bases: object

Class representing common Files.

The purpose of this class is to ensure consistency when using these files.

CONFIGstr

The default config file name. i.e. config.ini.

Examples

>>> Files.CONFIG
'config.ini'
class pyra.definitions.Modes[source]#

Bases: object

Class representing runtime variables.

FROZENbool

True if running pyinstaller bundle version, otherwise False.

DOCKERbool

True if running Docker version, otherwise False.

SPLASHbool

True if capable of displaying a splash image on start, otherwise, False.

Examples

>>> Modes.FROZEN
False
class pyra.definitions.Names[source]#

Bases: object

Class representing common names.

The purpose of this class is to ensure consistency when using these names.

namestr

The application’s name. i.e. RetroArcher.

Examples

>>> Names.name
'RetroArcher'
class pyra.definitions.Paths[source]#

Bases: object

Class representing common Paths.

The purpose of this class is to ensure consistency when using these paths.

PYRA_DIRstr

The directory containing the retroarcher python files.

ROOT_DIRstr

The root directory of the application. This is where the source files exist.

DATA_DIRstr

The data directory of the application.

DOCS_DIRstr

The directory containing html documentation.

LOCALE_DIRstr

The directory containing localization files.

LOG_DIRstr

The directory containing log files.

Examples

>>> Paths.logs
'.../logs'
class pyra.definitions.Platform[source]#

Bases: object

Class representing the machine platform.

The purpose of this class is to ensure consistency when there is a need for platform specific functions.

bitsstr

Operating system bitness. e.g. 64.

operating_systemstr

Operating system name. e.g. ‘Windows’.

os_platformstr

Operating system platform. e.g. ‘win32’, ‘darwin’, ‘linux’.

machinestr

Machine architecture. e.g. ‘AMD64’.

nodestr

Machine name.

releasestr

Operating system release. e.g. ‘10’.

versionstr

Operating system version. e.g. ‘10.0.22000’.

editionstr

Windows edition. e.g. ‘Core’, None for non Windows platforms.

iotbool

True if Windows IOT, otherwise False.

Examples

>>> Platform.os_platform
...
Attributes:
edition