app_skellington/README.md

76 lines
2.7 KiB
Markdown
Raw Normal View History

2020-03-01 21:08:11 -07:00
app_skellington
===============
Application framework for Python, features include:
2020-07-19 01:54:54 -06:00
- Pain-free multi-level command menu: Expose public class methods as commands available to user.
- Simple to define services and automatic dependency injection based on name (with custom invocation as an option). \*WIP
- INI-style config and and validation (provided through ConfigObj).
- Colored logging (provided through colorlog)
- Works on Linux, Windows, and Mac.
2020-03-01 21:08:11 -07:00
Principles:
2020-07-19 01:54:54 -06:00
- 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 and older python environments. \*WIP
2020-03-01 21:08:11 -07:00
Application Configuration
-------------------------
Site configurations are supported through ConfigObj. There is a config.spec
2020-03-01 21:08:11 -07:00
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.
Reference the ConfigObj documentation for config.ini and config.spec
format. See:
2020-03-01 21:08:11 -07:00
2020-07-19 01:54:54 -06:00
- https://configobj.readthedocs.io/en/latest/configobj.html#the-config-file-format
- https://configobj.readthedocs.io/en/latest/configobj.html#validation
Config files (config.ini) are created if they don't exist. The
2020-03-01 21:08:11 -07:00
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:
2020-07-19 01:54:54 -06:00
C:\\Users\\\<user>\\\<app_name\>\\Local\\\<app_name\>\\config.ini
2020-03-01 21:08:11 -07:00
2020-07-19 01:54:54 -06:00
C:\\Users\\\<user>\\\<app_name\>\\Local\\\<app_name\>\\Logs\\\<app_name\>.log
2020-03-01 21:08:11 -07:00
Application configuration can be overridden ad-hoc through the --config <filename>
argument.
Debug - Turn on Logging
-----------------------
2020-03-01 21:08:11 -07:00
Set 'APPSKELLINGTON_ENABLE_LOGGING' environment variable to any value which turns
on AppSkellington-level logging. For example,
2020-07-19 01:54:54 -06:00
APPSKELLINGTON_DEBUG=1 <executable>
2020-03-01 21:08:11 -07:00
or
2020-07-19 01:54:54 -06:00
export APPSKELLINGTON_DEBUG=1
2020-03-01 21:08:11 -07:00
<executable>
Tests
-----
Tests are a WIP. Recommendation is to run 'pytest' in the 'tests' directory.
2020-07-19 03:11:04 -06:00
License
-------
I'm releasing this software under one of the most permissive
licenses, the MIT software license. This applies to this source repository
2022-03-07 12:05:38 -07:00
and all files within it. Alternatively, you are permitted you
to use any of this under the GPL to the fullest legal extent allowed.
2020-07-19 03:11:04 -06:00
2020-03-01 21:08:11 -07:00
Notes
-----
See official website: https://zavage-software.com
2020-07-19 01:54:54 -06:00
Please report bugs, improvements, or feedback!
2020-03-01 21:08:11 -07:00