wikicrawl/lib/app_skellington/README.md

61 lines
2.1 KiB
Markdown

app_skellington
===============
Application framework for Python, features include:
* Pain-free multi-level command menu: Register classes
* Simple to define services and automatic dependency injection based on name (with custom invocation as an option)
* INI-style config and and validation (provided through ConfigObj)
* Colored logging (provided through colorlog)
* Works on Linux, Windows, and Mac
Principles:
* Lend to creating beautiful, easy to read and understand code in the application.
* Minimize coupling of applications to this framework.
* Compatable with Linux, Windows, and Mac. Try to be compatible as possible otherwise.
* Try to be compatible with alternate Python runtimes such as PyPy.
Application Configuration
-------------------------
Site configurations are supported through configobj. There is a config.spec
in the src directory which is a validation file; it contains the accepted
parameter names, types, and limits for configurable options in the
application which is built on app_skellington. The format is multi-level .ini syntax.
See the configobj documentation for more information.
Site configuration files (config.ini) are created if they don't exit. The
file always contains the full specification of parameters; i.e. even default
parameters are added into the config file.
Linux:
/home/\<user\>/.config/\<app_name\>/config.ini
/home/\<user\>/.cache/\<app_name\>/log/\<app_name\>.log
Windows:
C:\Users\\\<user>\\\<app_name\>\\Local\\\<app_name\>\\config.ini
C:\Users\\\<user>\\\<app_name\>\\Local\\\<app_name\>\\Logs\\\<app_name\>.log
Application configuration can be overridden ad-hoc through the --config <filename>
argument.
Debug - Turn on Logging
---------------------------
Set 'APPSKELLINGTON_ENABLE_LOGGING' environment variable to any value which turns
on AppSkellington-level logging. For example,
APPSKELLINGTON_ENABLE_LOGGING=true ./runme
or
export APPSKELLINGTON_ENABLE_LOGGING=1
./runme
Notes
-----
See official website: https://zavage-software.com
Please report bugs, improvements, or feedback! <contact>