psqlpy 0.11.3__tar.gz → 0.11.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of psqlpy might be problematic. Click here for more details.

Files changed (167) hide show
  1. {psqlpy-0.11.3 → psqlpy-0.11.5}/Cargo.lock +1 -1
  2. {psqlpy-0.11.3 → psqlpy-0.11.5}/Cargo.toml +2 -1
  3. psqlpy-0.11.5/PKG-INFO +31 -0
  4. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/_internal/__init__.pyi +0 -7
  5. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_value_converter.py +10 -0
  6. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/connection.rs +1 -1
  7. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/connection_pool_builder.rs +3 -3
  8. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/cursor.rs +10 -0
  9. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/transaction.rs +1 -1
  10. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/extra_types.rs +2 -2
  11. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/options.rs +1 -1
  12. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/models/serde_value.rs +8 -12
  13. psqlpy-0.11.3/PKG-INFO +0 -110
  14. {psqlpy-0.11.3 → psqlpy-0.11.5}/.github/actions/setup_postgres/action.yaml +0 -0
  15. {psqlpy-0.11.3 → psqlpy-0.11.5}/.github/pull_request_template.md +0 -0
  16. {psqlpy-0.11.3 → psqlpy-0.11.5}/.github/workflows/release.yml +0 -0
  17. {psqlpy-0.11.3 → psqlpy-0.11.5}/.github/workflows/release_docs.yaml +0 -0
  18. {psqlpy-0.11.3 → psqlpy-0.11.5}/.github/workflows/test.yaml +0 -0
  19. {psqlpy-0.11.3 → psqlpy-0.11.5}/.gitignore +0 -0
  20. {psqlpy-0.11.3 → psqlpy-0.11.5}/.pre-commit-config.yaml +0 -0
  21. {psqlpy-0.11.3 → psqlpy-0.11.5}/LICENSE +0 -0
  22. {psqlpy-0.11.3 → psqlpy-0.11.5}/README.md +0 -0
  23. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/config.ts +0 -0
  24. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/public/logo.png +0 -0
  25. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/sidebar.ts +0 -0
  26. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/styles/config.scss +0 -0
  27. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/styles/index.scss +0 -0
  28. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/styles/palette.scss +0 -0
  29. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/README.md +0 -0
  30. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/benchmarks.md +0 -0
  31. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/components_overview.md +0 -0
  32. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/connection.md +0 -0
  33. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/connection_pool.md +0 -0
  34. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/connection_pool_builder.md +0 -0
  35. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/cursor.md +0 -0
  36. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/exceptions.md +0 -0
  37. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/listener.md +0 -0
  38. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/prepared_statement.md +0 -0
  39. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/results.md +0 -0
  40. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/transaction.md +0 -0
  41. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/contribute.md +0 -0
  42. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/external_connection_pools.md +0 -0
  43. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/faq.md +0 -0
  44. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/integrations/opentelemetry.md +0 -0
  45. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/integrations/taskiq.md +0 -0
  46. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/introduction/components_overview.md +0 -0
  47. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/introduction/introduction.md +0 -0
  48. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/introduction/lets_start.md +0 -0
  49. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/aiohttp.md +0 -0
  50. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/blacksheep.md +0 -0
  51. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/fastapi.md +0 -0
  52. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/frameworks.md +0 -0
  53. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/litestar.md +0 -0
  54. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/panther.md +0 -0
  55. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/robyn.md +0 -0
  56. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/parameters.md +0 -0
  57. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/row_factories/predefined_row_factories.md +0 -0
  58. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/row_factories/row_factories.md +0 -0
  59. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/types/advanced_type_usage.md +0 -0
  60. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/types/array_types.md +0 -0
  61. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/types/extra_types.md +0 -0
  62. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/types/supported_types.md +0 -0
  63. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/types/types.md +0 -0
  64. {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/usage.md +0 -0
  65. {psqlpy-0.11.3 → psqlpy-0.11.5}/examples/aiohttp/start_example.py +0 -0
  66. {psqlpy-0.11.3 → psqlpy-0.11.5}/examples/fastapi/advanced_example.py +0 -0
  67. {psqlpy-0.11.3 → psqlpy-0.11.5}/examples/fastapi/start_example.py +0 -0
  68. {psqlpy-0.11.3 → psqlpy-0.11.5}/package.json +0 -0
  69. {psqlpy-0.11.3 → psqlpy-0.11.5}/pnpm-lock.yaml +0 -0
  70. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/.gitignore +0 -0
  71. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/.pre-commit-config.yaml +0 -0
  72. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/Dockerfile +0 -0
  73. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/README.md +0 -0
  74. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/alembic.ini +0 -0
  75. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/poetry.lock +0 -0
  76. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/__init__.py +0 -0
  77. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/api/__init__.py +0 -0
  78. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/api/piccolo.py +0 -0
  79. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/api/plain_queries.py +0 -0
  80. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/app.py +0 -0
  81. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/helpers.py +0 -0
  82. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/lifecycle.py +0 -0
  83. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/migrations/README +0 -0
  84. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/migrations/env.py +0 -0
  85. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/migrations/script.py.mako +0 -0
  86. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/migrations/versions/06d989926550_basic_user_table.py +0 -0
  87. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/migrations/versions/d162c084f522_big_af_table.py +0 -0
  88. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/mocker.py +0 -0
  89. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/models/__init__.py +0 -0
  90. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/models/piccolo.py +0 -0
  91. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/models/sqlalchemy.py +0 -0
  92. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/piccolo_conf.py +0 -0
  93. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/settings.py +0 -0
  94. {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/pyproject.toml +0 -0
  95. {psqlpy-0.11.3 → psqlpy-0.11.5}/pyproject.toml +0 -0
  96. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/__init__.py +0 -0
  97. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/_internal/exceptions.pyi +0 -0
  98. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/_internal/extra_types.pyi +0 -0
  99. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/_internal/row_factories.pyi +0 -0
  100. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/exceptions.py +0 -0
  101. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/extra_types.py +0 -0
  102. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/py.typed +0 -0
  103. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/row_factories.py +0 -0
  104. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/__init__.py +0 -0
  105. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/conftest.py +0 -0
  106. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/helpers.py +0 -0
  107. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_binary_copy.py +0 -0
  108. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_connection.py +0 -0
  109. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_connection_pool.py +0 -0
  110. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_connection_pool_builder.py +0 -0
  111. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_cursor.py +0 -0
  112. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_data/MTcars.parquet +0 -0
  113. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_kwargs_parameters.py +0 -0
  114. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_listener.py +0 -0
  115. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_query_results.py +0 -0
  116. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_row_factories.py +0 -0
  117. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_ssl_mode.py +0 -0
  118. {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_transaction.py +0 -0
  119. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/common.rs +0 -0
  120. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/connection/impls.rs +0 -0
  121. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/connection/mod.rs +0 -0
  122. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/connection/structs.rs +0 -0
  123. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/connection/traits.rs +0 -0
  124. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/common.rs +0 -0
  125. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/connection_pool.rs +0 -0
  126. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/listener/core.rs +0 -0
  127. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/listener/mod.rs +0 -0
  128. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/listener/structs.rs +0 -0
  129. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/mod.rs +0 -0
  130. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/prepared_statement.rs +0 -0
  131. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/utils.rs +0 -0
  132. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/exceptions/mod.rs +0 -0
  133. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/exceptions/python_errors.rs +0 -0
  134. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/exceptions/rust_errors.rs +0 -0
  135. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/format_helpers.rs +0 -0
  136. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/lib.rs +0 -0
  137. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/query_result.rs +0 -0
  138. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/row_factories.rs +0 -0
  139. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/runtime.rs +0 -0
  140. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/cache.rs +0 -0
  141. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/mod.rs +0 -0
  142. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/parameters.rs +0 -0
  143. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/query.rs +0 -0
  144. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/statement.rs +0 -0
  145. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/statement_builder.rs +0 -0
  146. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/utils.rs +0 -0
  147. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/transaction/impls.rs +0 -0
  148. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/transaction/mod.rs +0 -0
  149. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/transaction/structs.rs +0 -0
  150. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/additional_types.rs +0 -0
  151. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/consts.rs +0 -0
  152. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/dto/converter_impls.rs +0 -0
  153. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/dto/enums.rs +0 -0
  154. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/dto/funcs.rs +0 -0
  155. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/dto/impls.rs +0 -0
  156. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/dto/mod.rs +0 -0
  157. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/from_python.rs +0 -0
  158. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/mod.rs +0 -0
  159. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/models/decimal.rs +0 -0
  160. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/models/interval.rs +0 -0
  161. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/models/mod.rs +0 -0
  162. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/models/uuid.rs +0 -0
  163. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/to_python.rs +0 -0
  164. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/traits.rs +0 -0
  165. {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/utils.rs +0 -0
  166. {psqlpy-0.11.3 → psqlpy-0.11.5}/tox.ini +0 -0
  167. {psqlpy-0.11.3 → psqlpy-0.11.5}/tsconfig.json +0 -0
@@ -992,7 +992,7 @@ dependencies = [
992
992
 
993
993
  [[package]]
994
994
  name = "psqlpy"
995
- version = "0.11.3"
995
+ version = "0.11.5"
996
996
  dependencies = [
997
997
  "byteorder",
998
998
  "bytes",
@@ -1,7 +1,8 @@
1
1
  [package]
2
2
  name = "psqlpy"
3
- version = "0.11.3"
3
+ version = "0.11.5"
4
4
  edition = "2021"
5
+ readme = "README.md"
5
6
 
6
7
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
8
  [lib]
psqlpy-0.11.5/PKG-INFO ADDED
@@ -0,0 +1,31 @@
1
+ Metadata-Version: 2.4
2
+ Name: psqlpy
3
+ Version: 0.11.5
4
+ Classifier: Typing :: Typed
5
+ Classifier: Topic :: Database
6
+ Classifier: Development Status :: 4 - Beta
7
+ Classifier: Programming Language :: Rust
8
+ Classifier: Programming Language :: Python
9
+ Classifier: Operating System :: MacOS
10
+ Classifier: Operating System :: Microsoft
11
+ Classifier: Operating System :: POSIX :: Linux
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Topic :: Database :: Front-Ends
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ License-File: LICENSE
23
+ Summary: Async PostgreSQL driver for Python written in Rust
24
+ Keywords: postgresql,psql,async-driver,psql-driver,postgresql-driver,python-driver
25
+ Author: Kiselev Aleksandr
26
+ Author-email: askiselev00@gmail.com
27
+ Maintainer-email: Kiselev Aleksandr <askiselev00@gmail.com>
28
+ Requires-Python: >=3.8
29
+ Project-URL: homepage, https://github.com/psqlpy-python/psqlpy
30
+ Project-URL: repository, https://github.com/psqlpy-python/psqlpy
31
+ Project-URL: documentation, https://psqlpy-python.github.io/
@@ -308,15 +308,8 @@ class Cursor:
308
308
  """
309
309
 
310
310
  array_size: int
311
- cursor_name: str
312
311
  querystring: str
313
312
  parameters: ParamsT = None
314
- prepared: bool | None
315
- conn_dbname: str | None
316
- user: str | None
317
- host_addrs: list[str]
318
- hosts: list[str]
319
- ports: list[int]
320
313
 
321
314
  def __aiter__(self: Self) -> Self: ...
322
315
  async def __anext__(self: Self) -> QueryResult: ...
@@ -178,6 +178,11 @@ async def test_as_class(
178
178
  JSONB([{"array": "json"}, {"one more": "test"}]),
179
179
  [{"array": "json"}, {"one more": "test"}],
180
180
  ),
181
+ (
182
+ "JSONB",
183
+ JSONB([1, "1", 1.0]),
184
+ [1, "1", 1.0],
185
+ ),
181
186
  (
182
187
  "JSON",
183
188
  {
@@ -194,6 +199,11 @@ async def test_as_class(
194
199
  JSON([{"array": "json"}, {"one more": "test"}]),
195
200
  [{"array": "json"}, {"one more": "test"}],
196
201
  ),
202
+ (
203
+ "JSON",
204
+ JSON([1, "1", 1.0]),
205
+ [1, "1", 1.0],
206
+ ),
197
207
  (
198
208
  "MACADDR",
199
209
  MacAddr6("08:00:2b:01:02:03"),
@@ -401,7 +401,7 @@ impl Connection {
401
401
  /// Create new transaction object.
402
402
  ///
403
403
  /// # Errors
404
- /// May return Err Result if db_client is None.
404
+ /// May return Err Result if `db_client` is None.
405
405
  #[pyo3(signature = (
406
406
  isolation_level=None,
407
407
  read_variant=None,
@@ -76,7 +76,7 @@ impl ConnectionPoolBuilder {
76
76
  ))
77
77
  }
78
78
 
79
- /// Set ca_file for ssl_mode in PostgreSQL.
79
+ /// Set `ca_file` for `ssl_mode` in `PostgreSQL`.
80
80
  fn ca_file(self_: Py<Self>, ca_file: String) -> Py<Self> {
81
81
  Python::with_gil(|gil| {
82
82
  let mut self_ = self_.borrow_mut(gil);
@@ -241,7 +241,7 @@ impl ConnectionPoolBuilder {
241
241
  /// Sets the TCP user timeout.
242
242
  ///
243
243
  /// This is ignored for Unix domain socket connections. It is only supported on systems where
244
- /// TCP_USER_TIMEOUT is available and will default to the system default if omitted or set to 0;
244
+ /// `TCP_USER_TIMEOUT` is available and will default to the system default if omitted or set to 0;
245
245
  /// on other systems, it has no effect.
246
246
  #[must_use]
247
247
  pub fn tcp_user_timeout(self_: Py<Self>, tcp_user_timeout: u64) -> Py<Self> {
@@ -314,7 +314,7 @@ impl ConnectionPoolBuilder {
314
314
  }
315
315
 
316
316
  /// Sets the time interval between TCP keepalive probes.
317
- /// On Windows, this sets the value of the tcp_keepalive struct’s keepaliveinterval field.
317
+ /// On Windows, this sets the value of the `tcp_keepalive` struct’s keepaliveinterval field.
318
318
  ///
319
319
  /// This is ignored for Unix domain sockets, or if the `keepalives` option is disabled.
320
320
  #[must_use]
@@ -73,6 +73,16 @@ impl Drop for Cursor {
73
73
 
74
74
  #[pymethods]
75
75
  impl Cursor {
76
+ #[getter]
77
+ fn get_querystring(&self) -> Option<String> {
78
+ self.querystring.clone()
79
+ }
80
+
81
+ #[getter]
82
+ fn get_parameters(&self) -> Option<Py<PyAny>> {
83
+ self.parameters.clone()
84
+ }
85
+
76
86
  #[getter]
77
87
  fn get_array_size(&self) -> i32 {
78
88
  self.array_size
@@ -309,7 +309,7 @@ impl Transaction {
309
309
  /// Execute many queries in a transaction.
310
310
  ///
311
311
  /// More information in a documentation:
312
- /// https://psqlpy-python.github.io/components/transaction.html#pipeline
312
+ /// `<https://psqlpy-python.github.io/components/transaction.html#pipeline>`
313
313
  ///
314
314
  /// # Errors
315
315
  /// Can return error if there is a problem with DB communication.
@@ -97,7 +97,7 @@ impl Text {
97
97
 
98
98
  #[pymethods]
99
99
  impl Text {
100
- /// Create new PyText from Python str.
100
+ /// Create new `PyText` from Python str.
101
101
  #[new]
102
102
  #[allow(clippy::missing_errors_doc)]
103
103
  #[must_use]
@@ -121,7 +121,7 @@ impl VarChar {
121
121
 
122
122
  #[pymethods]
123
123
  impl VarChar {
124
- /// Create new PyVarChar from Python str.
124
+ /// Create new `PyVarChar` from Python str.
125
125
  #[new]
126
126
  #[allow(clippy::missing_errors_doc)]
127
127
  #[must_use]
@@ -175,7 +175,7 @@ pub enum SynchronousCommit {
175
175
  /// As the name indicates, the commit acknowledgment can come before
176
176
  /// flushing the records to disk.
177
177
  /// This is generally called as an asynchronous commit.
178
- /// If the PostgreSQL instance crashes,
178
+ /// If the `PostgreSQL` instance crashes,
179
179
  /// the last few asynchronous commits might be lost.
180
180
  Off,
181
181
  /// WAL records are written and flushed to local disks.
@@ -67,16 +67,12 @@ fn serde_value_from_list(_gil: Python<'_>, bind_value: &Bound<'_, PyAny>) -> PSQ
67
67
  let mut result_vec: Vec<Value> = Vec::with_capacity(py_list.len());
68
68
 
69
69
  for item in py_list.iter() {
70
- if item.is_instance_of::<PyDict>() {
71
- let python_dto = from_python_untyped(&item)?;
72
- result_vec.push(python_dto.to_serde_value()?);
73
- } else if item.is_instance_of::<PyList>() {
70
+ if item.is_instance_of::<PyList>() {
74
71
  let serde_value = build_serde_value(&item)?;
75
72
  result_vec.push(serde_value);
76
73
  } else {
77
- return Err(RustPSQLDriverError::PyToRustValueConversionError(
78
- "Items in JSON array must be dicts or lists.".to_string(),
79
- ));
74
+ let python_dto = from_python_untyped(&item)?;
75
+ result_vec.push(python_dto.to_serde_value()?);
80
76
  }
81
77
  }
82
78
 
@@ -112,17 +108,17 @@ fn serde_value_from_dict(bind_value: &Bound<'_, PyAny>) -> PSQLPyResult<Value> {
112
108
  /// # Errors
113
109
  /// May return error if cannot convert Python type into Rust one.
114
110
  #[allow(clippy::needless_pass_by_value)]
111
+ #[allow(clippy::needless_return)]
115
112
  pub fn build_serde_value(value: &Bound<'_, PyAny>) -> PSQLPyResult<Value> {
116
113
  Python::with_gil(|gil| {
117
114
  if value.is_instance_of::<PyList>() {
118
- serde_value_from_list(gil, value)
115
+ return serde_value_from_list(gil, value);
119
116
  } else if value.is_instance_of::<PyDict>() {
120
117
  return serde_value_from_dict(value);
121
- } else {
122
- return Err(RustPSQLDriverError::PyToRustValueConversionError(
123
- "PyJSON must be dict value.".to_string(),
124
- ));
125
118
  }
119
+ Err(RustPSQLDriverError::PyToRustValueConversionError(
120
+ "PyJSON must be dict or list value.".to_string(),
121
+ ))
126
122
  })
127
123
  }
128
124
 
psqlpy-0.11.3/PKG-INFO DELETED
@@ -1,110 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: psqlpy
3
- Version: 0.11.3
4
- Classifier: Typing :: Typed
5
- Classifier: Topic :: Database
6
- Classifier: Development Status :: 4 - Beta
7
- Classifier: Programming Language :: Rust
8
- Classifier: Programming Language :: Python
9
- Classifier: Operating System :: MacOS
10
- Classifier: Operating System :: Microsoft
11
- Classifier: Operating System :: POSIX :: Linux
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Topic :: Database :: Front-Ends
14
- Classifier: Programming Language :: Python
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3 :: Only
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
- Classifier: Programming Language :: Python :: 3.10
20
- Classifier: Programming Language :: Python :: 3.11
21
- Classifier: Programming Language :: Python :: 3.12
22
- License-File: LICENSE
23
- Summary: Async PostgreSQL driver for Python written in Rust
24
- Keywords: postgresql,psql,async-driver,psql-driver,postgresql-driver,python-driver
25
- Author: Kiselev Aleksandr
26
- Author-email: askiselev00@gmail.com
27
- Maintainer-email: Kiselev Aleksandr <askiselev00@gmail.com>
28
- Requires-Python: >=3.8
29
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
30
- Project-URL: homepage, https://github.com/psqlpy-python/psqlpy
31
- Project-URL: repository, https://github.com/psqlpy-python/psqlpy
32
- Project-URL: documentation, https://psqlpy-python.github.io/
33
-
34
- [![PyPI - Python Version](https://img.shields.io/badge/PYTHON-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue?style=for-the-badge
35
- )](https://pypi.org/project/psqlpy/)
36
- [![PyPI - Python Version](https://img.shields.io/badge/Tested%20On%20PostgreSQL-14%20%7C%2015%20%7C%2016%20%7C17-2be28a?style=for-the-badge
37
- )](https://pypi.org/project/psqlpy/)
38
- [![PyPI](https://img.shields.io/pypi/v/psqlpy?style=for-the-badge)](https://pypi.org/project/psqlpy/)
39
- [![PyPI - Downloads](https://img.shields.io/pypi/dm/psqlpy?style=for-the-badge)](https://pypistats.org/packages/psqlpy)
40
-
41
- # PSQLPy - Async PostgreSQL driver for Python written in Rust.
42
-
43
- Driver for PostgreSQL written fully in Rust and exposed to Python.
44
- Main goals of the library is speed and type safety.
45
-
46
- ## Documentation
47
- You can find full documentation here - [PSQLPy documentation](https://psqlpy-python.github.io/)
48
-
49
- ## Installation
50
-
51
- You can install package with `pip` or `poetry`.
52
-
53
- poetry:
54
-
55
- ```bash
56
- > poetry add psqlpy
57
- ```
58
-
59
- pip:
60
-
61
- ```bash
62
- > pip install psqlpy
63
- ```
64
-
65
- Or you can build it by yourself. To do it, install stable rust and [maturin](https://github.com/PyO3/maturin).
66
-
67
- ```
68
- > maturin develop --release
69
- ```
70
-
71
- ## Usage
72
-
73
- Usage is as easy as possible.
74
- Create new instance of ConnectionPool and start querying.
75
- You don't need to startup connection pool, the connection pool will create connections as needed.
76
-
77
- ```python
78
- from typing import Any
79
-
80
- from psqlpy import ConnectionPool, QueryResult
81
-
82
-
83
- async def main() -> None:
84
- db_pool = ConnectionPool(
85
- username="postgres",
86
- password="pg_password",
87
- host="localhost",
88
- port=5432,
89
- db_name="postgres",
90
- max_db_pool_size=2,
91
- )
92
-
93
- async with db_pool.acquire() as conn:
94
- res: QueryResult = await conn.execute(
95
- "SELECT * FROM users",
96
- )
97
-
98
- print(res.result())
99
- db_pool.close()
100
-
101
- ```
102
-
103
- ## Benchmarks
104
-
105
- You can find benchmarks with visualization on our [docs](https://psqlpy-python.github.io/benchmarks.html)
106
-
107
- ## Community
108
- Let's make `PSQLPy` better together!
109
- Join our community in [Telegram](https://t.me/+f3Y8mYKgXxhmYThi)
110
-
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes