velocity-python 0.0.73__tar.gz → 0.0.75__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.
Potentially problematic release.
This version of velocity-python might be problematic. Click here for more details.
- {velocity_python-0.0.73 → velocity_python-0.0.75}/PKG-INFO +1 -1
- {velocity_python-0.0.73 → velocity_python-0.0.75}/pyproject.toml +1 -1
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/__init__.py +1 -1
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/aws/handlers/lambda_handler.py +4 -2
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/misc/format.py +15 -15
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity_python.egg-info/PKG-INFO +1 -1
- {velocity_python-0.0.73 → velocity_python-0.0.75}/LICENSE +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/README.md +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/setup.cfg +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/aws/__init__.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/aws/handlers/__init__.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/aws/handlers/context.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/aws/handlers/response.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/aws/handlers/sqs_handler.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/__init__.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/core/__init__.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/core/column.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/core/database.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/core/decorators.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/core/engine.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/core/exceptions.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/core/result.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/core/row.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/core/sequence.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/core/table.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/core/transaction.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/__init__.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/mysql.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/mysql_reserved.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/postgres/__init__.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/postgres/operators.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/postgres/reserved.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/postgres/sql.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/postgres/types.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/sqlite.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/sqlite_reserved.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/sqlserver.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/sqlserver_reserved.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/tablehelper.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/misc/__init__.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/misc/conv/__init__.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/misc/conv/iconv.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/misc/conv/oconv.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/misc/db.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/misc/export.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/misc/mail.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/misc/merge.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/misc/timer.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/misc/tools.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity_python.egg-info/SOURCES.txt +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity_python.egg-info/dependency_links.txt +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity_python.egg-info/requires.txt +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity_python.egg-info/top_level.txt +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/tests/test_db.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/tests/test_email_processing.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/tests/test_format.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/tests/test_iconv.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/tests/test_merge.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/tests/test_oconv.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/tests/test_postgres.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/tests/test_response.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/tests/test_spreadsheet_functions.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/tests/test_sql_builder.py +0 -0
- {velocity_python-0.0.73 → velocity_python-0.0.75}/tests/test_timer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: velocity-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.75
|
|
4
4
|
Summary: A rapid application development library for interfacing with data storage
|
|
5
5
|
Author-email: Paul Perez <pperez@codeclubs.org>
|
|
6
6
|
Project-URL: Homepage, https://codeclubs.org/projects/velocity
|
{velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/aws/handlers/lambda_handler.py
RENAMED
|
@@ -124,8 +124,10 @@ class LambdaHandler:
|
|
|
124
124
|
break
|
|
125
125
|
if hasattr(self, action):
|
|
126
126
|
result = getattr(self, action)(local_context)
|
|
127
|
-
if result
|
|
128
|
-
|
|
127
|
+
if result is not None:
|
|
128
|
+
raise Exception(
|
|
129
|
+
f"Deprecated Feature Error: Action {action} returned a response but this is not allowed. Use Repsonse object instead: {type(result)}"
|
|
130
|
+
)
|
|
129
131
|
break
|
|
130
132
|
if hasattr(self, "afterAction"):
|
|
131
133
|
self.afterAction(local_context)
|
|
@@ -2,6 +2,7 @@ import decimal
|
|
|
2
2
|
import json
|
|
3
3
|
from typing import Union
|
|
4
4
|
from types import FunctionType, MethodType
|
|
5
|
+
from datetime import datetime, date, time, timedelta
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
def gallons(data: Union[None, str, float, decimal.Decimal]) -> str:
|
|
@@ -63,25 +64,24 @@ def to_json(o, datefmt: str = "%Y-%m-%d", timefmt: str = "%H:%M:%S") -> str:
|
|
|
63
64
|
try:
|
|
64
65
|
if hasattr(obj, "to_json"):
|
|
65
66
|
return obj.to_json()
|
|
66
|
-
|
|
67
|
+
if isinstance(obj, decimal.Decimal):
|
|
67
68
|
return float(obj)
|
|
68
|
-
|
|
69
|
+
if isinstance(obj, datetime):
|
|
69
70
|
return obj.strftime(f"{datefmt} {timefmt}")
|
|
70
|
-
|
|
71
|
+
if isinstance(obj, date):
|
|
71
72
|
return obj.strftime(datefmt)
|
|
72
|
-
|
|
73
|
+
if isinstance(obj, time):
|
|
73
74
|
return obj.strftime(timefmt)
|
|
74
|
-
|
|
75
|
-
return str(obj) # Or use
|
|
76
|
-
|
|
77
|
-
return f"WARNING: unserializable: method {obj
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
)
|
|
75
|
+
if isinstance(obj, timedelta):
|
|
76
|
+
return str(obj) # Or use human_delta(obj) if preferred
|
|
77
|
+
if isinstance(obj, (FunctionType, MethodType)):
|
|
78
|
+
return f"WARNING: unserializable: method {getattr(obj, '__name__', 'anonymous')}"
|
|
79
|
+
return f"WARNING: unserializable: {type(obj).__name__}" + (
|
|
80
|
+
f" ({getattr(obj, '__name__', '')})"
|
|
81
|
+
if hasattr(obj, "__name__")
|
|
82
|
+
else ""
|
|
83
|
+
)
|
|
84
84
|
except Exception as e:
|
|
85
|
-
return f"WARNING:
|
|
85
|
+
return f"WARNING: failed to serialize {type(obj).__name__}: {e}"
|
|
86
86
|
|
|
87
87
|
return json.dumps(o, cls=JsonEncoder, indent=2)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: velocity-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.75
|
|
4
4
|
Summary: A rapid application development library for interfacing with data storage
|
|
5
5
|
Author-email: Paul Perez <pperez@codeclubs.org>
|
|
6
6
|
Project-URL: Homepage, https://codeclubs.org/projects/velocity
|
|
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
|
{velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/postgres/__init__.py
RENAMED
|
File without changes
|
{velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/postgres/operators.py
RENAMED
|
File without changes
|
{velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/postgres/reserved.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/sqlite_reserved.py
RENAMED
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity/db/servers/sqlserver_reserved.py
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
|
{velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.73 → velocity_python-0.0.75}/src/velocity_python.egg-info/top_level.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|