peastb 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- peastb-0.1.0/LICENSE.txt +15 -0
- peastb-0.1.0/PKG-INFO +37 -0
- peastb-0.1.0/README.md +16 -0
- peastb-0.1.0/peastb/__init__.py +0 -0
- peastb-0.1.0/peastb/pea01_main.py +33 -0
- peastb-0.1.0/peastb/pea02_package_check.py +25 -0
- peastb-0.1.0/peastb/pea03_analyzer.py +66 -0
- peastb-0.1.0/peastb/umgebungsanalyse_01.py +26 -0
- peastb-0.1.0/pyproject.toml +51 -0
peastb-0.1.0/LICENSE.txt
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
Copyright (c) 2026 Markus Breuer
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files,
|
|
5
|
+
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,
|
|
6
|
+
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
7
|
+
subject to the following conditions:
|
|
8
|
+
|
|
9
|
+
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or
|
|
10
|
+
substantial portions of the Software.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
13
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
|
14
|
+
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
|
|
15
|
+
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
peastb-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: peastb
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: PeaSTB - Python Environment Analyzer
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE.txt
|
|
7
|
+
Keywords: python environment,analyzer
|
|
8
|
+
Author: Markus Breuer
|
|
9
|
+
Author-email: markus.breuer@berufskolleg-aachen.de
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Requires-Dist: colorama (>=0.4.0,<0.5.0)
|
|
18
|
+
Requires-Dist: toml (==0.10.2)
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# PeaSTB - Python Environment Analyzer
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Documentation
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Version
|
|
31
|
+
|
|
32
|
+
V 0.1.0
|
|
33
|
+
|
|
34
|
+
## License
|
|
35
|
+
|
|
36
|
+
[MIT](LICENSE.txt) © [Markus Breuer].
|
|
37
|
+
|
peastb-0.1.0/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
""" pea01_main.py - CLI-Interface for Python Environment Analyzer (PeaSTB)
|
|
2
|
+
Name, Organisaion: Markus Breuer, STMB
|
|
3
|
+
Erstellt, Letzte Änderung: 30.06.2026
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
import argparse
|
|
9
|
+
import pea03_analyzer as analyzer
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def main():
|
|
13
|
+
parser = argparse.ArgumentParser(description="PeaSTB - Python Environment Analyzer")
|
|
14
|
+
parser.add_argument(
|
|
15
|
+
"--version",
|
|
16
|
+
action="store_true",
|
|
17
|
+
help="Shows the current version fo the Python Environment Analyzer."
|
|
18
|
+
)
|
|
19
|
+
parser.add_argument(
|
|
20
|
+
"--analyze",
|
|
21
|
+
action="store_true",
|
|
22
|
+
help="Analyzes the Python Environment."
|
|
23
|
+
)
|
|
24
|
+
args = parser.parse_args()
|
|
25
|
+
|
|
26
|
+
if args.version:
|
|
27
|
+
print(f"Version: 0.1.0")
|
|
28
|
+
elif args.analyze:
|
|
29
|
+
analyzer.analayze_environment()
|
|
30
|
+
sys.exit(0)
|
|
31
|
+
|
|
32
|
+
if __name__ == "__main__":
|
|
33
|
+
main()
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
import colorama as cr
|
|
3
|
+
|
|
4
|
+
cr.init(autoreset=True)
|
|
5
|
+
|
|
6
|
+
print("Paketliste definieren")
|
|
7
|
+
paket_liste = ["black","flake8","autopep8","pylint","pytest",
|
|
8
|
+
"psutil","pythonping",
|
|
9
|
+
"mysql.connector","questdb",
|
|
10
|
+
"customtkinter","CTkMessagebox",
|
|
11
|
+
"matplotlib","pandas","numpy",
|
|
12
|
+
"paho.mqtt",
|
|
13
|
+
"sim_schnittstelle.simulator",
|
|
14
|
+
"colorama","pipdeptree"
|
|
15
|
+
]
|
|
16
|
+
print("")
|
|
17
|
+
|
|
18
|
+
print("Test, ob sich Pakete importieren lassen...")
|
|
19
|
+
for paket in paket_liste:
|
|
20
|
+
try:
|
|
21
|
+
importlib.import_module(paket)
|
|
22
|
+
print( cr.Fore.GREEN + f"Paket {paket} erfolgreich importiert.")
|
|
23
|
+
except:
|
|
24
|
+
print( cr.Fore.RED + f"Paket {paket} konnte nicht importiert werden.")
|
|
25
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
""" pea03_analyzer.py - Analyzer for Python Environment - Analyzer (PeaSTB)
|
|
2
|
+
Name, Organisaion: Markus Breuer, STMB
|
|
3
|
+
Erstellt, Letzte Änderung: 30.06.2026
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import platform
|
|
7
|
+
import sys
|
|
8
|
+
import shutil
|
|
9
|
+
import subprocess
|
|
10
|
+
import argparse
|
|
11
|
+
|
|
12
|
+
def get_cmd_output(cmd):
|
|
13
|
+
try:
|
|
14
|
+
result = subprocess.run(
|
|
15
|
+
cmd,
|
|
16
|
+
stdout=subprocess.PIPE,
|
|
17
|
+
stderr=subprocess.STDOUT,
|
|
18
|
+
text=True
|
|
19
|
+
)
|
|
20
|
+
return result.stdout.strip()
|
|
21
|
+
except Exception as e:
|
|
22
|
+
return f"Fehler beim Ausführen von {' '.join(cmd)}: {e}"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def find_executable(name):
|
|
26
|
+
path = shutil.which(name)
|
|
27
|
+
return path if path else "Nicht gefunden"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def analayze_environment():
|
|
31
|
+
print("=== Betriebssystem ===")
|
|
32
|
+
print(f"System: {platform.system()}")
|
|
33
|
+
print(f"Release: {platform.release()}")
|
|
34
|
+
print(f"Version: {platform.version()}")
|
|
35
|
+
print(f"Arch: {platform.machine()}")
|
|
36
|
+
|
|
37
|
+
print("\n=== Python ===")
|
|
38
|
+
python_path = sys.executable
|
|
39
|
+
print(f"Pfad: {python_path}")
|
|
40
|
+
print(f"Version: {platform.python_version()}")
|
|
41
|
+
|
|
42
|
+
print("\n=== Pip ===")
|
|
43
|
+
pip_path = find_executable("pip")
|
|
44
|
+
pip3_path = find_executable("pip3")
|
|
45
|
+
|
|
46
|
+
print(f"pip Pfad: {pip_path}")
|
|
47
|
+
print(f"pip3 Pfad: {pip3_path}")
|
|
48
|
+
|
|
49
|
+
# Versionen ermitteln
|
|
50
|
+
print("\n=== Versionen ===")
|
|
51
|
+
print("python --version:")
|
|
52
|
+
print(get_cmd_output([sys.executable, "--version"]))
|
|
53
|
+
|
|
54
|
+
print("\npip --version:")
|
|
55
|
+
if pip_path != "Nicht gefunden":
|
|
56
|
+
print(get_cmd_output([pip_path, "--version"]))
|
|
57
|
+
else:
|
|
58
|
+
print("pip nicht gefunden")
|
|
59
|
+
|
|
60
|
+
print("\npip3 --version:")
|
|
61
|
+
if pip3_path != "Nicht gefunden":
|
|
62
|
+
print(get_cmd_output([pip3_path, "--version"]))
|
|
63
|
+
else:
|
|
64
|
+
print("pip3 nicht gefunden")
|
|
65
|
+
|
|
66
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import platform
|
|
3
|
+
import shutil
|
|
4
|
+
import subprocess
|
|
5
|
+
|
|
6
|
+
# === Datenbeschaffung ===
|
|
7
|
+
python_path = sys.executable
|
|
8
|
+
python_path_found = shutil.which("python")
|
|
9
|
+
python_version = platform.python_version()
|
|
10
|
+
|
|
11
|
+
pip_path = shutil.which("pip")
|
|
12
|
+
pip_version = subprocess.run(
|
|
13
|
+
["pip", "--version"], capture_output=True, text=True
|
|
14
|
+
).stdout.strip()
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# === Ausgabe ===
|
|
18
|
+
print("=== Python ===")
|
|
19
|
+
print("Aktueller Interpreter:", python_path)
|
|
20
|
+
print("Gefunden im PATH:", python_path_found)
|
|
21
|
+
print("Version:", python_version)
|
|
22
|
+
|
|
23
|
+
print("\n=== pip ===")
|
|
24
|
+
print("Pfad:", pip_path)
|
|
25
|
+
print("Version:", pip_version)
|
|
26
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# General Project Configuration ######################################################################
|
|
2
|
+
|
|
3
|
+
[project]
|
|
4
|
+
name = "peastb"
|
|
5
|
+
version = "0.1.0"
|
|
6
|
+
description = "PeaSTB - Python Environment Analyzer"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
authors = [ {name ="Markus Breuer", email="markus.breuer@berufskolleg-aachen.de"}]
|
|
11
|
+
keywords = [ "python environment", "analyzer" ]
|
|
12
|
+
package-mode = true
|
|
13
|
+
|
|
14
|
+
dependencies = [
|
|
15
|
+
"colorama (>=0.4.0,<0.5.0)",
|
|
16
|
+
"toml (>=0.10.2,<=0.10.2)"
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# Poetry Einstellungen ######################################################################
|
|
21
|
+
|
|
22
|
+
[project.scripts]
|
|
23
|
+
peastb = "pea01_main:main"
|
|
24
|
+
|
|
25
|
+
[tool.poetry]
|
|
26
|
+
packages = [
|
|
27
|
+
{ include = "*", from = "peastb" }
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
# Entwicklungsabhängigkeiten ######################################################################
|
|
31
|
+
|
|
32
|
+
[tool.poetry.dependencies]
|
|
33
|
+
python = ">=3.10,<4.0.0"
|
|
34
|
+
|
|
35
|
+
[tool.poetry.group.dev.dependencies]
|
|
36
|
+
pytest =">=9.0.2,<10.0.0"
|
|
37
|
+
black = ">=26.1.0,<27.0.0"
|
|
38
|
+
flake8 = ">=7.3.0,<8.0.0"
|
|
39
|
+
pylint = ">=4.0.5,<5.0.0"
|
|
40
|
+
|
|
41
|
+
# Build Einstellungen #################################################################################
|
|
42
|
+
|
|
43
|
+
[build-system]
|
|
44
|
+
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
|
45
|
+
build-backend = "poetry.core.masonry.api"
|
|
46
|
+
|
|
47
|
+
# Werkzeug Einstellungen #################################################################################
|
|
48
|
+
|
|
49
|
+
[tool.pytest.ini_options]
|
|
50
|
+
testpaths = ["tests"]
|
|
51
|
+
python_files = ["test_*.py"]
|