PyWSGIRef 1.1.0__tar.gz → 1.1.1__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.0/src/PyWSGIRef.egg-info → pywsgiref-1.1.1}/PKG-INFO +18 -2
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/README.md +17 -1
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/pyproject.toml +1 -1
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/src/PyWSGIRef/__init__.py +1 -1
- pywsgiref-1.1.1/src/PyWSGIRef/commons.py +6 -0
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/src/PyWSGIRef/pyhtml.py +4 -0
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/src/PyWSGIRef/templateDict.py +4 -4
- {pywsgiref-1.1.0 → pywsgiref-1.1.1/src/PyWSGIRef.egg-info}/PKG-INFO +18 -2
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/src/PyWSGIRef.egg-info/SOURCES.txt +1 -0
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/LICENSE +0 -0
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/setup.cfg +0 -0
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/src/PyWSGIRef/__main__.py +0 -0
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/src/PyWSGIRef/defaults.py +0 -0
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/src/PyWSGIRef/exceptions.py +0 -0
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/src/PyWSGIRef.egg-info/dependency_links.txt +0 -0
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/src/PyWSGIRef.egg-info/requires.txt +0 -0
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/src/PyWSGIRef.egg-info/top_level.txt +0 -0
- {pywsgiref-1.1.0 → pywsgiref-1.1.1}/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.1
|
|
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
|
|
@@ -135,7 +135,23 @@ or (from a commandline)
|
|
|
135
135
|
py -m PyWSGIRef
|
|
136
136
|
```
|
|
137
137
|
### Decoding PyHTML
|
|
138
|
-
coming soon...
|
|
138
|
+
(more coming soon...)<br/>
|
|
139
|
+
PyWSGIRef provides a simple way to shorten a common HTML beginning phrase in PyHTML:
|
|
140
|
+
```python
|
|
141
|
+
from PyWSGIRef import PyHTML
|
|
142
|
+
|
|
143
|
+
# Shorten HTML beginning phrase
|
|
144
|
+
pyhtml_ = """<{{evalPyHTML}}>
|
|
145
|
+
<title>My Page</title>
|
|
146
|
+
</head>
|
|
147
|
+
<body>
|
|
148
|
+
<h1>Hello, World!</h1>
|
|
149
|
+
</body>
|
|
150
|
+
</html>"""
|
|
151
|
+
pyhtml = PyHTML(pyhtml_)
|
|
152
|
+
html = pyhtml.decoded()
|
|
153
|
+
```
|
|
154
|
+
, which is actually automatically done by PyWSGIRef.
|
|
139
155
|
### Others
|
|
140
156
|
Use the following to get information about your release and the author of the module:
|
|
141
157
|
```python
|
|
@@ -118,7 +118,23 @@ or (from a commandline)
|
|
|
118
118
|
py -m PyWSGIRef
|
|
119
119
|
```
|
|
120
120
|
### Decoding PyHTML
|
|
121
|
-
coming soon...
|
|
121
|
+
(more coming soon...)<br/>
|
|
122
|
+
PyWSGIRef provides a simple way to shorten a common HTML beginning phrase in PyHTML:
|
|
123
|
+
```python
|
|
124
|
+
from PyWSGIRef import PyHTML
|
|
125
|
+
|
|
126
|
+
# Shorten HTML beginning phrase
|
|
127
|
+
pyhtml_ = """<{{evalPyHTML}}>
|
|
128
|
+
<title>My Page</title>
|
|
129
|
+
</head>
|
|
130
|
+
<body>
|
|
131
|
+
<h1>Hello, World!</h1>
|
|
132
|
+
</body>
|
|
133
|
+
</html>"""
|
|
134
|
+
pyhtml = PyHTML(pyhtml_)
|
|
135
|
+
html = pyhtml.decoded()
|
|
136
|
+
```
|
|
137
|
+
, which is actually automatically done by PyWSGIRef.
|
|
122
138
|
### Others
|
|
123
139
|
Use the following to get information about your release and the author of the module:
|
|
124
140
|
```python
|
|
@@ -15,7 +15,7 @@ def about():
|
|
|
15
15
|
"""
|
|
16
16
|
Returns information about your release and other projects by LK
|
|
17
17
|
"""
|
|
18
|
-
return {"Version":(1, 1,
|
|
18
|
+
return {"Version":(1, 1, 1), "Author":"Leander Kafemann", "date":"08.06.2025",\
|
|
19
19
|
"recommend":("Büro by LK", "pyimager by LK"), "feedbackTo": "leander@kafemann.berlin"}
|
|
20
20
|
|
|
21
21
|
SCHABLONEN = TemplateDict()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from .defaults import HELLO_WORLD as DEFAULT
|
|
2
|
+
from .commons import *
|
|
2
3
|
|
|
3
4
|
class PyHTML:
|
|
4
5
|
def __init__(self, html: str = DEFAULT):
|
|
@@ -8,6 +9,9 @@ class PyHTML:
|
|
|
8
9
|
Decodes the HTML content.
|
|
9
10
|
"""
|
|
10
11
|
self.html = self.html.strip()
|
|
12
|
+
if self.html.startswith("<{{evalPyHTML}}>"):
|
|
13
|
+
self.html = START_REPLACE + self.html[16:]
|
|
14
|
+
|
|
11
15
|
def decoded(self) -> str:
|
|
12
16
|
"""
|
|
13
17
|
Returns the decoded HTML content.
|
|
@@ -35,17 +35,17 @@ class TemplateDict:
|
|
|
35
35
|
|
|
36
36
|
class OneWayBoolean:
|
|
37
37
|
def __init__(self):
|
|
38
|
-
self.
|
|
38
|
+
self._value = False
|
|
39
39
|
|
|
40
40
|
@property
|
|
41
41
|
def value(self) -> bool:
|
|
42
|
-
return self.
|
|
42
|
+
return self._value
|
|
43
43
|
|
|
44
44
|
def set_true(self):
|
|
45
45
|
"""
|
|
46
46
|
Setzt den Wert auf True, wenn er False ist.
|
|
47
47
|
"""
|
|
48
|
-
if not self.
|
|
49
|
-
self.
|
|
48
|
+
if not self._value:
|
|
49
|
+
self._value = True
|
|
50
50
|
else:
|
|
51
51
|
raise ValueError("Value is already True, cannot set again.")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyWSGIRef
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.1
|
|
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
|
|
@@ -135,7 +135,23 @@ or (from a commandline)
|
|
|
135
135
|
py -m PyWSGIRef
|
|
136
136
|
```
|
|
137
137
|
### Decoding PyHTML
|
|
138
|
-
coming soon...
|
|
138
|
+
(more coming soon...)<br/>
|
|
139
|
+
PyWSGIRef provides a simple way to shorten a common HTML beginning phrase in PyHTML:
|
|
140
|
+
```python
|
|
141
|
+
from PyWSGIRef import PyHTML
|
|
142
|
+
|
|
143
|
+
# Shorten HTML beginning phrase
|
|
144
|
+
pyhtml_ = """<{{evalPyHTML}}>
|
|
145
|
+
<title>My Page</title>
|
|
146
|
+
</head>
|
|
147
|
+
<body>
|
|
148
|
+
<h1>Hello, World!</h1>
|
|
149
|
+
</body>
|
|
150
|
+
</html>"""
|
|
151
|
+
pyhtml = PyHTML(pyhtml_)
|
|
152
|
+
html = pyhtml.decoded()
|
|
153
|
+
```
|
|
154
|
+
, which is actually automatically done by PyWSGIRef.
|
|
139
155
|
### Others
|
|
140
156
|
Use the following to get information about your release and the author of the module:
|
|
141
157
|
```python
|
|
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
|