From e960ceb1ddbca0b0f493e309c6518ffb6805a136 Mon Sep 17 00:00:00 2001 From: Adam Skotarczak Date: Fri, 25 Apr 2025 13:47:44 +0200 Subject: [PATCH] workflow --- LICENSE | 23 +++++++++++++++++++++++ README.md | 30 +++++++++++++++++++++--------- VERSION | 2 +- app/routes.py | 0 app/templates/config.html | 0 app/templates/index.html | 0 6 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 LICENSE create mode 100644 app/routes.py create mode 100644 app/templates/config.html create mode 100644 app/templates/index.html diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1989462 --- /dev/null +++ b/LICENSE @@ -0,0 +1,23 @@ +MIT License with Attribution Requirement + +Copyright (c) 2025 Adam Skotarczak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, subject to the following conditions: + +1. The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +2. **Attribution Requirement**: Any public use or distribution of this Software, +modified or unmodified, must include a clear and visible attribution to the original author: + +**Adam Skotarczak ** + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 1749054..bfa9298 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ -# Python Bootstrap-Flask-Template mit `.venv`- und `.env` Support +# Python Bootstrap-Flask-Template mit LOGGING - `.venv`- und `.env` Support ![Logo](./media/logo.png) > ⚙️ Dieses Projekt verwendet [Git Subtree](SUBTREE.md) zur Integration des Basis-Templates. Details siehe [`SUBTREE.md`](SUBTREE.md). +> **DIESES DOKUMENT BEFINDET SICH IN DER ENTWICKLUNG UND IST UNVOLLSTÄNDIG UND FALSCH** + Dieses Template nutzt PEP 8, Type Hints, Docstrings und einen vordefinierten Workspace für sauberen Python-Code. Außerdem bietet es ein portables Start-Template für Python-Anwendungen mit folgenden Features: @@ -14,6 +16,7 @@ Außerdem bietet es ein portables Start-Template für Python-Anwendungen mit fol - Sauberer Einstiegspunkt über `run.py` - Keine systemweiten Python-Pakete notwendig - Logging-Utils bereits integriert +- Flask integration und Template Management Das Template ist durchdacht, pragmatisch und stark auf Entwicklerkomfort ausgelegt. Es bietet eine sehr gute Grundlage für Projekte aller Art – insbesondere CLI-Tools, kleine Services und lokale Anwendungen. Die automatische Einrichtung der virtuellen Umgebung hebt es funktional deutlich von Standard-Vorlagen ab. @@ -23,17 +26,20 @@ Es bietet eine sehr gute Grundlage für Projekte aller Art – insbesondere CLI- - [ ] [pep-518](https://peps.python.org/pep-0518/)-konform 🚫 > ⚠️ Dieses Template verfolgt kein komplexes Build-System. -Es ist dafür gedacht, dir in Sekunden eine saubere, gekapselte Python-Umgebung bereitzustellen – perfekt zum schnellen Testen, Debuggen oder Projektstart. -Einfach deinen Code in main.py werfen, bei Bedarf requirements.txt anpassen, run.py starten – fertig. Kein Setup-Wahnsinn, kein Overhead. +Es ist dafür gedacht, dir in Sekunden eine saubere, gekapselte Python-Umgebung bereitzustellen – perfekt zum schnellen Testen, Debuggen oder Projektstart. Insbesondere für Webapps mit Flask und Visualisierung. + +- [x] Einfach deinen Code in main.py werfen, bei Bedarf `requirements.txt` anpassen, `run.py` starten, Flask konfigurieren [PLATZHALTER] und – fertig. Kein Setup-Wahnsinn, kein Overhead! --- -## 🔜 Inhalt der Readme +## 📑 Inhalt der Readme -- [Python Bootstrap-Flask-Template mit `.venv`- und `.env` Support](#python-bootstrap-flask-template-mit-venv--und-env-support) - - [🔜 Inhalt der Readme](#-inhalt-der-readme) - - [🔧 Projektstruktur](#-projektstruktur) +- [Python Bootstrap-Flask-Template mit LOGGING - `.venv`- und `.env` Support](#python-bootstrap-flask-template-mit-logging---venv--und-env-support) + - [📑 Inhalt der Readme](#-inhalt-der-readme) + - [🔧 Projektstruktur \[IN BEARBEITUNG\]](#-projektstruktur-in-bearbeitung) - [🚀 Erste Schritte](#-erste-schritte) + - [Flask Server konfigurieren](#flask-server-konfigurieren) + - [Der erste Start](#der-erste-start) - [Beim ersten Start passiert:](#beim-ersten-start-passiert) - [📦 Abhängigkeiten](#-abhängigkeiten) - [⚙️ .env-Datei (optional)](#️-env-datei-optional) @@ -50,7 +56,7 @@ Einfach deinen Code in main.py werfen, bei Bedarf requirements.txt anpassen, run --- -## 🔧 Projektstruktur +## 🔧 Projektstruktur [IN BEARBEITUNG] ```plaintext @@ -86,6 +92,10 @@ Einfach deinen Code in main.py werfen, bei Bedarf requirements.txt anpassen, run - [ ] `requirements.txt` auf deine Bedürfnisse anpassen. - [ ] `media/`Verzeichnis Löschen falls vorhanden. +### Flask Server konfigurieren + +### Der erste Start + **Erster Start des Templates:** ```bash @@ -98,7 +108,8 @@ python run.py 2. `requirements.txt` wird installiert 3. Das Skript wird automatisch innerhalb der venv neu gestartet 4. `.env` wird geladen (falls vorhanden) -5. **Die App startet 🚀** +5. Flask Server startet +6. **Die App startet 🚀** > Es erfolgen einige Ausgaben, die alle aus der `main.py` stammen, außer du `DEBUG` in der `.env` aktiviert hast. @@ -112,6 +123,7 @@ Alle Abhängigkeiten werden aus `requirements.txt` installiert. **Beispiel:** ```text +flask python-dotenv ``` diff --git a/VERSION b/VERSION index 7dea76e..0ea3a94 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.1 +0.2.0 diff --git a/app/routes.py b/app/routes.py new file mode 100644 index 0000000..e69de29 diff --git a/app/templates/config.html b/app/templates/config.html new file mode 100644 index 0000000..e69de29 diff --git a/app/templates/index.html b/app/templates/index.html new file mode 100644 index 0000000..e69de29