PyWSGIRef 1.1.4__tar.gz → 1.1.5__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.
- {pywsgiref-1.1.4/src/PyWSGIRef.egg-info → pywsgiref-1.1.5}/PKG-INFO +6 -1
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/README.md +5 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/pyproject.toml +1 -1
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef/__init__.py +3 -3
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef/beta.py +3 -1
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef/exceptions.py +16 -0
- pywsgiref-1.1.5/src/PyWSGIRef/finished.py +24 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef/loadContent.py +1 -1
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef/templateDict.py +2 -18
- {pywsgiref-1.1.4 → pywsgiref-1.1.5/src/PyWSGIRef.egg-info}/PKG-INFO +6 -1
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef.egg-info/SOURCES.txt +1 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/LICENSE +0 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/setup.cfg +0 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef/__main__.py +0 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef/commons.py +0 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef/defaults.py +0 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef/pyhtml.py +0 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef/simpleServer.py +0 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef.egg-info/dependency_links.txt +0 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef.egg-info/requires.txt +0 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/src/PyWSGIRef.egg-info/top_level.txt +0 -0
- {pywsgiref-1.1.4 → pywsgiref-1.1.5}/tests/testMainServer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyWSGIRef
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.5
|
|
4
4
|
Summary: easy server-setup
|
|
5
5
|
Author-email: Leander Kafemann <leander@kafemann.berlin>
|
|
6
6
|
Project-URL: Homepage, https://github.com/LeanderKafemann/PyWSGIRef
|
|
@@ -171,4 +171,9 @@ from PyWSGIRef import BETA
|
|
|
171
171
|
#enable beta mode
|
|
172
172
|
BETA.enable()
|
|
173
173
|
```
|
|
174
|
+
Currently to be tested are:<br/>
|
|
175
|
+
- PyHTML include static resource blocks<br/>
|
|
176
|
+
- PyHTML include default modern styling block<br/><br/>
|
|
177
|
+
|
|
178
|
+
Thanks a lot for helping improving PyWSGIRef!
|
|
174
179
|
### More coming soon
|
|
@@ -153,4 +153,9 @@ from PyWSGIRef import BETA
|
|
|
153
153
|
#enable beta mode
|
|
154
154
|
BETA.enable()
|
|
155
155
|
```
|
|
156
|
+
Currently to be tested are:<br/>
|
|
157
|
+
- PyHTML include static resource blocks<br/>
|
|
158
|
+
- PyHTML include default modern styling block<br/><br/>
|
|
159
|
+
|
|
160
|
+
Thanks a lot for helping improving PyWSGIRef!
|
|
156
161
|
### More coming soon
|
|
@@ -11,16 +11,16 @@ from .defaults import *
|
|
|
11
11
|
from .templateDict import TemplateDict, OneWayBoolean
|
|
12
12
|
from .beta import BETA
|
|
13
13
|
from .loadContent import *
|
|
14
|
+
from .finished import finished
|
|
14
15
|
|
|
15
16
|
def about():
|
|
16
17
|
"""
|
|
17
|
-
Returns information about your release and other projects by
|
|
18
|
+
Returns information about your release and other projects by Leander Kafemann
|
|
18
19
|
"""
|
|
19
|
-
return {"Version":(1, 1,
|
|
20
|
+
return {"Version":(1, 1, 5), "Author":"Leander Kafemann", "date":"10.06.2025",\
|
|
20
21
|
"recommend":("Büro by LK", "pyimager by LK"), "feedbackTo": "leander@kafemann.berlin"}
|
|
21
22
|
|
|
22
23
|
SCHABLONEN = TemplateDict()
|
|
23
|
-
finished = OneWayBoolean()
|
|
24
24
|
|
|
25
25
|
def addSchablone(name: str, content: str):
|
|
26
26
|
"""
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
BETA mode...
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
from .exceptions import BetaAlreadyEnabledError
|
|
6
|
+
|
|
5
7
|
class beta:
|
|
6
8
|
"""
|
|
7
9
|
BETA mode for PyWSGIRef.
|
|
@@ -18,7 +20,7 @@ class beta:
|
|
|
18
20
|
Enables BETA mode.
|
|
19
21
|
"""
|
|
20
22
|
if self._beta:
|
|
21
|
-
raise
|
|
23
|
+
raise BetaAlreadyEnabledError()
|
|
22
24
|
self._beta = True
|
|
23
25
|
|
|
24
26
|
BETA = beta()
|
|
@@ -44,5 +44,21 @@ class StaticResourceUsageOutsideHeadError(Exception):
|
|
|
44
44
|
Raised when a static resource is tried to include outside the head term of a PyHTML file.
|
|
45
45
|
"""
|
|
46
46
|
def __init__(self, message="Static resource usage out of <head> term detected."):
|
|
47
|
+
self.message = message
|
|
48
|
+
super().__init__(self.message)
|
|
49
|
+
|
|
50
|
+
class BooleanAlreadyTrueError(Exception):
|
|
51
|
+
"""
|
|
52
|
+
Raised when trying to set a boolean that is already True.
|
|
53
|
+
"""
|
|
54
|
+
def __init__(self, message="Boolean value is already True."):
|
|
55
|
+
self.message = message
|
|
56
|
+
super().__init__(self.message)#
|
|
57
|
+
|
|
58
|
+
class BetaAlreadyEnabledError(BooleanAlreadyTrueError):
|
|
59
|
+
"""
|
|
60
|
+
Raised when trying to enable beta mode that is already enabled.
|
|
61
|
+
"""
|
|
62
|
+
def __init__(self, message="Beta mode is already enabled."):
|
|
47
63
|
self.message = message
|
|
48
64
|
super().__init__(self.message)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Creates finished object to indicate if the server has been generated.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from .exceptions import BooleanAlreadyTrueError
|
|
6
|
+
|
|
7
|
+
class OneWayBoolean:
|
|
8
|
+
def __init__(self):
|
|
9
|
+
self._value = False
|
|
10
|
+
|
|
11
|
+
@property
|
|
12
|
+
def value(self) -> bool:
|
|
13
|
+
return self._value
|
|
14
|
+
|
|
15
|
+
def set_true(self):
|
|
16
|
+
"""
|
|
17
|
+
Setzt den Wert auf True, wenn er False ist.
|
|
18
|
+
"""
|
|
19
|
+
if not self._value:
|
|
20
|
+
self._value = True
|
|
21
|
+
else:
|
|
22
|
+
raise BooleanAlreadyTrueError()
|
|
23
|
+
|
|
24
|
+
finished = OneWayBoolean()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from .exceptions import ServerAlreadyGeneratedError
|
|
2
2
|
from .pyhtml import PyHTML
|
|
3
|
+
from .finished import OneWayBoolean
|
|
3
4
|
|
|
4
5
|
class TemplateDict:
|
|
5
6
|
def __init__(self):
|
|
@@ -31,21 +32,4 @@ class TemplateDict:
|
|
|
31
32
|
return list(self.dictionary.values())
|
|
32
33
|
|
|
33
34
|
def items(self) -> list:
|
|
34
|
-
return list(self.dictionary.items())
|
|
35
|
-
|
|
36
|
-
class OneWayBoolean:
|
|
37
|
-
def __init__(self):
|
|
38
|
-
self._value = False
|
|
39
|
-
|
|
40
|
-
@property
|
|
41
|
-
def value(self) -> bool:
|
|
42
|
-
return self._value
|
|
43
|
-
|
|
44
|
-
def set_true(self):
|
|
45
|
-
"""
|
|
46
|
-
Setzt den Wert auf True, wenn er False ist.
|
|
47
|
-
"""
|
|
48
|
-
if not self._value:
|
|
49
|
-
self._value = True
|
|
50
|
-
else:
|
|
51
|
-
raise ValueError("Value is already True, cannot set again.")
|
|
35
|
+
return list(self.dictionary.items())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyWSGIRef
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.5
|
|
4
4
|
Summary: easy server-setup
|
|
5
5
|
Author-email: Leander Kafemann <leander@kafemann.berlin>
|
|
6
6
|
Project-URL: Homepage, https://github.com/LeanderKafemann/PyWSGIRef
|
|
@@ -171,4 +171,9 @@ from PyWSGIRef import BETA
|
|
|
171
171
|
#enable beta mode
|
|
172
172
|
BETA.enable()
|
|
173
173
|
```
|
|
174
|
+
Currently to be tested are:<br/>
|
|
175
|
+
- PyHTML include static resource blocks<br/>
|
|
176
|
+
- PyHTML include default modern styling block<br/><br/>
|
|
177
|
+
|
|
178
|
+
Thanks a lot for helping improving PyWSGIRef!
|
|
174
179
|
### More coming soon
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|