velocity-python 0.0.92__tar.gz → 0.0.93__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.92/src/velocity_python.egg-info → velocity_python-0.0.93}/PKG-INFO +30 -16
- {velocity_python-0.0.92 → velocity_python-0.0.93}/README.md +29 -15
- {velocity_python-0.0.92 → velocity_python-0.0.93}/pyproject.toml +1 -1
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/__init__.py +1 -1
- {velocity_python-0.0.92 → velocity_python-0.0.93/src/velocity_python.egg-info}/PKG-INFO +30 -16
- {velocity_python-0.0.92 → velocity_python-0.0.93}/LICENSE +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/setup.cfg +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/app/__init__.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/app/invoices.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/app/orders.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/app/payments.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/app/purchase_orders.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/__init__.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/amplify.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/handlers/__init__.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/handlers/context.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/handlers/lambda_handler.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/handlers/response.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/handlers/sqs_handler.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/__init__.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/__init__.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/column.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/database.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/decorators.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/engine.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/exceptions.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/result.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/row.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/sequence.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/table.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/transaction.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/__init__.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/mysql.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/mysql_reserved.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/__init__.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/operators.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/reserved.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/sql.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/types.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/sqlite.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/sqlite_reserved.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/sqlserver.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/sqlserver_reserved.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/tablehelper.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/__init__.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/conv/__init__.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/conv/iconv.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/conv/oconv.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/db.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/export.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/format.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/mail.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/merge.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/timer.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/tools.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity_python.egg-info/SOURCES.txt +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity_python.egg-info/dependency_links.txt +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity_python.egg-info/requires.txt +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity_python.egg-info/top_level.txt +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_db.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_email_processing.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_format.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_iconv.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_merge.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_oconv.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_postgres.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_response.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_spreadsheet_functions.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_sql_builder.py +0 -0
- {velocity_python-0.0.92 → velocity_python-0.0.93}/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.93
|
|
4
4
|
Summary: A rapid application development library for interfacing with data storage
|
|
5
5
|
Author-email: Velocity Team <contact@example.com>
|
|
6
6
|
License: MIT
|
|
@@ -205,7 +205,7 @@ def update_user(tx):
|
|
|
205
205
|
# Bulk update
|
|
206
206
|
users.update(
|
|
207
207
|
{'status': 'inactive'},
|
|
208
|
-
where={'last_login':
|
|
208
|
+
where={'<last_login': '2023-01-01'}
|
|
209
209
|
)
|
|
210
210
|
```
|
|
211
211
|
|
|
@@ -268,33 +268,47 @@ def get_user_with_profile(tx):
|
|
|
268
268
|
|
|
269
269
|
# Automatic join via foreign key
|
|
270
270
|
users_with_profiles = users.select(
|
|
271
|
-
columns=['name', 'email', '
|
|
271
|
+
columns=['name', 'email', 'profile_id>bio', 'profile_id>avatar_url'],
|
|
272
272
|
where={'status': 'active'}
|
|
273
273
|
).all()
|
|
274
274
|
```
|
|
275
275
|
|
|
276
276
|
#### Complex Conditions
|
|
277
277
|
|
|
278
|
+
Velocity.DB supports various where clause formats:
|
|
279
|
+
|
|
278
280
|
```python
|
|
279
281
|
@engine.transaction
|
|
280
282
|
def complex_queries(tx):
|
|
281
283
|
users = tx.table('users')
|
|
282
284
|
|
|
283
|
-
#
|
|
285
|
+
# Dictionary format with operator prefixes
|
|
284
286
|
results = users.select(where={
|
|
285
|
-
'status': 'active',
|
|
286
|
-
'created_at':
|
|
287
|
-
'age':
|
|
288
|
-
'email':
|
|
287
|
+
'status': 'active', # Equals (default)
|
|
288
|
+
'>=created_at': '2023-01-01', # Greater than or equal
|
|
289
|
+
'><age': [18, 65], # Between
|
|
290
|
+
'%email': '@company.com', # Like
|
|
291
|
+
'!status': 'deleted' # Not equal
|
|
289
292
|
}).all()
|
|
290
293
|
|
|
291
|
-
#
|
|
292
|
-
results = users.select(where=
|
|
293
|
-
'
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
294
|
+
# List of tuples format for complex predicates
|
|
295
|
+
results = users.select(where=[
|
|
296
|
+
('status = %s', 'active'),
|
|
297
|
+
('priority = %s OR urgency = %s', ('high', 'critical'))
|
|
298
|
+
]).all()
|
|
299
|
+
|
|
300
|
+
# Raw string format
|
|
301
|
+
results = users.select(where="status = 'active' AND age >= 18").all()
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Available Operators:**
|
|
305
|
+
- `=` (default): `{'name': 'John'}`
|
|
306
|
+
- `>`, `<`, `>=`, `<=`: `{'>age': 18}`, `{'<=score': 100}`
|
|
307
|
+
- `!`, `!=`, `<>`: `{'!status': 'deleted'}`
|
|
308
|
+
- `%`, `LIKE`: `{'%email': '@company.com'}`
|
|
309
|
+
- `!%`, `NOT LIKE`: `{'!%name': 'test%'}`
|
|
310
|
+
- `><`, `BETWEEN`: `{'><age': [18, 65]}`
|
|
311
|
+
- `!><`, `NOT BETWEEN`: `{'!><score': [0, 50]}`
|
|
298
312
|
```
|
|
299
313
|
|
|
300
314
|
#### Aggregations and Grouping
|
|
@@ -306,7 +320,7 @@ def analytics(tx):
|
|
|
306
320
|
|
|
307
321
|
# Count records
|
|
308
322
|
total_orders = orders.count()
|
|
309
|
-
recent_orders = orders.count(where={'created_at':
|
|
323
|
+
recent_orders = orders.count(where={'>=created_at': '2023-01-01'})
|
|
310
324
|
|
|
311
325
|
# Aggregations
|
|
312
326
|
stats = orders.select(
|
|
@@ -154,7 +154,7 @@ def update_user(tx):
|
|
|
154
154
|
# Bulk update
|
|
155
155
|
users.update(
|
|
156
156
|
{'status': 'inactive'},
|
|
157
|
-
where={'last_login':
|
|
157
|
+
where={'<last_login': '2023-01-01'}
|
|
158
158
|
)
|
|
159
159
|
```
|
|
160
160
|
|
|
@@ -217,33 +217,47 @@ def get_user_with_profile(tx):
|
|
|
217
217
|
|
|
218
218
|
# Automatic join via foreign key
|
|
219
219
|
users_with_profiles = users.select(
|
|
220
|
-
columns=['name', 'email', '
|
|
220
|
+
columns=['name', 'email', 'profile_id>bio', 'profile_id>avatar_url'],
|
|
221
221
|
where={'status': 'active'}
|
|
222
222
|
).all()
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
#### Complex Conditions
|
|
226
226
|
|
|
227
|
+
Velocity.DB supports various where clause formats:
|
|
228
|
+
|
|
227
229
|
```python
|
|
228
230
|
@engine.transaction
|
|
229
231
|
def complex_queries(tx):
|
|
230
232
|
users = tx.table('users')
|
|
231
233
|
|
|
232
|
-
#
|
|
234
|
+
# Dictionary format with operator prefixes
|
|
233
235
|
results = users.select(where={
|
|
234
|
-
'status': 'active',
|
|
235
|
-
'created_at':
|
|
236
|
-
'age':
|
|
237
|
-
'email':
|
|
236
|
+
'status': 'active', # Equals (default)
|
|
237
|
+
'>=created_at': '2023-01-01', # Greater than or equal
|
|
238
|
+
'><age': [18, 65], # Between
|
|
239
|
+
'%email': '@company.com', # Like
|
|
240
|
+
'!status': 'deleted' # Not equal
|
|
238
241
|
}).all()
|
|
239
242
|
|
|
240
|
-
#
|
|
241
|
-
results = users.select(where=
|
|
242
|
-
'
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
243
|
+
# List of tuples format for complex predicates
|
|
244
|
+
results = users.select(where=[
|
|
245
|
+
('status = %s', 'active'),
|
|
246
|
+
('priority = %s OR urgency = %s', ('high', 'critical'))
|
|
247
|
+
]).all()
|
|
248
|
+
|
|
249
|
+
# Raw string format
|
|
250
|
+
results = users.select(where="status = 'active' AND age >= 18").all()
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Available Operators:**
|
|
254
|
+
- `=` (default): `{'name': 'John'}`
|
|
255
|
+
- `>`, `<`, `>=`, `<=`: `{'>age': 18}`, `{'<=score': 100}`
|
|
256
|
+
- `!`, `!=`, `<>`: `{'!status': 'deleted'}`
|
|
257
|
+
- `%`, `LIKE`: `{'%email': '@company.com'}`
|
|
258
|
+
- `!%`, `NOT LIKE`: `{'!%name': 'test%'}`
|
|
259
|
+
- `><`, `BETWEEN`: `{'><age': [18, 65]}`
|
|
260
|
+
- `!><`, `NOT BETWEEN`: `{'!><score': [0, 50]}`
|
|
247
261
|
```
|
|
248
262
|
|
|
249
263
|
#### Aggregations and Grouping
|
|
@@ -255,7 +269,7 @@ def analytics(tx):
|
|
|
255
269
|
|
|
256
270
|
# Count records
|
|
257
271
|
total_orders = orders.count()
|
|
258
|
-
recent_orders = orders.count(where={'created_at':
|
|
272
|
+
recent_orders = orders.count(where={'>=created_at': '2023-01-01'})
|
|
259
273
|
|
|
260
274
|
# Aggregations
|
|
261
275
|
stats = orders.select(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: velocity-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.93
|
|
4
4
|
Summary: A rapid application development library for interfacing with data storage
|
|
5
5
|
Author-email: Velocity Team <contact@example.com>
|
|
6
6
|
License: MIT
|
|
@@ -205,7 +205,7 @@ def update_user(tx):
|
|
|
205
205
|
# Bulk update
|
|
206
206
|
users.update(
|
|
207
207
|
{'status': 'inactive'},
|
|
208
|
-
where={'last_login':
|
|
208
|
+
where={'<last_login': '2023-01-01'}
|
|
209
209
|
)
|
|
210
210
|
```
|
|
211
211
|
|
|
@@ -268,33 +268,47 @@ def get_user_with_profile(tx):
|
|
|
268
268
|
|
|
269
269
|
# Automatic join via foreign key
|
|
270
270
|
users_with_profiles = users.select(
|
|
271
|
-
columns=['name', 'email', '
|
|
271
|
+
columns=['name', 'email', 'profile_id>bio', 'profile_id>avatar_url'],
|
|
272
272
|
where={'status': 'active'}
|
|
273
273
|
).all()
|
|
274
274
|
```
|
|
275
275
|
|
|
276
276
|
#### Complex Conditions
|
|
277
277
|
|
|
278
|
+
Velocity.DB supports various where clause formats:
|
|
279
|
+
|
|
278
280
|
```python
|
|
279
281
|
@engine.transaction
|
|
280
282
|
def complex_queries(tx):
|
|
281
283
|
users = tx.table('users')
|
|
282
284
|
|
|
283
|
-
#
|
|
285
|
+
# Dictionary format with operator prefixes
|
|
284
286
|
results = users.select(where={
|
|
285
|
-
'status': 'active',
|
|
286
|
-
'created_at':
|
|
287
|
-
'age':
|
|
288
|
-
'email':
|
|
287
|
+
'status': 'active', # Equals (default)
|
|
288
|
+
'>=created_at': '2023-01-01', # Greater than or equal
|
|
289
|
+
'><age': [18, 65], # Between
|
|
290
|
+
'%email': '@company.com', # Like
|
|
291
|
+
'!status': 'deleted' # Not equal
|
|
289
292
|
}).all()
|
|
290
293
|
|
|
291
|
-
#
|
|
292
|
-
results = users.select(where=
|
|
293
|
-
'
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
294
|
+
# List of tuples format for complex predicates
|
|
295
|
+
results = users.select(where=[
|
|
296
|
+
('status = %s', 'active'),
|
|
297
|
+
('priority = %s OR urgency = %s', ('high', 'critical'))
|
|
298
|
+
]).all()
|
|
299
|
+
|
|
300
|
+
# Raw string format
|
|
301
|
+
results = users.select(where="status = 'active' AND age >= 18").all()
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Available Operators:**
|
|
305
|
+
- `=` (default): `{'name': 'John'}`
|
|
306
|
+
- `>`, `<`, `>=`, `<=`: `{'>age': 18}`, `{'<=score': 100}`
|
|
307
|
+
- `!`, `!=`, `<>`: `{'!status': 'deleted'}`
|
|
308
|
+
- `%`, `LIKE`: `{'%email': '@company.com'}`
|
|
309
|
+
- `!%`, `NOT LIKE`: `{'!%name': 'test%'}`
|
|
310
|
+
- `><`, `BETWEEN`: `{'><age': [18, 65]}`
|
|
311
|
+
- `!><`, `NOT BETWEEN`: `{'!><score': [0, 50]}`
|
|
298
312
|
```
|
|
299
313
|
|
|
300
314
|
#### Aggregations and Grouping
|
|
@@ -306,7 +320,7 @@ def analytics(tx):
|
|
|
306
320
|
|
|
307
321
|
# Count records
|
|
308
322
|
total_orders = orders.count()
|
|
309
|
-
recent_orders = orders.count(where={'created_at':
|
|
323
|
+
recent_orders = orders.count(where={'>=created_at': '2023-01-01'})
|
|
310
324
|
|
|
311
325
|
# Aggregations
|
|
312
326
|
stats = orders.select(
|
|
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.92 → velocity_python-0.0.93}/src/velocity/aws/handlers/lambda_handler.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/__init__.py
RENAMED
|
File without changes
|
{velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/operators.py
RENAMED
|
File without changes
|
{velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/reserved.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/sqlite_reserved.py
RENAMED
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.92 → velocity_python-0.0.93}/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
|
|
File without changes
|
{velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.92 → velocity_python-0.0.93}/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
|