# 3. Top Level Howdy API¶

This document describes the top level API, which defines the location of the Plex user configuration directory in a variable, baseConfDir = ~/.config/howdy, and the resources directory in which universal resources (such as icons, fonts, style sheets, and settings for Google OAuth2 authentication) live.

howdy.baseConfDir = '/home/docs/.config/howdy'

the directory where Howdy user data is stored – ~/.config/howdy.

howdy.resourceDir = '/home/docs/checkouts/readthedocs.org/user_builds/howdy/checkouts/latest/howdy/resources'

the directory where Howdy stores its resources.

howdy.signal_handler(signal, frame)

This is a convenience method that kills a Python execution when Ctrl+C is pressed. Its usage is fairly straightforward, shown in the code block below.

import signal
signal.signal( signal.SIGINT, howdy.signal_handler )


This block of code at the top of the executable will capture Ctrl+C and then hard kill the executable by invoking sys.exit( 0 ).

Parameters: signal (dict) – the POSIX signal to capture. See the Python 3 signal high level overview to begin to understand what POSIX signals are, and how Python can expose functionality to interact with them. frame – the stack frame. I don’t know what it is, or why it’s necessary in this context, when trying to capture a Ctrl+C and cleanly exit. It is of type frame.