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.

Files changed (70) hide show
  1. {velocity_python-0.0.92/src/velocity_python.egg-info → velocity_python-0.0.93}/PKG-INFO +30 -16
  2. {velocity_python-0.0.92 → velocity_python-0.0.93}/README.md +29 -15
  3. {velocity_python-0.0.92 → velocity_python-0.0.93}/pyproject.toml +1 -1
  4. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/__init__.py +1 -1
  5. {velocity_python-0.0.92 → velocity_python-0.0.93/src/velocity_python.egg-info}/PKG-INFO +30 -16
  6. {velocity_python-0.0.92 → velocity_python-0.0.93}/LICENSE +0 -0
  7. {velocity_python-0.0.92 → velocity_python-0.0.93}/setup.cfg +0 -0
  8. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/app/__init__.py +0 -0
  9. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/app/invoices.py +0 -0
  10. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/app/orders.py +0 -0
  11. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/app/payments.py +0 -0
  12. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/app/purchase_orders.py +0 -0
  13. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/__init__.py +0 -0
  14. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/amplify.py +0 -0
  15. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/handlers/__init__.py +0 -0
  16. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/handlers/context.py +0 -0
  17. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/handlers/lambda_handler.py +0 -0
  18. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/handlers/response.py +0 -0
  19. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/aws/handlers/sqs_handler.py +0 -0
  20. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/__init__.py +0 -0
  21. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/__init__.py +0 -0
  22. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/column.py +0 -0
  23. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/database.py +0 -0
  24. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/decorators.py +0 -0
  25. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/engine.py +0 -0
  26. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/exceptions.py +0 -0
  27. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/result.py +0 -0
  28. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/row.py +0 -0
  29. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/sequence.py +0 -0
  30. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/table.py +0 -0
  31. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/core/transaction.py +0 -0
  32. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/__init__.py +0 -0
  33. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/mysql.py +0 -0
  34. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/mysql_reserved.py +0 -0
  35. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/__init__.py +0 -0
  36. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/operators.py +0 -0
  37. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/reserved.py +0 -0
  38. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/sql.py +0 -0
  39. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/postgres/types.py +0 -0
  40. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/sqlite.py +0 -0
  41. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/sqlite_reserved.py +0 -0
  42. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/sqlserver.py +0 -0
  43. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/sqlserver_reserved.py +0 -0
  44. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/db/servers/tablehelper.py +0 -0
  45. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/__init__.py +0 -0
  46. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/conv/__init__.py +0 -0
  47. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/conv/iconv.py +0 -0
  48. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/conv/oconv.py +0 -0
  49. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/db.py +0 -0
  50. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/export.py +0 -0
  51. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/format.py +0 -0
  52. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/mail.py +0 -0
  53. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/merge.py +0 -0
  54. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/timer.py +0 -0
  55. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity/misc/tools.py +0 -0
  56. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity_python.egg-info/SOURCES.txt +0 -0
  57. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity_python.egg-info/dependency_links.txt +0 -0
  58. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity_python.egg-info/requires.txt +0 -0
  59. {velocity_python-0.0.92 → velocity_python-0.0.93}/src/velocity_python.egg-info/top_level.txt +0 -0
  60. {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_db.py +0 -0
  61. {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_email_processing.py +0 -0
  62. {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_format.py +0 -0
  63. {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_iconv.py +0 -0
  64. {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_merge.py +0 -0
  65. {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_oconv.py +0 -0
  66. {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_postgres.py +0 -0
  67. {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_response.py +0 -0
  68. {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_spreadsheet_functions.py +0 -0
  69. {velocity_python-0.0.92 → velocity_python-0.0.93}/tests/test_sql_builder.py +0 -0
  70. {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.92
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': {'<': '2023-01-01'}}
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', 'profile.bio', 'profile.avatar_url'],
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
- # Multiple conditions
285
+ # Dictionary format with operator prefixes
284
286
  results = users.select(where={
285
- 'status': 'active',
286
- 'created_at': {'>=': '2023-01-01'},
287
- 'age': {'BETWEEN': [18, 65]},
288
- 'email': {'LIKE': '%@company.com'}
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
- # OR conditions
292
- results = users.select(where={
293
- 'OR': [
294
- {'status': 'active'},
295
- {'priority': 'high'}
296
- ]
297
- }).all()
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': {'>=': '2023-01-01'}})
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': {'<': '2023-01-01'}}
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', 'profile.bio', 'profile.avatar_url'],
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
- # Multiple conditions
234
+ # Dictionary format with operator prefixes
233
235
  results = users.select(where={
234
- 'status': 'active',
235
- 'created_at': {'>=': '2023-01-01'},
236
- 'age': {'BETWEEN': [18, 65]},
237
- 'email': {'LIKE': '%@company.com'}
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
- # OR conditions
241
- results = users.select(where={
242
- 'OR': [
243
- {'status': 'active'},
244
- {'priority': 'high'}
245
- ]
246
- }).all()
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': {'>=': '2023-01-01'}})
272
+ recent_orders = orders.count(where={'>=created_at': '2023-01-01'})
259
273
 
260
274
  # Aggregations
261
275
  stats = orders.select(
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "velocity-python"
7
- version = "0.0.92"
7
+ version = "0.0.93"
8
8
  authors = [
9
9
  { name="Velocity Team", email="contact@example.com" },
10
10
  ]
@@ -1,4 +1,4 @@
1
- __version__ = version = "0.0.92"
1
+ __version__ = version = "0.0.93"
2
2
 
3
3
  from . import aws
4
4
  from . import db
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: velocity-python
3
- Version: 0.0.92
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': {'<': '2023-01-01'}}
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', 'profile.bio', 'profile.avatar_url'],
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
- # Multiple conditions
285
+ # Dictionary format with operator prefixes
284
286
  results = users.select(where={
285
- 'status': 'active',
286
- 'created_at': {'>=': '2023-01-01'},
287
- 'age': {'BETWEEN': [18, 65]},
288
- 'email': {'LIKE': '%@company.com'}
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
- # OR conditions
292
- results = users.select(where={
293
- 'OR': [
294
- {'status': 'active'},
295
- {'priority': 'high'}
296
- ]
297
- }).all()
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': {'>=': '2023-01-01'}})
323
+ recent_orders = orders.count(where={'>=created_at': '2023-01-01'})
310
324
 
311
325
  # Aggregations
312
326
  stats = orders.select(