velocity-python 0.1.4__tar.gz → 0.1.18__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.
Files changed (193) hide show
  1. velocity_python-0.1.18/PKG-INFO +334 -0
  2. velocity_python-0.1.18/README.md +270 -0
  3. {velocity_python-0.1.4 → velocity_python-0.1.18}/pyproject.toml +12 -2
  4. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/__init__.py +2 -3
  5. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/base_handler.py +10 -9
  6. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/context.py +31 -13
  7. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/exceptions.py +6 -1
  8. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/lambda_handler.py +3 -3
  9. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/mixins/web_handler.py +23 -7
  10. velocity_python-0.1.18/src/velocity/db/core/async_support.py +645 -0
  11. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/core/decorators.py +10 -0
  12. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/core/engine.py +111 -75
  13. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/core/result.py +22 -0
  14. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/core/row.py +94 -4
  15. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/core/table.py +31 -5
  16. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/core/transaction.py +25 -0
  17. velocity_python-0.1.18/src/velocity/db/migrations.py +567 -0
  18. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/base/sql.py +24 -0
  19. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/mysql/sql.py +25 -2
  20. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/postgres/sql.py +36 -0
  21. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/sqlite/sql.py +21 -2
  22. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/sqlserver/sql.py +25 -2
  23. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_engine.py +4 -8
  24. velocity_python-0.1.18/src/velocity/db/tests/test_process_error_robustness.py +305 -0
  25. velocity_python-0.1.18/src/velocity/misc/pdf.py +201 -0
  26. velocity_python-0.1.18/src/velocity/payment/__init__.py +36 -0
  27. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/payment/base_adapter.py +4 -4
  28. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/payment/braintree_adapter.py +18 -9
  29. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/payment/charge_rules.py +4 -4
  30. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/payment/stripe_adapter.py +43 -26
  31. velocity_python-0.1.18/src/velocity_python.egg-info/PKG-INFO +334 -0
  32. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity_python.egg-info/SOURCES.txt +12 -21
  33. velocity_python-0.1.18/src/velocity_python.egg-info/entry_points.txt +2 -0
  34. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity_python.egg-info/requires.txt +6 -1
  35. velocity_python-0.1.18/tests/test_async_support.py +689 -0
  36. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_concurrency_safety.py +34 -0
  37. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_connection_pool.py +5 -5
  38. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_lambda_handler.py +1 -1
  39. velocity_python-0.1.18/tests/test_n_plus_one.py +359 -0
  40. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_payment_stripe_adapter.py +10 -6
  41. velocity_python-0.1.18/tests/test_pdf.py +188 -0
  42. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_row_batch_update.py +2 -0
  43. velocity_python-0.1.18/tests/test_row_dirty_tracking.py +193 -0
  44. velocity_python-0.1.18/tests/test_schema_migrations.py +921 -0
  45. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_security_hardening.py +4 -0
  46. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_where_clause_validation.py +12 -0
  47. velocity_python-0.1.4/PKG-INFO +0 -1484
  48. velocity_python-0.1.4/README.md +0 -1426
  49. velocity_python-0.1.4/src/velocity/app/formbuilder/__init__.py +0 -1
  50. velocity_python-0.1.4/src/velocity/app/formbuilder/reshaper.py +0 -201
  51. velocity_python-0.1.4/src/velocity/app/invoices.py +0 -0
  52. velocity_python-0.1.4/src/velocity/app/orders.py +0 -179
  53. velocity_python-0.1.4/src/velocity/app/payments.py +0 -0
  54. velocity_python-0.1.4/src/velocity/app/purchase_orders.py +0 -0
  55. velocity_python-0.1.4/src/velocity/app/tests/__init__.py +0 -1
  56. velocity_python-0.1.4/src/velocity/app/validators/__init__.py +0 -1
  57. velocity_python-0.1.4/src/velocity/app/validators/formbuilder_template.py +0 -204
  58. velocity_python-0.1.4/src/velocity/db/tests/test_process_error_robustness.py +0 -292
  59. velocity_python-0.1.4/src/velocity/misc/__init__.py +0 -0
  60. velocity_python-0.1.4/src/velocity/payment/__init__.py +0 -96
  61. velocity_python-0.1.4/src/velocity/payment/demo_profiles.py +0 -353
  62. velocity_python-0.1.4/src/velocity/payment/profiles.py +0 -74
  63. velocity_python-0.1.4/src/velocity/payment/router.py +0 -601
  64. velocity_python-0.1.4/src/velocity_python.egg-info/PKG-INFO +0 -1484
  65. velocity_python-0.1.4/tests/test_formbuilder_reshaper.py +0 -315
  66. velocity_python-0.1.4/tests/test_formbuilder_template_validator.py +0 -240
  67. velocity_python-0.1.4/tests/test_payment_demo_profiles.py +0 -58
  68. velocity_python-0.1.4/tests/test_payment_profiles.py +0 -72
  69. velocity_python-0.1.4/tests/test_payment_router.py +0 -107
  70. {velocity_python-0.1.4 → velocity_python-0.1.18}/LICENSE +0 -0
  71. {velocity_python-0.1.4 → velocity_python-0.1.18}/setup.cfg +0 -0
  72. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/__init__.py +0 -0
  73. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/amplify.py +0 -0
  74. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/amplify_build.py +0 -0
  75. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/__init__.py +0 -0
  76. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/context_factory.py +0 -0
  77. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/mixins/__init__.py +0 -0
  78. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/mixins/data_service.py +0 -0
  79. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/perf.py +0 -0
  80. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/response.py +0 -0
  81. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/handlers/sqs_handler.py +0 -0
  82. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/tests/__init__.py +0 -0
  83. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/tests/test_base_handler_error_response.py +0 -0
  84. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/tests/test_lambda_handler_json_serialization.py +0 -0
  85. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/aws/tests/test_response.py +0 -0
  86. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/__init__.py +0 -0
  87. {velocity_python-0.1.4/src/velocity/app → velocity_python-0.1.18/src/velocity/db/core}/__init__.py +0 -0
  88. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/core/column.py +0 -0
  89. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/core/database.py +0 -0
  90. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/core/sequence.py +0 -0
  91. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/core/view.py +0 -0
  92. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/exceptions.py +0 -0
  93. {velocity_python-0.1.4/src/velocity/db/core → velocity_python-0.1.18/src/velocity/db/servers}/__init__.py +0 -0
  94. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/base/__init__.py +0 -0
  95. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/base/initializer.py +0 -0
  96. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/base/operators.py +0 -0
  97. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/base/types.py +0 -0
  98. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/mysql/__init__.py +0 -0
  99. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/mysql/operators.py +0 -0
  100. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/mysql/reserved.py +0 -0
  101. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/mysql/types.py +0 -0
  102. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/postgres/__init__.py +0 -0
  103. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/postgres/operators.py +0 -0
  104. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/postgres/reserved.py +0 -0
  105. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/postgres/types.py +0 -0
  106. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/sqlite/__init__.py +0 -0
  107. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/sqlite/operators.py +0 -0
  108. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/sqlite/reserved.py +0 -0
  109. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/sqlite/types.py +0 -0
  110. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/sqlserver/__init__.py +0 -0
  111. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/sqlserver/operators.py +0 -0
  112. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/sqlserver/reserved.py +0 -0
  113. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/sqlserver/types.py +0 -0
  114. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/servers/tablehelper.py +0 -0
  115. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/__init__.py +0 -0
  116. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/common_db_test.py +0 -0
  117. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/__init__.py +0 -0
  118. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/common.py +0 -0
  119. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_column.py +0 -0
  120. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_connections.py +0 -0
  121. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_database.py +0 -0
  122. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_general_usage.py +0 -0
  123. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_imports.py +0 -0
  124. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_result.py +0 -0
  125. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_row.py +0 -0
  126. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_row_comprehensive.py +0 -0
  127. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_schema_locking.py +0 -0
  128. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_schema_locking_unit.py +0 -0
  129. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_sequence.py +0 -0
  130. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_sql_comprehensive.py +0 -0
  131. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_table.py +0 -0
  132. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_table_comprehensive.py +0 -0
  133. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/postgres/test_transaction.py +0 -0
  134. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/sql/__init__.py +0 -0
  135. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/sql/common.py +0 -0
  136. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/sql/test_postgres_select_advanced.py +0 -0
  137. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/sql/test_postgres_select_variances.py +0 -0
  138. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_cursor_rowcount_fix.py +0 -0
  139. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_db_utils.py +0 -0
  140. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_postgres.py +0 -0
  141. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_postgres_unchanged.py +0 -0
  142. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_result_caching.py +0 -0
  143. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_result_sql_aware.py +0 -0
  144. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_row_get_missing_column.py +0 -0
  145. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_schema_locking_initializers.py +0 -0
  146. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_schema_locking_simple.py +0 -0
  147. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_sql_builder.py +0 -0
  148. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_tablehelper.py +0 -0
  149. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/tests/test_view_helper.py +0 -0
  150. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/db/utils.py +0 -0
  151. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/logging.py +0 -0
  152. {velocity_python-0.1.4/src/velocity/db/servers → velocity_python-0.1.18/src/velocity/misc}/__init__.py +0 -0
  153. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/conv/__init__.py +0 -0
  154. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/conv/iconv.py +0 -0
  155. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/conv/oconv.py +0 -0
  156. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/db.py +0 -0
  157. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/export.py +0 -0
  158. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/format.py +0 -0
  159. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/mail.py +0 -0
  160. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/merge.py +0 -0
  161. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/tests/__init__.py +0 -0
  162. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/tests/test_db.py +0 -0
  163. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/tests/test_fix.py +0 -0
  164. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/tests/test_format.py +0 -0
  165. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/tests/test_iconv.py +0 -0
  166. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/tests/test_merge.py +0 -0
  167. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/tests/test_oconv.py +0 -0
  168. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/tests/test_original_error.py +0 -0
  169. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/tests/test_timer.py +0 -0
  170. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/timer.py +0 -0
  171. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/misc/tools.py +0 -0
  172. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity/payment/authorizenet_adapter.py +0 -0
  173. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity_python.egg-info/dependency_links.txt +0 -0
  174. {velocity_python-0.1.4 → velocity_python-0.1.18}/src/velocity_python.egg-info/top_level.txt +0 -0
  175. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_amplify_build.py +0 -0
  176. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_batch_operations.py +0 -0
  177. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_connection_resilience.py +0 -0
  178. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_decorators.py +0 -0
  179. {velocity_python-0.1.4/src/velocity/app → velocity_python-0.1.18}/tests/test_email_processing.py +0 -0
  180. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_iconv_money_to_cents.py +0 -0
  181. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_lambda_handler_auth.py +0 -0
  182. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_mixins_import.py +0 -0
  183. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_observability.py +0 -0
  184. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_payment_braintree_adapter.py +0 -0
  185. {velocity_python-0.1.4/src/velocity/app → velocity_python-0.1.18}/tests/test_payment_profile_sorting.py +0 -0
  186. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_prepared_statements.py +0 -0
  187. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_psycopg3_upgrade.py +0 -0
  188. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_query_cache.py +0 -0
  189. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_row_cache_staleness.py +0 -0
  190. {velocity_python-0.1.4/src/velocity/app → velocity_python-0.1.18}/tests/test_spreadsheet_functions.py +0 -0
  191. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_sqs_per_record_transactions.py +0 -0
  192. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_sys_modified_count_postgres_demo.py +0 -0
  193. {velocity_python-0.1.4 → velocity_python-0.1.18}/tests/test_table_alter.py +0 -0
@@ -0,0 +1,334 @@
1
+ Metadata-Version: 2.4
2
+ Name: velocity-python
3
+ Version: 0.1.18
4
+ Summary: A rapid application development library for interfacing with data storage
5
+ Author-email: Velocity Team <info@codeclubs.org>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://codeclubs.org/projects/velocity
8
+ Project-URL: Documentation, https://codeclubs.org/projects/velocity
9
+ Project-URL: Bug Tracker, https://codeclubs.org/projects/velocity
10
+ Keywords: database,orm,sql,rapid-development,data-storage
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Topic :: Database
14
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Operating System :: OS Independent
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: sqlparse>=0.5.0
25
+ Provides-Extra: aws
26
+ Requires-Dist: boto3>=1.35.0; extra == "aws"
27
+ Requires-Dist: requests>=2.32.0; extra == "aws"
28
+ Provides-Extra: excel
29
+ Requires-Dist: openpyxl>=3.1.0; extra == "excel"
30
+ Provides-Extra: templates
31
+ Requires-Dist: jinja2>=3.1.0; extra == "templates"
32
+ Provides-Extra: pdf
33
+ Requires-Dist: weasyprint>=62.0; extra == "pdf"
34
+ Provides-Extra: http
35
+ Requires-Dist: requests>=2.32.0; extra == "http"
36
+ Provides-Extra: mysql
37
+ Requires-Dist: mysql-connector-python>=9.0.0; extra == "mysql"
38
+ Provides-Extra: sqlserver
39
+ Requires-Dist: python-tds>=1.15.0; extra == "sqlserver"
40
+ Provides-Extra: postgres
41
+ Requires-Dist: psycopg[binary]>=3.2.0; extra == "postgres"
42
+ Provides-Extra: payment
43
+ Requires-Dist: stripe>=12.0.0; extra == "payment"
44
+ Requires-Dist: braintree>=4.30.0; extra == "payment"
45
+ Provides-Extra: all
46
+ Requires-Dist: velocity-python[aws,excel,http,payment,pdf,postgres,templates]; extra == "all"
47
+ Provides-Extra: dev
48
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
49
+ Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
50
+ Requires-Dist: pytest-asyncio>=1.0.0; extra == "dev"
51
+ Requires-Dist: black>=24.0.0; extra == "dev"
52
+ Requires-Dist: flake8>=7.0.0; extra == "dev"
53
+ Requires-Dist: mypy>=1.10.0; extra == "dev"
54
+ Requires-Dist: pre-commit>=4.0.0; extra == "dev"
55
+ Provides-Extra: test
56
+ Requires-Dist: pytest>=8.0.0; extra == "test"
57
+ Requires-Dist: pytest-cov>=6.0.0; extra == "test"
58
+ Requires-Dist: pytest-mock>=3.14.0; extra == "test"
59
+ Requires-Dist: pytest-asyncio>=1.0.0; extra == "test"
60
+ Provides-Extra: docs
61
+ Requires-Dist: sphinx>=8.0.0; extra == "docs"
62
+ Requires-Dist: sphinx-rtd-theme>=3.0.0; extra == "docs"
63
+ Dynamic: license-file
64
+
65
+ # Velocity-Python
66
+
67
+ A rapid application development library for Python that eliminates boilerplate between your code and your database. Write business logic, not SQL plumbing.
68
+
69
+ ```python
70
+ @engine.transaction
71
+ def create_order(tx, customer_email, items):
72
+ customer = tx.table("customers").find({"email": customer_email})
73
+ order = tx.table("orders").insert({
74
+ "customer_id": customer["sys_id"],
75
+ "status": "pending",
76
+ "total": sum(i["price"] for i in items),
77
+ })
78
+ tx.table("order_items").insert_many([
79
+ {"order_id": order["sys_id"], "product": i["name"], "price": i["price"]}
80
+ for i in items
81
+ ])
82
+ return order
83
+ ```
84
+
85
+ No connection management, no cursor juggling, no commit/rollback boilerplate. Velocity handles it all.
86
+
87
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
88
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)
89
+
90
+ ---
91
+
92
+ ## Why Velocity?
93
+
94
+ Most Python database libraries fall into two camps:
95
+
96
+ 1. **Heavy ORMs** (SQLAlchemy, Django ORM) — powerful but complex. You write Python classes that map to tables, manage sessions, deal with migration frameworks, and learn a large API surface before writing your first query.
97
+
98
+ 2. **Raw drivers** (psycopg, sqlite3) — full control, but you're writing SQL strings, managing connections, handling cursors, serializing parameters, and building your own transaction/error-handling patterns from scratch.
99
+
100
+ Velocity occupies the middle ground: **a thin, opinionated layer** that gives you the convenience of an ORM with the transparency of raw SQL. Tables are just names. Rows are just dicts. Transactions are just context managers. You don't define models — Velocity discovers your schema at runtime and adapts to it.
101
+
102
+ ### Design Principles
103
+
104
+ | Principle | What It Means |
105
+ |-----------|---------------|
106
+ | **Convention over configuration** | Sensible defaults everywhere. Override only what you need. |
107
+ | **Dicts in, dicts out** | No custom model classes to learn. Rows are dictionaries. |
108
+ | **Transaction-scoped** | Every operation runs inside an explicit transaction. No surprise autocommit. |
109
+ | **Auto-schema** | Tables and columns are created on the fly in development. Locked down in production. |
110
+ | **Driver-agnostic** | PostgreSQL (primary), MySQL, SQLite, SQL Server — same API surface. |
111
+ | **Lambda-native** | Connection pooling, warm-start reuse, and SQS batch handling built in. |
112
+
113
+ ---
114
+
115
+ ## Installation
116
+
117
+ ```bash
118
+ # Core (no database driver — useful for testing or SQLite)
119
+ pip install velocity-python
120
+
121
+ # PostgreSQL (recommended)
122
+ pip install velocity-python[postgres]
123
+
124
+ # With AWS Lambda support
125
+ pip install velocity-python[postgres,aws]
126
+
127
+ # Everything
128
+ pip install velocity-python[all]
129
+ ```
130
+
131
+ ### Available Extras
132
+
133
+ | Extra | Packages | Use Case |
134
+ |-------|----------|----------|
135
+ | `postgres` | `psycopg[binary]>=3.2.0` | PostgreSQL connections |
136
+ | `aws` | `boto3`, `requests` | Lambda handlers, SQS, Amplify |
137
+ | `excel` | `openpyxl` | Excel export |
138
+ | `templates` | `jinja2` | Template rendering |
139
+ | `http` | `requests` | HTTP utilities |
140
+ | `payment` | `stripe`, `braintree` | Payment processing |
141
+ | `mysql` | `mysql-connector-python` | MySQL connections |
142
+ | `sqlserver` | `python-tds` | SQL Server connections |
143
+ | `all` | All of the above | Full install |
144
+
145
+ **Requires Python 3.9+** and uses **psycopg v3** (not psycopg2) for PostgreSQL.
146
+
147
+ ---
148
+
149
+ ## Quick Start
150
+
151
+ ### 1. Connect
152
+
153
+ ```python
154
+ from velocity.db.servers.postgres import initialize
155
+
156
+ # From environment variables (DBHost, DBDatabase, DBUser, DBPassword)
157
+ engine = initialize()
158
+
159
+ # Or explicit config
160
+ engine = initialize(config={
161
+ "host": "localhost",
162
+ "dbname": "myapp",
163
+ "user": "postgres",
164
+ "password": "secret",
165
+ })
166
+ ```
167
+
168
+ ### 2. Use Transactions
169
+
170
+ ```python
171
+ # As a decorator (recommended for Lambda handlers)
172
+ @engine.transaction
173
+ def get_active_users(tx):
174
+ return tx.table("users").select(where={"active": True}).all()
175
+
176
+ # As a context manager
177
+ with engine.transaction() as tx:
178
+ tx.table("users").insert({"name": "Alice", "email": "alice@example.com"})
179
+ ```
180
+
181
+ ### 3. CRUD Operations
182
+
183
+ ```python
184
+ @engine.transaction
185
+ def demo(tx):
186
+ users = tx.table("users")
187
+
188
+ # Insert
189
+ row = users.insert({"name": "Bob", "email": "bob@example.com"})
190
+
191
+ # Read
192
+ user = users.row(row["sys_id"]) # by primary key
193
+ user = users.find({"email": "bob@example.com"}) # by lookup
194
+
195
+ # Update
196
+ user["name"] = "Robert" # immediate write-through
197
+
198
+ # Delete
199
+ users.delete({"sys_id": row["sys_id"]})
200
+ ```
201
+
202
+ ### 4. Bulk Operations
203
+
204
+ ```python
205
+ @engine.transaction
206
+ def import_customers(tx, records):
207
+ tx.table("customers").insert_many(records) # multi-row INSERT
208
+ tx.table("customers").upsert_many(records, pk="email") # INSERT ... ON CONFLICT UPDATE
209
+ ```
210
+
211
+ ---
212
+
213
+ ## Documentation
214
+
215
+ Full documentation is included in the `docs/` directory of the source distribution.
216
+
217
+ | Guide | File | Description |
218
+ |-------|------|-------------|
219
+ | Database ORM | `docs/database.md` | Connections, transactions, tables, rows, results, queries, schema management |
220
+ | Performance & Optimization | `docs/performance.md` | Connection pooling, batch operations, query caching, prepared statements, N+1 prevention, observability |
221
+ | Async Support | `docs/async.md` | AsyncTransaction, AsyncTable, AsyncResult, parallel queries with gather() |
222
+ | Configuration Reference | `docs/configuration.md` | All environment variables, engine options, and connection settings |
223
+ | AWS Lambda Handlers | `docs/aws-handlers.md` | LambdaHandler, SqsHandler, auth modes, per-record transactions |
224
+ | Payment Processing | `docs/payment.md` | Stripe and Braintree adapters, payment lifecycle |
225
+ | Utilities | `docs/utilities.md` | Excel export, data conversion, formatting, timers, email parsing |
226
+ | Testing Guide | `docs/TESTING.md` | Running tests, markers, coverage |
227
+ | Security | `docs/SECURITY.md` | Pre-commit hooks, credential scanning |
228
+
229
+ ---
230
+
231
+ ## Architecture
232
+
233
+ ```
234
+ Engine (singleton — survives Lambda warm starts)
235
+ ├── ConnectionPool (thread-safe, configurable min/max)
236
+ └── Transaction (one per request, borrows from pool)
237
+ ├── Table (CRUD, batch ops, schema management)
238
+ │ ├── Row (dict-like, lazy-cache, write-through, batch_update)
239
+ │ └── Result (streaming cursor iteration, transforms)
240
+ ├── View (create, grant, ensure)
241
+ └── Sequence (create, next, current, configure)
242
+ ```
243
+
244
+ Transactions auto-commit on success, auto-rollback on exception. Connections are returned to the pool (or discarded on error). The Engine persists across Lambda invocations, so the pool stays warm.
245
+
246
+ ---
247
+
248
+ ## Multi-Database Support
249
+
250
+ | Database | Driver | Status |
251
+ |----------|--------|--------|
252
+ | PostgreSQL | `psycopg[binary]>=3.2.0` | Primary, fully tested |
253
+ | MySQL | `mysql-connector-python` | Supported |
254
+ | SQLite | `sqlite3` (stdlib) | Supported |
255
+ | SQL Server | `python-tds` | Supported |
256
+
257
+ ```python
258
+ # PostgreSQL
259
+ from velocity.db.servers.postgres import initialize
260
+ engine = initialize()
261
+
262
+ # MySQL
263
+ from velocity.db.servers.mysql import initialize
264
+ engine = initialize()
265
+
266
+ # SQLite
267
+ from velocity.db.servers.sqlite import initialize
268
+ engine = initialize(config={"database": "myapp.db"})
269
+
270
+ # SQL Server
271
+ from velocity.db.servers.mssql import initialize
272
+ engine = initialize()
273
+ ```
274
+
275
+ ---
276
+
277
+ ## Project Structure
278
+
279
+ ```
280
+ velocity-python/
281
+ ├── src/velocity/
282
+ │ ├── db/
283
+ │ │ ├── core/
284
+ │ │ │ ├── engine.py # Engine, ConnectionPool
285
+ │ │ │ ├── transaction.py # Transaction, query timing, caching
286
+ │ │ │ ├── table.py # Table CRUD, batch ops, schema
287
+ │ │ │ ├── row.py # Row (dict-like ORM object)
288
+ │ │ │ ├── result.py # Result (cursor wrapper, transforms)
289
+ │ │ │ ├── async_support.py # Async versions of core classes
290
+ │ │ │ ├── view.py # View management
291
+ │ │ │ ├── sequence.py # Sequence management
292
+ │ │ │ └── decorators.py # @create_missing, @return_default, etc.
293
+ │ │ └── servers/
294
+ │ │ ├── postgres/ # PostgreSQL dialect + initializer
295
+ │ │ ├── mysql/ # MySQL dialect
296
+ │ │ ├── sqlite/ # SQLite dialect
297
+ │ │ └── mssql/ # SQL Server dialect
298
+ │ ├── aws/
299
+ │ │ └── handlers/
300
+ │ │ ├── lambda_handler.py # HTTP Lambda handler
301
+ │ │ └── sqs_handler.py # SQS batch handler
302
+ │ ├── payment/
303
+ │ │ ├── base_adapter.py # Abstract payment interface
304
+ │ │ ├── stripe_adapter.py # Stripe implementation
305
+ │ │ └── braintree_adapter.py # Braintree implementation
306
+ │ └── misc/ # Utility modules
307
+ ├── tests/ # 400+ unit tests
308
+ ├── docs/ # Detailed documentation
309
+ └── pyproject.toml
310
+ ```
311
+
312
+ ---
313
+
314
+ ## Development
315
+
316
+ ```bash
317
+ # Install with dev dependencies
318
+ pip install -e ".[dev,test,postgres]"
319
+
320
+ # Run tests
321
+ pytest
322
+
323
+ # Run with coverage
324
+ pytest --cov=velocity --cov-report=html
325
+
326
+ # Run specific test file
327
+ pytest tests/test_connection_pool.py -v
328
+ ```
329
+
330
+ ---
331
+
332
+ ## License
333
+
334
+ MIT
@@ -0,0 +1,270 @@
1
+ # Velocity-Python
2
+
3
+ A rapid application development library for Python that eliminates boilerplate between your code and your database. Write business logic, not SQL plumbing.
4
+
5
+ ```python
6
+ @engine.transaction
7
+ def create_order(tx, customer_email, items):
8
+ customer = tx.table("customers").find({"email": customer_email})
9
+ order = tx.table("orders").insert({
10
+ "customer_id": customer["sys_id"],
11
+ "status": "pending",
12
+ "total": sum(i["price"] for i in items),
13
+ })
14
+ tx.table("order_items").insert_many([
15
+ {"order_id": order["sys_id"], "product": i["name"], "price": i["price"]}
16
+ for i in items
17
+ ])
18
+ return order
19
+ ```
20
+
21
+ No connection management, no cursor juggling, no commit/rollback boilerplate. Velocity handles it all.
22
+
23
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
24
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)
25
+
26
+ ---
27
+
28
+ ## Why Velocity?
29
+
30
+ Most Python database libraries fall into two camps:
31
+
32
+ 1. **Heavy ORMs** (SQLAlchemy, Django ORM) — powerful but complex. You write Python classes that map to tables, manage sessions, deal with migration frameworks, and learn a large API surface before writing your first query.
33
+
34
+ 2. **Raw drivers** (psycopg, sqlite3) — full control, but you're writing SQL strings, managing connections, handling cursors, serializing parameters, and building your own transaction/error-handling patterns from scratch.
35
+
36
+ Velocity occupies the middle ground: **a thin, opinionated layer** that gives you the convenience of an ORM with the transparency of raw SQL. Tables are just names. Rows are just dicts. Transactions are just context managers. You don't define models — Velocity discovers your schema at runtime and adapts to it.
37
+
38
+ ### Design Principles
39
+
40
+ | Principle | What It Means |
41
+ |-----------|---------------|
42
+ | **Convention over configuration** | Sensible defaults everywhere. Override only what you need. |
43
+ | **Dicts in, dicts out** | No custom model classes to learn. Rows are dictionaries. |
44
+ | **Transaction-scoped** | Every operation runs inside an explicit transaction. No surprise autocommit. |
45
+ | **Auto-schema** | Tables and columns are created on the fly in development. Locked down in production. |
46
+ | **Driver-agnostic** | PostgreSQL (primary), MySQL, SQLite, SQL Server — same API surface. |
47
+ | **Lambda-native** | Connection pooling, warm-start reuse, and SQS batch handling built in. |
48
+
49
+ ---
50
+
51
+ ## Installation
52
+
53
+ ```bash
54
+ # Core (no database driver — useful for testing or SQLite)
55
+ pip install velocity-python
56
+
57
+ # PostgreSQL (recommended)
58
+ pip install velocity-python[postgres]
59
+
60
+ # With AWS Lambda support
61
+ pip install velocity-python[postgres,aws]
62
+
63
+ # Everything
64
+ pip install velocity-python[all]
65
+ ```
66
+
67
+ ### Available Extras
68
+
69
+ | Extra | Packages | Use Case |
70
+ |-------|----------|----------|
71
+ | `postgres` | `psycopg[binary]>=3.2.0` | PostgreSQL connections |
72
+ | `aws` | `boto3`, `requests` | Lambda handlers, SQS, Amplify |
73
+ | `excel` | `openpyxl` | Excel export |
74
+ | `templates` | `jinja2` | Template rendering |
75
+ | `http` | `requests` | HTTP utilities |
76
+ | `payment` | `stripe`, `braintree` | Payment processing |
77
+ | `mysql` | `mysql-connector-python` | MySQL connections |
78
+ | `sqlserver` | `python-tds` | SQL Server connections |
79
+ | `all` | All of the above | Full install |
80
+
81
+ **Requires Python 3.9+** and uses **psycopg v3** (not psycopg2) for PostgreSQL.
82
+
83
+ ---
84
+
85
+ ## Quick Start
86
+
87
+ ### 1. Connect
88
+
89
+ ```python
90
+ from velocity.db.servers.postgres import initialize
91
+
92
+ # From environment variables (DBHost, DBDatabase, DBUser, DBPassword)
93
+ engine = initialize()
94
+
95
+ # Or explicit config
96
+ engine = initialize(config={
97
+ "host": "localhost",
98
+ "dbname": "myapp",
99
+ "user": "postgres",
100
+ "password": "secret",
101
+ })
102
+ ```
103
+
104
+ ### 2. Use Transactions
105
+
106
+ ```python
107
+ # As a decorator (recommended for Lambda handlers)
108
+ @engine.transaction
109
+ def get_active_users(tx):
110
+ return tx.table("users").select(where={"active": True}).all()
111
+
112
+ # As a context manager
113
+ with engine.transaction() as tx:
114
+ tx.table("users").insert({"name": "Alice", "email": "alice@example.com"})
115
+ ```
116
+
117
+ ### 3. CRUD Operations
118
+
119
+ ```python
120
+ @engine.transaction
121
+ def demo(tx):
122
+ users = tx.table("users")
123
+
124
+ # Insert
125
+ row = users.insert({"name": "Bob", "email": "bob@example.com"})
126
+
127
+ # Read
128
+ user = users.row(row["sys_id"]) # by primary key
129
+ user = users.find({"email": "bob@example.com"}) # by lookup
130
+
131
+ # Update
132
+ user["name"] = "Robert" # immediate write-through
133
+
134
+ # Delete
135
+ users.delete({"sys_id": row["sys_id"]})
136
+ ```
137
+
138
+ ### 4. Bulk Operations
139
+
140
+ ```python
141
+ @engine.transaction
142
+ def import_customers(tx, records):
143
+ tx.table("customers").insert_many(records) # multi-row INSERT
144
+ tx.table("customers").upsert_many(records, pk="email") # INSERT ... ON CONFLICT UPDATE
145
+ ```
146
+
147
+ ---
148
+
149
+ ## Documentation
150
+
151
+ Full documentation is included in the `docs/` directory of the source distribution.
152
+
153
+ | Guide | File | Description |
154
+ |-------|------|-------------|
155
+ | Database ORM | `docs/database.md` | Connections, transactions, tables, rows, results, queries, schema management |
156
+ | Performance & Optimization | `docs/performance.md` | Connection pooling, batch operations, query caching, prepared statements, N+1 prevention, observability |
157
+ | Async Support | `docs/async.md` | AsyncTransaction, AsyncTable, AsyncResult, parallel queries with gather() |
158
+ | Configuration Reference | `docs/configuration.md` | All environment variables, engine options, and connection settings |
159
+ | AWS Lambda Handlers | `docs/aws-handlers.md` | LambdaHandler, SqsHandler, auth modes, per-record transactions |
160
+ | Payment Processing | `docs/payment.md` | Stripe and Braintree adapters, payment lifecycle |
161
+ | Utilities | `docs/utilities.md` | Excel export, data conversion, formatting, timers, email parsing |
162
+ | Testing Guide | `docs/TESTING.md` | Running tests, markers, coverage |
163
+ | Security | `docs/SECURITY.md` | Pre-commit hooks, credential scanning |
164
+
165
+ ---
166
+
167
+ ## Architecture
168
+
169
+ ```
170
+ Engine (singleton — survives Lambda warm starts)
171
+ ├── ConnectionPool (thread-safe, configurable min/max)
172
+ └── Transaction (one per request, borrows from pool)
173
+ ├── Table (CRUD, batch ops, schema management)
174
+ │ ├── Row (dict-like, lazy-cache, write-through, batch_update)
175
+ │ └── Result (streaming cursor iteration, transforms)
176
+ ├── View (create, grant, ensure)
177
+ └── Sequence (create, next, current, configure)
178
+ ```
179
+
180
+ Transactions auto-commit on success, auto-rollback on exception. Connections are returned to the pool (or discarded on error). The Engine persists across Lambda invocations, so the pool stays warm.
181
+
182
+ ---
183
+
184
+ ## Multi-Database Support
185
+
186
+ | Database | Driver | Status |
187
+ |----------|--------|--------|
188
+ | PostgreSQL | `psycopg[binary]>=3.2.0` | Primary, fully tested |
189
+ | MySQL | `mysql-connector-python` | Supported |
190
+ | SQLite | `sqlite3` (stdlib) | Supported |
191
+ | SQL Server | `python-tds` | Supported |
192
+
193
+ ```python
194
+ # PostgreSQL
195
+ from velocity.db.servers.postgres import initialize
196
+ engine = initialize()
197
+
198
+ # MySQL
199
+ from velocity.db.servers.mysql import initialize
200
+ engine = initialize()
201
+
202
+ # SQLite
203
+ from velocity.db.servers.sqlite import initialize
204
+ engine = initialize(config={"database": "myapp.db"})
205
+
206
+ # SQL Server
207
+ from velocity.db.servers.mssql import initialize
208
+ engine = initialize()
209
+ ```
210
+
211
+ ---
212
+
213
+ ## Project Structure
214
+
215
+ ```
216
+ velocity-python/
217
+ ├── src/velocity/
218
+ │ ├── db/
219
+ │ │ ├── core/
220
+ │ │ │ ├── engine.py # Engine, ConnectionPool
221
+ │ │ │ ├── transaction.py # Transaction, query timing, caching
222
+ │ │ │ ├── table.py # Table CRUD, batch ops, schema
223
+ │ │ │ ├── row.py # Row (dict-like ORM object)
224
+ │ │ │ ├── result.py # Result (cursor wrapper, transforms)
225
+ │ │ │ ├── async_support.py # Async versions of core classes
226
+ │ │ │ ├── view.py # View management
227
+ │ │ │ ├── sequence.py # Sequence management
228
+ │ │ │ └── decorators.py # @create_missing, @return_default, etc.
229
+ │ │ └── servers/
230
+ │ │ ├── postgres/ # PostgreSQL dialect + initializer
231
+ │ │ ├── mysql/ # MySQL dialect
232
+ │ │ ├── sqlite/ # SQLite dialect
233
+ │ │ └── mssql/ # SQL Server dialect
234
+ │ ├── aws/
235
+ │ │ └── handlers/
236
+ │ │ ├── lambda_handler.py # HTTP Lambda handler
237
+ │ │ └── sqs_handler.py # SQS batch handler
238
+ │ ├── payment/
239
+ │ │ ├── base_adapter.py # Abstract payment interface
240
+ │ │ ├── stripe_adapter.py # Stripe implementation
241
+ │ │ └── braintree_adapter.py # Braintree implementation
242
+ │ └── misc/ # Utility modules
243
+ ├── tests/ # 400+ unit tests
244
+ ├── docs/ # Detailed documentation
245
+ └── pyproject.toml
246
+ ```
247
+
248
+ ---
249
+
250
+ ## Development
251
+
252
+ ```bash
253
+ # Install with dev dependencies
254
+ pip install -e ".[dev,test,postgres]"
255
+
256
+ # Run tests
257
+ pytest
258
+
259
+ # Run with coverage
260
+ pytest --cov=velocity --cov-report=html
261
+
262
+ # Run specific test file
263
+ pytest tests/test_connection_pool.py -v
264
+ ```
265
+
266
+ ---
267
+
268
+ ## License
269
+
270
+ MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "velocity-python"
7
- version = "0.1.4"
7
+ version = "0.1.18"
8
8
  authors = [
9
9
  { name="Velocity Team", email="info@codeclubs.org" },
10
10
  ]
@@ -29,8 +29,13 @@ dependencies = [
29
29
  "sqlparse>=0.5.0"
30
30
  ]
31
31
 
32
+ [project.scripts]
33
+ velocity = "velocity.db.migrations:cli"
34
+
32
35
  [project.urls]
33
36
  Homepage = "https://codeclubs.org/projects/velocity"
37
+ Documentation = "https://codeclubs.org/projects/velocity"
38
+ "Bug Tracker" = "https://codeclubs.org/projects/velocity"
34
39
 
35
40
  [project.optional-dependencies]
36
41
  aws = [
@@ -43,6 +48,9 @@ excel = [
43
48
  templates = [
44
49
  "jinja2>=3.1.0",
45
50
  ]
51
+ pdf = [
52
+ "weasyprint>=62.0",
53
+ ]
46
54
  http = [
47
55
  "requests>=2.32.0",
48
56
  ]
@@ -60,11 +68,12 @@ payment = [
60
68
  "braintree>=4.30.0",
61
69
  ]
62
70
  all = [
63
- "velocity-python[postgres,aws,excel,templates,http,payment]",
71
+ "velocity-python[postgres,aws,excel,templates,http,payment,pdf]",
64
72
  ]
65
73
  dev = [
66
74
  "pytest>=8.0.0",
67
75
  "pytest-cov>=6.0.0",
76
+ "pytest-asyncio>=1.0.0",
68
77
  "black>=24.0.0",
69
78
  "flake8>=7.0.0",
70
79
  "mypy>=1.10.0",
@@ -74,6 +83,7 @@ test = [
74
83
  "pytest>=8.0.0",
75
84
  "pytest-cov>=6.0.0",
76
85
  "pytest-mock>=3.14.0",
86
+ "pytest-asyncio>=1.0.0",
77
87
  ]
78
88
  docs = [
79
89
  "sphinx>=8.0.0",
@@ -1,12 +1,11 @@
1
- __version__ = version = "0.1.4"
1
+ __version__ = version = "0.1.18"
2
2
 
3
3
  import importlib as _importlib
4
4
 
5
5
  from . import db
6
6
  from . import misc
7
- from . import app
8
7
 
9
- __all__ = ["aws", "db", "misc", "app"]
8
+ __all__ = ["aws", "db", "misc"]
10
9
 
11
10
  _LAZY_SUBMODULES = {"aws"}
12
11
 
@@ -239,15 +239,16 @@ class BaseHandler:
239
239
  or "error"
240
240
  )
241
241
 
242
- logger.warning(
243
- "AlertError during action execution",
244
- exc_info=True,
245
- extra={
246
- "handler": self.__class__.__name__,
247
- "action": getattr(local_context, "action", lambda: None)(),
248
- "tx_present": tx is not None,
249
- },
250
- )
242
+ if getattr(exception, "log_to_cloudwatch", False):
243
+ logger.warning(
244
+ "AlertError during action execution",
245
+ exc_info=True,
246
+ extra={
247
+ "handler": self.__class__.__name__,
248
+ "action": getattr(local_context, "action", lambda: None)(),
249
+ "tx_present": tx is not None,
250
+ },
251
+ )
251
252
 
252
253
  # Default behavior: raising AlertError surfaces a UI alert.
253
254
  # If `toast: true` is present in the payload, show a toast instead.