@@ -18,12 +18,11 @@ def about():
1818 """
1919 Returns information about your release and other projects by Leander Kafemann
2020 """
21- return {"Version" : (1 , 1 , 14 ), "Author" : "Leander Kafemann" , "date" : "05.09.2025" ,\
21+ return {"Version" : (1 , 1 , 15 ), "Author" : "Leander Kafemann" , "date" : "05.09.2025" ,\
2222 "recommend" : (
"pyimager" ),
"feedbackTo" :
"[email protected] " }
2323
2424SCHABLONEN = TemplateDict ()
2525STATS = Stats ()
26- COUNT = 0
2726
2827def addSchablone (name : str , content : str ):
2928 """
@@ -35,15 +34,15 @@ def addSchablone(name: str, content: str):
3534 SCHABLONEN [name ] = PyHTML (content )
3635
3736def makeApplicationObject (contentGeneratingFunction : Callable , advanced : bool = False , setAdvancedHeaders : bool = False ,\
38- getIP : bool = False , vercelPythonHosting : bool = False , getStats : bool = True ) -> Callable :
37+ getIP : bool = False , vercelPythonHosting : bool = False , getStats : bool = False ) -> Callable :
3938 """
4039 Returns a WSGI application object based on your contentGeneratingFunction.
4140 The contentGeneratingFunction should take a single argument (the path) and return the content as a string.
4241 If advanced is True, the contentGeneratingFunction will receive a FieldStorage object as the second argument.
4342 If setAdvancedHeaders is True, it will allow you to set advanced headers for the response.
4443 If getIP is True, the contentGeneratingFunction will receive the IP address of the client as an additional argument.
4544 If vercelPythonHosting is True, your application object will be optimized for Vercel's unusual WSGI methods.
46- If getStats is True, stats are saved in the STATS object.
45+ If getStats is True, stats are saved in the STATS object (BETA) .
4746 Locks BETA mode.
4847 """
4948 if not callable (contentGeneratingFunction ):
@@ -56,8 +55,8 @@ def simpleApplication(environ, start_response) -> list:
5655 if getStats :
5756 if not BETA .value :
5857 raise BetaNotEnabledError ()
59- COUNT += 1
60- perfTime = STATS .startPerfTime ("applicationCallNr" + str (COUNT ))
58+ STATS . count . increase ()
59+ perfTime = STATS .startPerfTime ("applicationCallNr" + str (STATS . count . count ))
6160 type_ = "text/html"
6261 status = "200 OK"
6362 if advanced :
0 commit comments