python-corekit 0.6.0__tar.gz → 0.6.1__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 (244) hide show
  1. {python_corekit-0.6.0/python_corekit.egg-info → python_corekit-0.6.1}/PKG-INFO +1 -1
  2. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/connection.py +25 -3
  3. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/operations/statements.py +12 -0
  4. {python_corekit-0.6.0 → python_corekit-0.6.1}/pyproject.toml +1 -1
  5. {python_corekit-0.6.0 → python_corekit-0.6.1/python_corekit.egg-info}/PKG-INFO +1 -1
  6. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_operations.py +8 -0
  7. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_sql.py +26 -0
  8. {python_corekit-0.6.0 → python_corekit-0.6.1}/LICENSE +0 -0
  9. {python_corekit-0.6.0 → python_corekit-0.6.1}/README.md +0 -0
  10. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/__init__.py +0 -0
  11. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/api/__init__.py +0 -0
  12. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/api/application.py +0 -0
  13. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/api/handler.py +0 -0
  14. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/api/lifespan.py +0 -0
  15. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/api/middleware.py +0 -0
  16. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/api/responses.py +0 -0
  17. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/api/routers.py +0 -0
  18. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/concurrency/__init__.py +0 -0
  19. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/concurrency/decorators.py +0 -0
  20. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/concurrency/thread_local.py +0 -0
  21. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/concurrency/worker.py +0 -0
  22. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/config/__init__.py +0 -0
  23. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/config/loader.py +0 -0
  24. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/config/settings.py +0 -0
  25. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/config/sources.py +0 -0
  26. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/__init__.py +0 -0
  27. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/connectable.py +0 -0
  28. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/decorators.py +0 -0
  29. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/redis/__init__.py +0 -0
  30. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/redis/connection.py +0 -0
  31. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/registry.py +0 -0
  32. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/__init__.py +0 -0
  33. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/fields/__init__.py +0 -0
  34. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/fields/jsonb.py +0 -0
  35. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/migration/__init__.py +0 -0
  36. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/migration/base.py +0 -0
  37. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/migration/operations.py +0 -0
  38. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/migration/registry.py +0 -0
  39. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/migration/table.py +0 -0
  40. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/operations/__init__.py +0 -0
  41. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/operations/base.py +0 -0
  42. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/query.py +0 -0
  43. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/connections/sql/table.py +0 -0
  44. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/crypto/__init__.py +0 -0
  45. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/crypto/constants.py +0 -0
  46. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/crypto/enum.py +0 -0
  47. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/crypto/hasher.py +0 -0
  48. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/data/__init__.py +0 -0
  49. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/data/dataset.py +0 -0
  50. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/data/expressions/__init__.py +0 -0
  51. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/data/expressions/comparison.py +0 -0
  52. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/data/expressions/expression.py +0 -0
  53. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/data/expressions/operator.py +0 -0
  54. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/data/expressions/target.py +0 -0
  55. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/data/record.py +0 -0
  56. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/data/stats.py +0 -0
  57. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/decorators/__init__.py +0 -0
  58. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/decorators/exception_handling.py +0 -0
  59. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/decorators/warnings.py +0 -0
  60. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/docker/__init__.py +0 -0
  61. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/docker/client.py +0 -0
  62. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/docker/constants.py +0 -0
  63. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/docker/disk/__init__.py +0 -0
  64. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/docker/disk/constants.py +0 -0
  65. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/docker/disk/inspector.py +0 -0
  66. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/docker/disk/models.py +0 -0
  67. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/docker/watchdog.py +0 -0
  68. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/__init__.py +0 -0
  69. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/connection.py +0 -0
  70. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/extract/__init__.py +0 -0
  71. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/extract/extractor.py +0 -0
  72. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/extract/schemas.py +0 -0
  73. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/load/__init__.py +0 -0
  74. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/load/loader.py +0 -0
  75. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/load/schemas.py +0 -0
  76. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/orchestrator.py +0 -0
  77. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/schemas.py +0 -0
  78. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/transform/__init__.py +0 -0
  79. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/transform/schemas.py +0 -0
  80. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/etl/transform/transformer.py +0 -0
  81. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/events/__init__.py +0 -0
  82. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/events/enum.py +0 -0
  83. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/events/frames.py +0 -0
  84. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/events/models.py +0 -0
  85. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/events/publisher.py +0 -0
  86. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/events/reader.py +0 -0
  87. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/events/sse.py +0 -0
  88. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/events/websocket.py +0 -0
  89. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptionator/__init__.py +0 -0
  90. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptionator/actions.py +0 -0
  91. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptionator/asgi.py +0 -0
  92. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptionator/constants.py +0 -0
  93. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptionator/exceptionator.py +0 -0
  94. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptionator/fingerprint.py +0 -0
  95. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptionator/guard.py +0 -0
  96. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptionator/jobs.py +0 -0
  97. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptionator/models.py +0 -0
  98. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptions/__init__.py +0 -0
  99. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptions/base.py +0 -0
  100. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptions/custom/__init__.py +0 -0
  101. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptions/enum.py +0 -0
  102. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptions/http/__init__.py +0 -0
  103. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/exceptions/types.py +0 -0
  104. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/files/__init__.py +0 -0
  105. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/files/base.py +0 -0
  106. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/files/disk.py +0 -0
  107. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/files/enum.py +0 -0
  108. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/files/json.py +0 -0
  109. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/files/toml.py +0 -0
  110. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/html/__init__.py +0 -0
  111. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/html/client.py +0 -0
  112. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/html/models.py +0 -0
  113. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/html/parser.py +0 -0
  114. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/html/scraper.py +0 -0
  115. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/html/settings.py +0 -0
  116. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/html/state.py +0 -0
  117. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/http/__init__.py +0 -0
  118. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/http/api.py +0 -0
  119. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/http/client.py +0 -0
  120. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/http/exceptions.py +0 -0
  121. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/http/exponential_backoff.py +0 -0
  122. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/http/response.py +0 -0
  123. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/http/status.py +0 -0
  124. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/http/stream.py +0 -0
  125. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/jobs/__init__.py +0 -0
  126. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/jobs/registry.py +0 -0
  127. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/jobs/runner.py +0 -0
  128. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/jobs/task.py +0 -0
  129. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/__init__.py +0 -0
  130. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/client.py +0 -0
  131. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/enum.py +0 -0
  132. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/events.py +0 -0
  133. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/messages.py +0 -0
  134. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/prompts/__init__.py +0 -0
  135. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/prompts/enum.py +0 -0
  136. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/prompts/exceptions.py +0 -0
  137. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/prompts/loader.py +0 -0
  138. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/prompts/template.py +0 -0
  139. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/protocols.py +0 -0
  140. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/streaming.py +0 -0
  141. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/tools/__init__.py +0 -0
  142. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/tools/base.py +0 -0
  143. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/tools/detection.py +0 -0
  144. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/tools/loop.py +0 -0
  145. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/tools/registry.py +0 -0
  146. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/llm/wire.py +0 -0
  147. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/log_monitor/__init__.py +0 -0
  148. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/log_monitor/constants.py +0 -0
  149. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/log_monitor/models.py +0 -0
  150. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/log_monitor/service.py +0 -0
  151. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/notifications/__init__.py +0 -0
  152. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/notifications/base.py +0 -0
  153. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/notifications/models.py +0 -0
  154. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/observability/__init__.py +0 -0
  155. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/observability/benchmarkable.py +0 -0
  156. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/observability/loggable.py +0 -0
  157. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/observability/request_context.py +0 -0
  158. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/observability/timing/__init__.py +0 -0
  159. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/observability/timing/constants.py +0 -0
  160. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/observability/timing/split.py +0 -0
  161. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/observability/timing/timer.py +0 -0
  162. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/process/__init__.py +0 -0
  163. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/process/runner.py +0 -0
  164. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/py.typed +0 -0
  165. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/registry/__init__.py +0 -0
  166. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/registry/ordered.py +0 -0
  167. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/registry/registry.py +0 -0
  168. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/schemas/__init__.py +0 -0
  169. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/schemas/dataclasses/__init__.py +0 -0
  170. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/schemas/enum.py +0 -0
  171. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/schemas/models/__init__.py +0 -0
  172. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/schemas/models/arbitrary.py +0 -0
  173. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/schemas/models/date_models.py +0 -0
  174. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/schemas/pydantic/__init__.py +0 -0
  175. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/schemas/pydantic/fields.py +0 -0
  176. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/schemas/size.py +0 -0
  177. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/schemas/types.py +0 -0
  178. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/schemas/version.py +0 -0
  179. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/serialization/__init__.py +0 -0
  180. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/serialization/enum.py +0 -0
  181. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/serialization/pickle_file.py +0 -0
  182. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/serialization/serializable.py +0 -0
  183. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/serialization/serializer.py +0 -0
  184. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/utils/__init__.py +0 -0
  185. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/utils/coercion.py +0 -0
  186. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/utils/collections.py +0 -0
  187. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/utils/ids.py +0 -0
  188. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/utils/parsers.py +0 -0
  189. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/utils/payload.py +0 -0
  190. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/utils/raise_exc.py +0 -0
  191. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/utils/text.py +0 -0
  192. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/utils/time.py +0 -0
  193. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/utils/validators.py +0 -0
  194. {python_corekit-0.6.0 → python_corekit-0.6.1}/corekit/utils/void.py +0 -0
  195. {python_corekit-0.6.0 → python_corekit-0.6.1}/python_corekit.egg-info/SOURCES.txt +0 -0
  196. {python_corekit-0.6.0 → python_corekit-0.6.1}/python_corekit.egg-info/dependency_links.txt +0 -0
  197. {python_corekit-0.6.0 → python_corekit-0.6.1}/python_corekit.egg-info/requires.txt +0 -0
  198. {python_corekit-0.6.0 → python_corekit-0.6.1}/python_corekit.egg-info/top_level.txt +0 -0
  199. {python_corekit-0.6.0 → python_corekit-0.6.1}/setup.cfg +0 -0
  200. {python_corekit-0.6.0 → python_corekit-0.6.1}/setup.py +0 -0
  201. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_api.py +0 -0
  202. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_application.py +0 -0
  203. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_architecture.py +0 -0
  204. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_concurrency.py +0 -0
  205. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_config.py +0 -0
  206. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_connections.py +0 -0
  207. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_data.py +0 -0
  208. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_docker.py +0 -0
  209. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_etl.py +0 -0
  210. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_events.py +0 -0
  211. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_exceptionator.py +0 -0
  212. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_exceptions.py +0 -0
  213. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_expressions.py +0 -0
  214. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_expressions_sqlalchemy.py +0 -0
  215. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_files.py +0 -0
  216. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_html.py +0 -0
  217. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_imports.py +0 -0
  218. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_imports_are_top_level.py +0 -0
  219. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_jobs.py +0 -0
  220. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_lifespan.py +0 -0
  221. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_llm.py +0 -0
  222. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_log_monitor.py +0 -0
  223. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_middleware_stack.py +0 -0
  224. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_migration.py +0 -0
  225. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_notifications.py +0 -0
  226. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_observability.py +0 -0
  227. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_ordered_registry.py +0 -0
  228. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_process.py +0 -0
  229. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_redis.py +0 -0
  230. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_registry.py +0 -0
  231. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_request_context.py +0 -0
  232. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_requests.py +0 -0
  233. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_schemas_arbitrary.py +0 -0
  234. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_schemas_enum.py +0 -0
  235. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_schemas_size.py +0 -0
  236. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_serialization.py +0 -0
  237. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_utils.py +0 -0
  238. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_utils_coercion.py +0 -0
  239. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_utils_collections.py +0 -0
  240. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_utils_ids.py +0 -0
  241. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_utils_parsers.py +0 -0
  242. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_utils_payload.py +0 -0
  243. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_utils_text.py +0 -0
  244. {python_corekit-0.6.0 → python_corekit-0.6.1}/tests/test_utils_time.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-corekit
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Shared foundations for Python projects: logging, benchmarking, registries, FastAPI application and routers, SQL statements and migrations, background tasks, ETL, LLM chat/tool primitives, and HTML scraping
5
5
  Author: Steven Jacobsen
6
6
  License-Expression: MIT
@@ -220,14 +220,36 @@ class SQLConnection(Connectable):
220
220
  # Writes
221
221
  # =============
222
222
 
223
- def insert(self, *items: Any) -> None:
223
+ def add(self, *items: Any) -> None:
224
224
  """
225
- Insert new rows.
225
+ Stage rows in the open transaction. Call commit to keep them.
226
226
  """
227
227
  self.require_writable()
228
228
  self._start_session()
229
229
  self.session.add_all(items)
230
- self.session.commit()
230
+
231
+ def flush(self) -> None:
232
+ """
233
+ Send staged rows to the database without ending the transaction.
234
+ """
235
+ self.require_writable()
236
+ self._start_session()
237
+ self.session.flush()
238
+
239
+ def commit(self) -> None:
240
+ """
241
+ Persist the open transaction.
242
+ """
243
+ self.require_writable()
244
+ if self._session is not None:
245
+ self._session.commit()
246
+
247
+ def insert(self, *items: Any) -> None:
248
+ """
249
+ Insert new rows.
250
+ """
251
+ self.add(*items)
252
+ self.commit()
231
253
 
232
254
  def upsert(self, *items: Any) -> None:
233
255
  """
@@ -28,12 +28,14 @@ class Select(DqlOperation):
28
28
  Select(table=User).where(Field("age") >= 18)
29
29
 
30
30
  ``limit(-1)`` means no cap. ``limit(0)`` returns no rows.
31
+ ``for_update`` locks the matching rows until the transaction ends.
31
32
  """
32
33
 
33
34
  order_by_field: Any = None
34
35
  order_by_desc: bool = False
35
36
  limit_count: int = -1
36
37
  offset_count: int = 0
38
+ for_update_lock: bool = False
37
39
 
38
40
  def order_by(self, field: Any, desc: bool = False) -> "Select":
39
41
  """
@@ -59,6 +61,13 @@ class Select(DqlOperation):
59
61
  self.offset_count = offset
60
62
  return self
61
63
 
64
+ def for_update(self) -> "Select":
65
+ """
66
+ Lock the matching rows until the transaction ends.
67
+ """
68
+ self.for_update_lock = True
69
+ return self
70
+
62
71
  def build(self) -> Any:
63
72
  """
64
73
  Produce the select statement.
@@ -77,6 +86,9 @@ class Select(DqlOperation):
77
86
  if self.limit_count >= 0:
78
87
  statement = statement.limit(self.limit_count)
79
88
 
89
+ if self.for_update_lock:
90
+ statement = statement.with_for_update()
91
+
80
92
  return statement
81
93
 
82
94
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-corekit"
7
- version = "0.6.0"
7
+ version = "0.6.1"
8
8
  description = "Shared foundations for Python projects: logging, benchmarking, registries, FastAPI application and routers, SQL statements and migrations, background tasks, ETL, LLM chat/tool primitives, and HTML scraping"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-corekit
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Shared foundations for Python projects: logging, benchmarking, registries, FastAPI application and routers, SQL statements and migrations, background tasks, ETL, LLM chat/tool primitives, and HTML scraping
5
5
  Author: Steven Jacobsen
6
6
  License-Expression: MIT
@@ -6,6 +6,7 @@ not execute is not evidence of anything.
6
6
  """
7
7
 
8
8
  import pytest
9
+ from sqlalchemy.dialects import postgresql
9
10
  from sqlmodel import Field as SQLField
10
11
  from sqlmodel import Session, SQLModel, create_engine, select
11
12
 
@@ -160,6 +161,13 @@ def test_select_offset_skips_rows(session: Session) -> None:
160
161
  assert [p.name for p in session.exec(statement.build()).all()] == ["Cy"]
161
162
 
162
163
 
164
+ def test_for_update_locks_the_selected_rows(session: Session) -> None:
165
+ statement = Select(table=Person).where(Person.name == "Ada").for_update()
166
+ sql = str(statement.build().compile(dialect=postgresql.dialect()))
167
+ assert "FOR UPDATE" in sql
168
+ assert [person.name for person in session.exec(statement.build()).all()] == ["Ada"]
169
+
170
+
163
171
  def test_conditions_combine_with_and(session: Session) -> None:
164
172
  run(session, Delete(table=Person).where(Field("age") > 15).where(Field("age") < 50))
165
173
  assert [name for name, _, _ in rows(session)] == sorted(["Bob", INJECTION])
@@ -158,6 +158,32 @@ class TestQuery:
158
158
  db.insert(Person(id="a", age=30))
159
159
  assert db.fetch_one_by_query(Query(table=Person).where(Person.age == 30)).id == "a"
160
160
 
161
+ def test_for_update_returns_the_locked_row(self, db: SQLConnection) -> None:
162
+ db.insert(Person(id="a", age=30))
163
+ row = db.fetch_one_by_query(Query(table=Person).where(Person.id == "a").for_update())
164
+ assert row is not None
165
+ assert row.age == 30
166
+
167
+
168
+ class TestTransaction:
169
+ def test_add_is_discarded_by_rollback(self, db: SQLConnection) -> None:
170
+ db.add(Person(id="ada", age=36))
171
+ db.flush()
172
+ assert db.fetch_one_by_id(Person, "ada") is not None
173
+ db.rollback()
174
+ assert db.fetch_one_by_id(Person, "ada") is None
175
+
176
+ def test_commit_keeps_a_staged_row_and_a_change(self, db: SQLConnection) -> None:
177
+ db.add(Person(id="ada", age=36))
178
+ db.commit()
179
+ person = db.fetch_one_by_id(Person, "ada")
180
+ assert person is not None
181
+ person.age = 37
182
+ db.commit()
183
+ db.disconnect()
184
+ db.connect()
185
+ assert db.fetch_one_by_id(Person, "ada").age == 37
186
+
161
187
 
162
188
  class TestPagination:
163
189
  def test_page_and_total(self, db: SQLConnection) -> None:
File without changes
File without changes
File without changes
File without changes