pyweber 1.2.0.dev20260427__tar.gz → 1.2.0.dev20260428__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.
- {pyweber-1.2.0.dev20260427/pyweber.egg-info → pyweber-1.2.0.dev20260428}/PKG-INFO +1 -1
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyproject.toml +1 -1
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/request.py +1 -1
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/run.py +7 -7
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428/pyweber.egg-info}/PKG-INFO +1 -1
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/LICENSE +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/MANIFEST.in +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/README.md +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/__init__.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/admin/index.html +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/admin/src/script.js +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/admin/src/style.css +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/cli/__init__.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/cli/commands.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/components/__init__.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/components/form.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/components/general.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/components/input.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/config/__init__.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/config/config.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/connection/__init__.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/connection/http.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/connection/reload.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/connection/selector.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/connection/session.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/connection/websocket.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/core/__init__.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/core/element.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/core/events.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/core/template.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/core/window.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/__init__.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/cookies.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/create_app.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/element.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/error_pages.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/field.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/field_storage.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/file.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/file_stream.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/headers.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/middleware.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/openapi.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/response.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/routes.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/strem_stats.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/task_manager.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/template_diff.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/models/ws_message.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/pyweber/__init__.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/pyweber/pyweber.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/.gitignore +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/config.toml +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/css.css +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/docs.html +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/android-chrome-192x192.png +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/android-chrome-512x512.png +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/apple-touch-icon.png +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/favicon-16x16.png +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/favicon-32x32.png +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/favicon.ico +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/pyweber.png +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/site.webmanifest +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/handlers.js +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/html.html +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/html401.html +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/html404.html +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/html500.html +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/js.js +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/loading.html +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/main.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/pyweber.css +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/update.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/utils/__init__.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/utils/exceptions.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/utils/loads.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/utils/types.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/utils/utils.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber.egg-info/SOURCES.txt +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber.egg-info/dependency_links.txt +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber.egg-info/entry_points.txt +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber.egg-info/requires.txt +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber.egg-info/top_level.txt +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/setup.cfg +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/tests/test_config.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/tests/test_cookies.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/tests/test_response.py +0 -0
- {pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/tests/test_template_diff.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pyweber"
|
|
7
|
-
version = "1.2.0.
|
|
7
|
+
version = "1.2.0.dev20260428"
|
|
8
8
|
description = "A lightweight Python framework for building and managing web applications."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "DevPythonMZ", email = "pypi.dev@gmail.com" }]
|
|
@@ -126,7 +126,7 @@ class Request: # pragma: no cover
|
|
|
126
126
|
|
|
127
127
|
@property
|
|
128
128
|
def cookies(self):
|
|
129
|
-
return {cookie.split('=')[0]: cookie.split('=')[-1] for cookie in self.headers.get('cookie', '').split(';') if cookie}
|
|
129
|
+
return {cookie.split('=')[0].strip(): cookie.split('=')[-1].strip() for cookie in self.headers.get('cookie', '').split(';') if cookie}
|
|
130
130
|
|
|
131
131
|
@property
|
|
132
132
|
def accept_control_request_headers(self):
|
|
@@ -48,7 +48,7 @@ def run(
|
|
|
48
48
|
@route('/')
|
|
49
49
|
def home():
|
|
50
50
|
return pw.Template(template='Hello, world')
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
if __name__ == '__main__':
|
|
53
53
|
app.run()
|
|
54
54
|
```
|
|
@@ -94,7 +94,7 @@ def encode_header(headers: dict[str, Any], /,*ignore_headers: str):
|
|
|
94
94
|
|
|
95
95
|
if header not in set(map(lambda el: el.strip().lower(), ignore_headers)):
|
|
96
96
|
byte_headers.append((header.encode(), str(value).encode()))
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
return byte_headers
|
|
99
99
|
|
|
100
100
|
async def run_as_asgi(scope, receive, send, app: 'Pyweber', target: Callable = None): # pragma: no cover
|
|
@@ -108,7 +108,7 @@ async def run_as_asgi(scope, receive, send, app: 'Pyweber', target: Callable = N
|
|
|
108
108
|
message = await receive()
|
|
109
109
|
body += message.get("body", b"")
|
|
110
110
|
more_body = message.get("more_body", False)
|
|
111
|
-
|
|
111
|
+
|
|
112
112
|
client_info = scope.get('client', (None, 0))
|
|
113
113
|
request = Request(
|
|
114
114
|
headers=scope,
|
|
@@ -118,7 +118,7 @@ async def run_as_asgi(scope, receive, send, app: 'Pyweber', target: Callable = N
|
|
|
118
118
|
port=client_info[-1]
|
|
119
119
|
)
|
|
120
120
|
)
|
|
121
|
-
|
|
121
|
+
|
|
122
122
|
ws_server.protocol = 'uvicorn'
|
|
123
123
|
|
|
124
124
|
if not WS_RUNNING:
|
|
@@ -126,7 +126,7 @@ async def run_as_asgi(scope, receive, send, app: 'Pyweber', target: Callable = N
|
|
|
126
126
|
|
|
127
127
|
ws_server.app = app
|
|
128
128
|
app.ws_server = ws_server
|
|
129
|
-
|
|
129
|
+
|
|
130
130
|
if target and callable(target):
|
|
131
131
|
target(app)
|
|
132
132
|
|
|
@@ -143,7 +143,7 @@ async def run_as_asgi(scope, receive, send, app: 'Pyweber', target: Callable = N
|
|
|
143
143
|
headers = encode_header(response['headers'], 'set-cookie', 'code')
|
|
144
144
|
|
|
145
145
|
if app.cookies:
|
|
146
|
-
for cookie in app.cookies:
|
|
146
|
+
for cookie in app.cookies.values():
|
|
147
147
|
headers.append((b'set-cookie', cookie.encode()))
|
|
148
148
|
|
|
149
149
|
await send({
|
|
@@ -155,4 +155,4 @@ async def run_as_asgi(scope, receive, send, app: 'Pyweber', target: Callable = N
|
|
|
155
155
|
await send({
|
|
156
156
|
'type': 'http.response.body',
|
|
157
157
|
'body': response.response_content
|
|
158
|
-
})
|
|
158
|
+
})
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/apple-touch-icon.png
RENAMED
|
File without changes
|
{pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/favicon-16x16.png
RENAMED
|
File without changes
|
{pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/favicon-32x32.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber/static/favicon/site.webmanifest
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyweber-1.2.0.dev20260427 → pyweber-1.2.0.dev20260428}/pyweber.egg-info/dependency_links.txt
RENAMED
|
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
|