tina4-python 0.2.170__tar.gz → 0.2.172__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.
- {tina4_python-0.2.170 → tina4_python-0.2.172}/PKG-INFO +1 -1
- {tina4_python-0.2.170 → tina4_python-0.2.172}/pyproject.toml +65 -65
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Database.py +16 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Router.py +3 -3
- {tina4_python-0.2.170 → tina4_python-0.2.172}/.gitignore +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/README.md +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Api.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Auth.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/CRUD.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Constant.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/DatabaseResult.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/DatabaseTypes.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Debug.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Env.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/FieldTypes.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/HtmlElement.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Localization.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Messages.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/MiddleWare.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Migration.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/ORM.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Queue.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Request.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Response.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Session.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/ShellColors.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Swagger.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Template.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Testing.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/WSDL.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Webserver.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/Websocket.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/__init__.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/cli.py +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/messages.pot +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/css/readme.md +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/favicon.ico +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/images/403.png +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/images/404.png +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/images/500.png +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/images/logo.png +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/images/readme.md +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/js/readme.md +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/js/reconnecting-websocket.js +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/js/tina4helper.js +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/swagger/index.html +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/swagger/oauth2-redirect.html +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/templates/components/crud.twig +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/templates/errors/403.twig +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/templates/errors/404.twig +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/templates/errors/500.twig +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/templates/readme.md +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/translations/en/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/translations/en/LC_MESSAGES/messages.po +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/translations/fr/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/translations/fr/LC_MESSAGES/messages.po +0 -0
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "tina4-python"
|
|
3
|
-
version = "0.2.
|
|
4
|
-
description = "Tina4Python - This is not another framework for Python"
|
|
5
|
-
authors = [
|
|
6
|
-
{name = "Andre van Zuydam",email = "andrevanzuydam@gmail.com"}
|
|
7
|
-
]
|
|
8
|
-
readme = "README.md"
|
|
9
|
-
requires-python = ">=3.12,<4.0"
|
|
10
|
-
dependencies = [
|
|
11
|
-
"jinja2>=3.1.5,<4.0.0",
|
|
12
|
-
"libsass (>=0.23.0,<0.24.0)",
|
|
13
|
-
"python-dotenv (>=1.0.1,<2.0.0)",
|
|
14
|
-
"pyjwt (>=2.10.1,<3.0.0)",
|
|
15
|
-
"cryptography (>=44.0.0,<45.0.0)",
|
|
16
|
-
"watchdog (>=6.0.0,<7.0.0)",
|
|
17
|
-
"bcrypt (>=4.2.1,<5.0.0)",
|
|
18
|
-
"litequeue (>=0.9,<0.10)",
|
|
19
|
-
"simple-websocket (>=1.1.0,<2.0.0)",
|
|
20
|
-
"asyncer>=0.0.8",
|
|
21
|
-
"hypercorn>=0.18.0",
|
|
22
|
-
"requests>=2.32.5",
|
|
23
|
-
]
|
|
24
|
-
|
|
25
|
-
[dependency-groups]
|
|
26
|
-
dev = [
|
|
27
|
-
"flake8>=7.2.0",
|
|
28
|
-
"jurigged>=0.6.0",
|
|
29
|
-
"mkdocs>=1.6.1",
|
|
30
|
-
"mysql-connector-python>=9.3.0",
|
|
31
|
-
"psycopg2-binary>=2.9.10",
|
|
32
|
-
"pydoc-markdown>=4.8.2",
|
|
33
|
-
"pytest>=8.3.5",
|
|
34
|
-
"pytest-asyncio>=1.3.0",
|
|
35
|
-
"python-keycloak>=5.8.1",
|
|
36
|
-
"ruff>=0.11.9",
|
|
37
|
-
"safety>=3.5.0",
|
|
38
|
-
]
|
|
39
|
-
|
|
40
|
-
[build-system]
|
|
41
|
-
requires = ["hatchling"]
|
|
42
|
-
build-backend = "hatchling.build"
|
|
43
|
-
|
|
44
|
-
[tool.hatch.build]
|
|
45
|
-
include = [
|
|
46
|
-
"tina4_python/**/*"
|
|
47
|
-
]
|
|
48
|
-
|
|
49
|
-
[project.scripts]
|
|
50
|
-
tina4 = "tina4_python.cli:main"
|
|
51
|
-
|
|
52
|
-
[[tool.pydoc-markdown.loaders]]
|
|
53
|
-
type = "python"
|
|
54
|
-
search_path = [ "./tina4_python" ]
|
|
55
|
-
|
|
56
|
-
[tool.pydoc-markdown.renderer]
|
|
57
|
-
type = "mkdocs"
|
|
58
|
-
site_name= "Tina4Python"
|
|
59
|
-
|
|
60
|
-
[[tool.pydoc-markdown.renderer.pages]]
|
|
61
|
-
title = "API Documentation"
|
|
62
|
-
name = "index"
|
|
63
|
-
|
|
64
|
-
contents = [ "*" ]
|
|
65
|
-
|
|
1
|
+
[project]
|
|
2
|
+
name = "tina4-python"
|
|
3
|
+
version = "0.2.172"
|
|
4
|
+
description = "Tina4Python - This is not another framework for Python"
|
|
5
|
+
authors = [
|
|
6
|
+
{name = "Andre van Zuydam",email = "andrevanzuydam@gmail.com"}
|
|
7
|
+
]
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.12,<4.0"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"jinja2>=3.1.5,<4.0.0",
|
|
12
|
+
"libsass (>=0.23.0,<0.24.0)",
|
|
13
|
+
"python-dotenv (>=1.0.1,<2.0.0)",
|
|
14
|
+
"pyjwt (>=2.10.1,<3.0.0)",
|
|
15
|
+
"cryptography (>=44.0.0,<45.0.0)",
|
|
16
|
+
"watchdog (>=6.0.0,<7.0.0)",
|
|
17
|
+
"bcrypt (>=4.2.1,<5.0.0)",
|
|
18
|
+
"litequeue (>=0.9,<0.10)",
|
|
19
|
+
"simple-websocket (>=1.1.0,<2.0.0)",
|
|
20
|
+
"asyncer>=0.0.8",
|
|
21
|
+
"hypercorn>=0.18.0",
|
|
22
|
+
"requests>=2.32.5",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[dependency-groups]
|
|
26
|
+
dev = [
|
|
27
|
+
"flake8>=7.2.0",
|
|
28
|
+
"jurigged>=0.6.0",
|
|
29
|
+
"mkdocs>=1.6.1",
|
|
30
|
+
"mysql-connector-python>=9.3.0",
|
|
31
|
+
"psycopg2-binary>=2.9.10",
|
|
32
|
+
"pydoc-markdown>=4.8.2",
|
|
33
|
+
"pytest>=8.3.5",
|
|
34
|
+
"pytest-asyncio>=1.3.0",
|
|
35
|
+
"python-keycloak>=5.8.1",
|
|
36
|
+
"ruff>=0.11.9",
|
|
37
|
+
"safety>=3.5.0",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
[build-system]
|
|
41
|
+
requires = ["hatchling"]
|
|
42
|
+
build-backend = "hatchling.build"
|
|
43
|
+
|
|
44
|
+
[tool.hatch.build]
|
|
45
|
+
include = [
|
|
46
|
+
"tina4_python/**/*"
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
[project.scripts]
|
|
50
|
+
tina4 = "tina4_python.cli:main"
|
|
51
|
+
|
|
52
|
+
[[tool.pydoc-markdown.loaders]]
|
|
53
|
+
type = "python"
|
|
54
|
+
search_path = [ "./tina4_python" ]
|
|
55
|
+
|
|
56
|
+
[tool.pydoc-markdown.renderer]
|
|
57
|
+
type = "mkdocs"
|
|
58
|
+
site_name= "Tina4Python"
|
|
59
|
+
|
|
60
|
+
[[tool.pydoc-markdown.renderer.pages]]
|
|
61
|
+
title = "API Documentation"
|
|
62
|
+
name = "index"
|
|
63
|
+
|
|
64
|
+
contents = [ "*" ]
|
|
65
|
+
|
|
@@ -320,6 +320,10 @@ class Database:
|
|
|
320
320
|
total = counter.fetchone()[0]
|
|
321
321
|
except Exception as e:
|
|
322
322
|
Debug.error ("COUNT ERROR", count_sql, final_params, str(e))
|
|
323
|
+
try:
|
|
324
|
+
self.dba.rollback()
|
|
325
|
+
except Exception:
|
|
326
|
+
pass
|
|
323
327
|
total = 0
|
|
324
328
|
finally:
|
|
325
329
|
counter.close()
|
|
@@ -359,6 +363,10 @@ class Database:
|
|
|
359
363
|
return self.get_database_result(cursor, total, limit, skip, final_sql)
|
|
360
364
|
except Exception as e:
|
|
361
365
|
Debug.error("FETCH ERROR", final_sql, final_params, str(e))
|
|
366
|
+
try:
|
|
367
|
+
self.dba.rollback()
|
|
368
|
+
except Exception:
|
|
369
|
+
pass
|
|
362
370
|
return DatabaseResult(None, [], str(e))
|
|
363
371
|
finally:
|
|
364
372
|
cursor.close()
|
|
@@ -433,6 +441,10 @@ class Database:
|
|
|
433
441
|
return DatabaseResult(None, [], None, 0, 0, 0, sql, self)
|
|
434
442
|
except Exception as e:
|
|
435
443
|
Debug.error("EXECUTE ERROR:", sql, str(e))
|
|
444
|
+
try:
|
|
445
|
+
self.dba.rollback()
|
|
446
|
+
except Exception:
|
|
447
|
+
pass
|
|
436
448
|
# Return the error in the result
|
|
437
449
|
return DatabaseResult(None, [], str(e))
|
|
438
450
|
finally:
|
|
@@ -463,6 +475,10 @@ class Database:
|
|
|
463
475
|
return DatabaseResult(None, [], None)
|
|
464
476
|
except Exception as e:
|
|
465
477
|
Debug.error("EXECUTE MANY ERROR:", sql, str(e))
|
|
478
|
+
try:
|
|
479
|
+
self.dba.rollback()
|
|
480
|
+
except Exception:
|
|
481
|
+
pass
|
|
466
482
|
# Return the error in the result
|
|
467
483
|
return DatabaseResult(None, [], str(e))
|
|
468
484
|
finally:
|
|
@@ -202,7 +202,7 @@ class Router:
|
|
|
202
202
|
tina4_python.tina4_current_request["headers"] = headers
|
|
203
203
|
|
|
204
204
|
validated = False
|
|
205
|
-
# we can add other methods later but right now we validate posts
|
|
205
|
+
# we can add other methods later but right now we validate gets, posts and other risky methods
|
|
206
206
|
if method in [Constant.TINA4_GET, Constant.TINA4_POST, Constant.TINA4_PUT, Constant.TINA4_PATCH,
|
|
207
207
|
Constant.TINA4_DELETE]:
|
|
208
208
|
content_type = "text/html"
|
|
@@ -256,8 +256,8 @@ class Router:
|
|
|
256
256
|
Debug.debug(method, "Matching route ", route['routes'], " to ", url)
|
|
257
257
|
if Router.match(url, route['routes']):
|
|
258
258
|
|
|
259
|
-
if not "noauth" in route and not validated:
|
|
260
|
-
if Router.requires_auth(route, method, validated):
|
|
259
|
+
if "noauth" not in route or "noauth" in route and not route["noauth"] and not validated:
|
|
260
|
+
if not validated and Router.requires_auth(route, method, validated):
|
|
261
261
|
return Response.Response("Forbidden - Access denied", Constant.HTTP_FORBIDDEN,
|
|
262
262
|
Constant.TEXT_HTML)
|
|
263
263
|
|
|
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
|
{tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/js/reconnecting-websocket.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/public/swagger/oauth2-redirect.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/translations/en/LC_MESSAGES/messages.mo
RENAMED
|
File without changes
|
{tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/translations/en/LC_MESSAGES/messages.po
RENAMED
|
File without changes
|
{tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/translations/fr/LC_MESSAGES/messages.mo
RENAMED
|
File without changes
|
{tina4_python-0.2.170 → tina4_python-0.2.172}/tina4_python/translations/fr/LC_MESSAGES/messages.po
RENAMED
|
File without changes
|