python-corekit 0.6.0__tar.gz → 0.6.2__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.2}/PKG-INFO +1 -1
  2. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/connection.py +25 -3
  3. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/operations/statements.py +12 -0
  4. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/data/__init__.py +2 -0
  5. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/data/expressions/__init__.py +2 -0
  6. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/data/expressions/comparison.py +31 -0
  7. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/data/expressions/operator.py +1 -0
  8. {python_corekit-0.6.0 → python_corekit-0.6.2}/pyproject.toml +1 -1
  9. {python_corekit-0.6.0 → python_corekit-0.6.2/python_corekit.egg-info}/PKG-INFO +1 -1
  10. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_expressions.py +8 -0
  11. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_expressions_sqlalchemy.py +23 -0
  12. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_operations.py +8 -0
  13. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_sql.py +26 -0
  14. {python_corekit-0.6.0 → python_corekit-0.6.2}/LICENSE +0 -0
  15. {python_corekit-0.6.0 → python_corekit-0.6.2}/README.md +0 -0
  16. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/__init__.py +0 -0
  17. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/api/__init__.py +0 -0
  18. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/api/application.py +0 -0
  19. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/api/handler.py +0 -0
  20. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/api/lifespan.py +0 -0
  21. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/api/middleware.py +0 -0
  22. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/api/responses.py +0 -0
  23. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/api/routers.py +0 -0
  24. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/concurrency/__init__.py +0 -0
  25. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/concurrency/decorators.py +0 -0
  26. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/concurrency/thread_local.py +0 -0
  27. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/concurrency/worker.py +0 -0
  28. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/config/__init__.py +0 -0
  29. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/config/loader.py +0 -0
  30. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/config/settings.py +0 -0
  31. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/config/sources.py +0 -0
  32. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/__init__.py +0 -0
  33. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/connectable.py +0 -0
  34. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/decorators.py +0 -0
  35. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/redis/__init__.py +0 -0
  36. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/redis/connection.py +0 -0
  37. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/registry.py +0 -0
  38. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/__init__.py +0 -0
  39. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/fields/__init__.py +0 -0
  40. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/fields/jsonb.py +0 -0
  41. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/migration/__init__.py +0 -0
  42. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/migration/base.py +0 -0
  43. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/migration/operations.py +0 -0
  44. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/migration/registry.py +0 -0
  45. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/migration/table.py +0 -0
  46. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/operations/__init__.py +0 -0
  47. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/operations/base.py +0 -0
  48. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/query.py +0 -0
  49. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/connections/sql/table.py +0 -0
  50. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/crypto/__init__.py +0 -0
  51. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/crypto/constants.py +0 -0
  52. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/crypto/enum.py +0 -0
  53. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/crypto/hasher.py +0 -0
  54. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/data/dataset.py +0 -0
  55. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/data/expressions/expression.py +0 -0
  56. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/data/expressions/target.py +0 -0
  57. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/data/record.py +0 -0
  58. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/data/stats.py +0 -0
  59. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/decorators/__init__.py +0 -0
  60. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/decorators/exception_handling.py +0 -0
  61. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/decorators/warnings.py +0 -0
  62. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/docker/__init__.py +0 -0
  63. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/docker/client.py +0 -0
  64. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/docker/constants.py +0 -0
  65. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/docker/disk/__init__.py +0 -0
  66. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/docker/disk/constants.py +0 -0
  67. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/docker/disk/inspector.py +0 -0
  68. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/docker/disk/models.py +0 -0
  69. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/docker/watchdog.py +0 -0
  70. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/__init__.py +0 -0
  71. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/connection.py +0 -0
  72. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/extract/__init__.py +0 -0
  73. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/extract/extractor.py +0 -0
  74. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/extract/schemas.py +0 -0
  75. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/load/__init__.py +0 -0
  76. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/load/loader.py +0 -0
  77. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/load/schemas.py +0 -0
  78. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/orchestrator.py +0 -0
  79. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/schemas.py +0 -0
  80. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/transform/__init__.py +0 -0
  81. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/transform/schemas.py +0 -0
  82. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/etl/transform/transformer.py +0 -0
  83. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/events/__init__.py +0 -0
  84. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/events/enum.py +0 -0
  85. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/events/frames.py +0 -0
  86. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/events/models.py +0 -0
  87. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/events/publisher.py +0 -0
  88. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/events/reader.py +0 -0
  89. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/events/sse.py +0 -0
  90. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/events/websocket.py +0 -0
  91. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptionator/__init__.py +0 -0
  92. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptionator/actions.py +0 -0
  93. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptionator/asgi.py +0 -0
  94. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptionator/constants.py +0 -0
  95. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptionator/exceptionator.py +0 -0
  96. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptionator/fingerprint.py +0 -0
  97. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptionator/guard.py +0 -0
  98. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptionator/jobs.py +0 -0
  99. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptionator/models.py +0 -0
  100. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptions/__init__.py +0 -0
  101. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptions/base.py +0 -0
  102. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptions/custom/__init__.py +0 -0
  103. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptions/enum.py +0 -0
  104. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptions/http/__init__.py +0 -0
  105. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/exceptions/types.py +0 -0
  106. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/files/__init__.py +0 -0
  107. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/files/base.py +0 -0
  108. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/files/disk.py +0 -0
  109. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/files/enum.py +0 -0
  110. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/files/json.py +0 -0
  111. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/files/toml.py +0 -0
  112. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/html/__init__.py +0 -0
  113. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/html/client.py +0 -0
  114. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/html/models.py +0 -0
  115. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/html/parser.py +0 -0
  116. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/html/scraper.py +0 -0
  117. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/html/settings.py +0 -0
  118. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/html/state.py +0 -0
  119. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/http/__init__.py +0 -0
  120. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/http/api.py +0 -0
  121. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/http/client.py +0 -0
  122. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/http/exceptions.py +0 -0
  123. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/http/exponential_backoff.py +0 -0
  124. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/http/response.py +0 -0
  125. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/http/status.py +0 -0
  126. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/http/stream.py +0 -0
  127. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/jobs/__init__.py +0 -0
  128. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/jobs/registry.py +0 -0
  129. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/jobs/runner.py +0 -0
  130. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/jobs/task.py +0 -0
  131. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/__init__.py +0 -0
  132. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/client.py +0 -0
  133. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/enum.py +0 -0
  134. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/events.py +0 -0
  135. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/messages.py +0 -0
  136. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/prompts/__init__.py +0 -0
  137. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/prompts/enum.py +0 -0
  138. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/prompts/exceptions.py +0 -0
  139. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/prompts/loader.py +0 -0
  140. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/prompts/template.py +0 -0
  141. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/protocols.py +0 -0
  142. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/streaming.py +0 -0
  143. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/tools/__init__.py +0 -0
  144. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/tools/base.py +0 -0
  145. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/tools/detection.py +0 -0
  146. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/tools/loop.py +0 -0
  147. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/tools/registry.py +0 -0
  148. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/llm/wire.py +0 -0
  149. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/log_monitor/__init__.py +0 -0
  150. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/log_monitor/constants.py +0 -0
  151. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/log_monitor/models.py +0 -0
  152. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/log_monitor/service.py +0 -0
  153. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/notifications/__init__.py +0 -0
  154. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/notifications/base.py +0 -0
  155. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/notifications/models.py +0 -0
  156. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/observability/__init__.py +0 -0
  157. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/observability/benchmarkable.py +0 -0
  158. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/observability/loggable.py +0 -0
  159. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/observability/request_context.py +0 -0
  160. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/observability/timing/__init__.py +0 -0
  161. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/observability/timing/constants.py +0 -0
  162. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/observability/timing/split.py +0 -0
  163. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/observability/timing/timer.py +0 -0
  164. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/process/__init__.py +0 -0
  165. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/process/runner.py +0 -0
  166. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/py.typed +0 -0
  167. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/registry/__init__.py +0 -0
  168. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/registry/ordered.py +0 -0
  169. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/registry/registry.py +0 -0
  170. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/schemas/__init__.py +0 -0
  171. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/schemas/dataclasses/__init__.py +0 -0
  172. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/schemas/enum.py +0 -0
  173. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/schemas/models/__init__.py +0 -0
  174. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/schemas/models/arbitrary.py +0 -0
  175. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/schemas/models/date_models.py +0 -0
  176. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/schemas/pydantic/__init__.py +0 -0
  177. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/schemas/pydantic/fields.py +0 -0
  178. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/schemas/size.py +0 -0
  179. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/schemas/types.py +0 -0
  180. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/schemas/version.py +0 -0
  181. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/serialization/__init__.py +0 -0
  182. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/serialization/enum.py +0 -0
  183. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/serialization/pickle_file.py +0 -0
  184. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/serialization/serializable.py +0 -0
  185. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/serialization/serializer.py +0 -0
  186. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/utils/__init__.py +0 -0
  187. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/utils/coercion.py +0 -0
  188. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/utils/collections.py +0 -0
  189. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/utils/ids.py +0 -0
  190. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/utils/parsers.py +0 -0
  191. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/utils/payload.py +0 -0
  192. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/utils/raise_exc.py +0 -0
  193. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/utils/text.py +0 -0
  194. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/utils/time.py +0 -0
  195. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/utils/validators.py +0 -0
  196. {python_corekit-0.6.0 → python_corekit-0.6.2}/corekit/utils/void.py +0 -0
  197. {python_corekit-0.6.0 → python_corekit-0.6.2}/python_corekit.egg-info/SOURCES.txt +0 -0
  198. {python_corekit-0.6.0 → python_corekit-0.6.2}/python_corekit.egg-info/dependency_links.txt +0 -0
  199. {python_corekit-0.6.0 → python_corekit-0.6.2}/python_corekit.egg-info/requires.txt +0 -0
  200. {python_corekit-0.6.0 → python_corekit-0.6.2}/python_corekit.egg-info/top_level.txt +0 -0
  201. {python_corekit-0.6.0 → python_corekit-0.6.2}/setup.cfg +0 -0
  202. {python_corekit-0.6.0 → python_corekit-0.6.2}/setup.py +0 -0
  203. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_api.py +0 -0
  204. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_application.py +0 -0
  205. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_architecture.py +0 -0
  206. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_concurrency.py +0 -0
  207. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_config.py +0 -0
  208. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_connections.py +0 -0
  209. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_data.py +0 -0
  210. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_docker.py +0 -0
  211. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_etl.py +0 -0
  212. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_events.py +0 -0
  213. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_exceptionator.py +0 -0
  214. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_exceptions.py +0 -0
  215. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_files.py +0 -0
  216. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_html.py +0 -0
  217. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_imports.py +0 -0
  218. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_imports_are_top_level.py +0 -0
  219. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_jobs.py +0 -0
  220. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_lifespan.py +0 -0
  221. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_llm.py +0 -0
  222. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_log_monitor.py +0 -0
  223. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_middleware_stack.py +0 -0
  224. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_migration.py +0 -0
  225. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_notifications.py +0 -0
  226. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_observability.py +0 -0
  227. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_ordered_registry.py +0 -0
  228. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_process.py +0 -0
  229. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_redis.py +0 -0
  230. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_registry.py +0 -0
  231. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_request_context.py +0 -0
  232. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_requests.py +0 -0
  233. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_schemas_arbitrary.py +0 -0
  234. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_schemas_enum.py +0 -0
  235. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_schemas_size.py +0 -0
  236. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_serialization.py +0 -0
  237. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_utils.py +0 -0
  238. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_utils_coercion.py +0 -0
  239. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_utils_collections.py +0 -0
  240. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_utils_ids.py +0 -0
  241. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_utils_parsers.py +0 -0
  242. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_utils_payload.py +0 -0
  243. {python_corekit-0.6.0 → python_corekit-0.6.2}/tests/test_utils_text.py +0 -0
  244. {python_corekit-0.6.0 → python_corekit-0.6.2}/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.2
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
 
@@ -30,6 +30,7 @@ from corekit.data.expressions import (
30
30
  FieldExpression,
31
31
  GreaterThan,
32
32
  GreaterThanOrEquals,
33
+ IContains,
33
34
  IsIn,
34
35
  LessThan,
35
36
  LessThanOrEquals,
@@ -62,6 +63,7 @@ __all__ = [
62
63
  "Comparison",
63
64
  "Contains",
64
65
  "Dataset",
66
+ "IContains",
65
67
  "DatasetStats",
66
68
  "Equals",
67
69
  "Expression",
@@ -20,6 +20,7 @@ from corekit.data.expressions.comparison import (
20
20
  FieldExpression,
21
21
  GreaterThan,
22
22
  GreaterThanOrEquals,
23
+ IContains,
23
24
  IsIn,
24
25
  LessThan,
25
26
  LessThanOrEquals,
@@ -36,6 +37,7 @@ __all__ = [
36
37
  "Comparison",
37
38
  "Contains",
38
39
  "Equals",
40
+ "IContains",
39
41
  "Expression",
40
42
  "FieldExpression",
41
43
  "GreaterThan",
@@ -182,6 +182,34 @@ class Contains(Comparison):
182
182
  self._reject_sql("substring match is case-sensitive in Python and LIKE is not")
183
183
 
184
184
 
185
+ class IContains(Comparison):
186
+ """
187
+ Case-insensitive substring: the left side contains the right.
188
+
189
+ Python folds both sides with ``casefold``. SQL uses ``ILIKE``, which is
190
+ case-insensitive on PostgreSQL and compiled to ``lower`` comparisons
191
+ elsewhere. ``Contains`` stays case-sensitive and does not compile, because
192
+ LIKE would not mean the same thing.
193
+ """
194
+
195
+ operator = Operator.ICONTAINS
196
+
197
+ def __call__(self, context: Any, *args: Any, **kwargs: Any) -> bool:
198
+ left = self.get_left(context, *args, **kwargs)
199
+ right = self.get_right(context, *args, **kwargs)
200
+ if not isinstance(left, str) or not isinstance(right, str):
201
+ return False
202
+ return right.casefold() in left.casefold()
203
+
204
+ def to_sqlalchemy(self, context: Any) -> Any:
205
+ if self.compares_fields:
206
+ self._reject_sql("the right side is a field, and ILIKE needs a value")
207
+ needle = self.get_right(context)
208
+ if not isinstance(needle, str):
209
+ self._reject_sql("case-insensitive substring match needs a string")
210
+ return self.get_left(context).ilike(f"%{needle}%")
211
+
212
+
185
213
  class ValueExpression(Expression):
186
214
  """
187
215
  Expression representing a single value to be compared.
@@ -220,6 +248,9 @@ class ValueExpression(Expression):
220
248
  def contains(self, substring: Any) -> "Comparison":
221
249
  return Contains(self, substring)
222
250
 
251
+ def icontains(self, substring: Any) -> "Comparison":
252
+ return IContains(self, substring)
253
+
223
254
  def resolve(self, context: Any = None, target: Target = Target.VALUE, *args: Any, **kwargs: Any) -> Any:
224
255
  """
225
256
  Resolve this literal, which is its own value for every target.
@@ -33,6 +33,7 @@ class Operator(ValidatingEnum):
33
33
  GREATER_THAN_OR_EQUALS = Dialect(">=")
34
34
  IS_IN = Dialect("is in")
35
35
  CONTAINS = Dialect("contains")
36
+ ICONTAINS = Dialect("icontains")
36
37
 
37
38
  @property
38
39
  def symbol(self) -> str:
@@ -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.2"
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.2
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
@@ -170,6 +170,14 @@ def test_python_contains_is_case_sensitive() -> None:
170
170
  assert (Field("name").contains("Ada"))(RECORD) is True
171
171
 
172
172
 
173
+ def test_python_icontains_folds_case() -> None:
174
+ assert (Field("name").icontains("ada"))(RECORD) is True
175
+ assert (Field("name").icontains("ADA"))(RECORD) is True
176
+ assert (Field("name").icontains("zed"))(RECORD) is False
177
+ assert (Field("age").icontains("30"))(RECORD) is False
178
+ assert (Field("note").icontains("x"))({"note": None}) is False
179
+
180
+
173
181
  def test_every_operator_has_a_symbol() -> None:
174
182
  from corekit.data.expressions.operator import Operator
175
183
 
@@ -114,6 +114,29 @@ def test_contains_is_refused() -> None:
114
114
  Field("name").contains("Ad").to_sqlalchemy(Member)
115
115
 
116
116
 
117
+ def test_icontains_matches_regardless_of_case(session: Session) -> None:
118
+ assert names(session, Field("name").icontains("ada")) == ["Ada"]
119
+ assert names(session, Field("name").icontains("BOB")) == ["Bob"]
120
+ assert names(session, Field("name").icontains("nope")) == []
121
+
122
+
123
+ def test_icontains_compiles_to_ilike() -> None:
124
+ statement, params = sql(Field("name").icontains("ada"))
125
+ assert "ILIKE" in statement
126
+ assert "%ada%" in params.values()
127
+
128
+
129
+ def test_icontains_binds_the_pattern() -> None:
130
+ statement, params = sql(Field("name").icontains(INJECTION))
131
+ assert INJECTION not in statement
132
+ assert f"%{INJECTION}%" in params.values()
133
+
134
+
135
+ def test_icontains_of_a_field_is_refused() -> None:
136
+ with pytest.raises(NotImplementedError, match="right side is a field"):
137
+ Field("name").icontains(Field("role")).to_sqlalchemy(Member)
138
+
139
+
117
140
  def test_isin_of_a_field_is_refused() -> None:
118
141
  """SQL IN needs a list of values; a field on the right cannot be listed."""
119
142
  with pytest.raises(NotImplementedError, match="right side is a field"):
@@ -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