Go to file
2024-11-15 19:44:11 -07:00
app_skellington refactor: ran black and isort 2024-08-02 05:00:42 -06:00
tests refactor: ran black and isort 2024-08-02 05:00:42 -06:00
.flake8 build: poetry, flake8, pre-commit, black, isort incl. in install 2024-08-02 04:57:01 -06:00
.gitignore build: gitignore idea folder 2024-08-02 04:57:19 -06:00
.pre-commit-config.yaml refactor: ran black and isort 2024-08-02 05:00:42 -06:00
.python-version build: poetry, flake8, pre-commit, black, isort incl. in install 2024-08-02 04:57:01 -06:00
LICENSE.txt feat: switched license to MIT no attribution 2024-11-15 19:44:11 -07:00
MANIFEST.in preparing for pypi release 2020-07-19 00:18:00 -06:00
poetry.lock build: poetry, flake8, pre-commit, black, isort incl. in install 2024-08-02 04:57:01 -06:00
pyproject.toml build: poetry, flake8, pre-commit, black, isort incl. in install 2024-08-02 04:57:01 -06:00
README.md feat: switched license to MIT no attribution 2024-11-15 19:44:11 -07:00
setup.cfg preparing for pypi release 2020-07-19 00:18:00 -06:00
setup.py refactor: ran black and isort 2024-08-02 05:00:42 -06:00

app_skellington

Application framework for Python, features include:

  • 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.

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 and older python environments. *WIP

PyPi Hosted Link

https://pypi.org/project/app-skellington/

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.

Reference the ConfigObj documentation for config.ini and config.spec format. See:

Config files (config.ini) are created if they don't exist. 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 argument.

Debug - Turn on Logging

Set 'APPSKELLINGTON_ENABLE_LOGGING' environment variable to any value which turns on AppSkellington-level logging. For example,

APPSKELLINGTON_DEBUG=1 <executable>

or

export APPSKELLINGTON_DEBUG=1
<executable>

Tests

Tests are a WIP. Recommendation is to run 'pytest' in the 'tests' directory.

Development

Clone the repo:

git clone https://git-mirror.zavage.net/zavage-software/app_skellington.git

Verify your desired python environment.

Poetry install to install dependencies and the program in your desired python environment

poetry install
# verify no errors

Install pre-commit hooks:

pre-commit install

Begin development.

License

MIT no attribution required - https://opensource.org/license/mit-0

  • Allows commercial use.
  • Allows modifications and closed-source derivatives.
  • Fully interoperable with nearly all other open-source licenses, including GPL (when combined properly).

See Also