diff --git a/README.MD b/README.MD index 5c28deb61189417020dd5c0c4841521099f36a6a..669536f67535266da200c69878e7757977b6b2bb 100644 --- a/README.MD +++ b/README.MD @@ -1,8 +1,70 @@ -# TMNG -This is a very simple flask based python-package. +# FLASK Dummy +This is a very simple [FLASK](https://flask.palletsprojects.com/en/3.0.x/) and [click](https://click.palletsprojects.com/en/8.1.x/) based python package. -## tmng.ini-Example +It enables you to: + +- run a simple web app +- run command line interface commands + +## Install and start + +It is recommended to install the package inside a virtual python environment. + +This could be initilized and activated in the following way: + +```bash +python3 -m venv venv/ --prompt "$(pwd | grep -o "[^/]*$")" +. venv/bin/activate +``` + +Then simply install the package: + +```bash +pip install -e . +``` + +*NOTE:* By adding `-e` to the installation, the package gets installed as an editable package and takes notice of changes! + +Now you have set up this basic flask based python package. In the `setup.py` are 2 basic entry points defined: + + +```python + entry_points={ + "console_scripts": [ + "project_code = project_code.cli:main", + "project_app = project_app.app:startup", + ] + }, +``` + +This means you are able to: + +### start the FLASK UI + +```bash +project_app ``` + +### run command line interface commands + +```bash +project_code +``` + + +## Configuration + +If you want to define configurations, you can save them in a `config.ini`. + +Just make sure to have this file in the same directory, where you have started the application from. + +This is an example for the currently definable configurations + +```INI +[main] +port=8083 + [log] level=DEBUG + ``` diff --git a/config.ini b/config.ini index f047388e05a424e90764f8edd996c4597fd95ecb..6e399248ec5b44730c30f5c3ee9a41b21181f84f 100644 --- a/config.ini +++ b/config.ini @@ -1,2 +1,5 @@ +[main] +port=8083 + [log] level=DEBUG