singlestoredb 0.3.3__py3-none-any.whl → 1.0.3__py3-none-any.whl

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 singlestoredb might be problematic. Click here for more details.

Files changed (121) hide show
  1. singlestoredb/__init__.py +33 -2
  2. singlestoredb/alchemy/__init__.py +90 -0
  3. singlestoredb/auth.py +6 -4
  4. singlestoredb/config.py +116 -16
  5. singlestoredb/connection.py +489 -523
  6. singlestoredb/converters.py +275 -26
  7. singlestoredb/exceptions.py +30 -4
  8. singlestoredb/functions/__init__.py +1 -0
  9. singlestoredb/functions/decorator.py +142 -0
  10. singlestoredb/functions/dtypes.py +1639 -0
  11. singlestoredb/functions/ext/__init__.py +2 -0
  12. singlestoredb/functions/ext/arrow.py +375 -0
  13. singlestoredb/functions/ext/asgi.py +661 -0
  14. singlestoredb/functions/ext/json.py +427 -0
  15. singlestoredb/functions/ext/mmap.py +306 -0
  16. singlestoredb/functions/ext/rowdat_1.py +744 -0
  17. singlestoredb/functions/signature.py +673 -0
  18. singlestoredb/fusion/__init__.py +11 -0
  19. singlestoredb/fusion/graphql.py +213 -0
  20. singlestoredb/fusion/handler.py +621 -0
  21. singlestoredb/fusion/handlers/__init__.py +0 -0
  22. singlestoredb/fusion/handlers/stage.py +257 -0
  23. singlestoredb/fusion/handlers/utils.py +162 -0
  24. singlestoredb/fusion/handlers/workspace.py +412 -0
  25. singlestoredb/fusion/registry.py +164 -0
  26. singlestoredb/fusion/result.py +399 -0
  27. singlestoredb/http/__init__.py +27 -0
  28. singlestoredb/http/connection.py +1192 -0
  29. singlestoredb/management/__init__.py +3 -2
  30. singlestoredb/management/billing_usage.py +148 -0
  31. singlestoredb/management/cluster.py +19 -14
  32. singlestoredb/management/manager.py +100 -40
  33. singlestoredb/management/organization.py +188 -0
  34. singlestoredb/management/region.py +6 -8
  35. singlestoredb/management/utils.py +253 -4
  36. singlestoredb/management/workspace.py +1153 -35
  37. singlestoredb/mysql/__init__.py +177 -0
  38. singlestoredb/mysql/_auth.py +298 -0
  39. singlestoredb/mysql/charset.py +214 -0
  40. singlestoredb/mysql/connection.py +1814 -0
  41. singlestoredb/mysql/constants/CLIENT.py +38 -0
  42. singlestoredb/mysql/constants/COMMAND.py +32 -0
  43. singlestoredb/mysql/constants/CR.py +78 -0
  44. singlestoredb/mysql/constants/ER.py +474 -0
  45. singlestoredb/mysql/constants/FIELD_TYPE.py +32 -0
  46. singlestoredb/mysql/constants/FLAG.py +15 -0
  47. singlestoredb/mysql/constants/SERVER_STATUS.py +10 -0
  48. singlestoredb/mysql/constants/__init__.py +0 -0
  49. singlestoredb/mysql/converters.py +271 -0
  50. singlestoredb/mysql/cursors.py +713 -0
  51. singlestoredb/mysql/err.py +92 -0
  52. singlestoredb/mysql/optionfile.py +20 -0
  53. singlestoredb/mysql/protocol.py +388 -0
  54. singlestoredb/mysql/tests/__init__.py +19 -0
  55. singlestoredb/mysql/tests/base.py +126 -0
  56. singlestoredb/mysql/tests/conftest.py +37 -0
  57. singlestoredb/mysql/tests/test_DictCursor.py +132 -0
  58. singlestoredb/mysql/tests/test_SSCursor.py +141 -0
  59. singlestoredb/mysql/tests/test_basic.py +452 -0
  60. singlestoredb/mysql/tests/test_connection.py +851 -0
  61. singlestoredb/mysql/tests/test_converters.py +58 -0
  62. singlestoredb/mysql/tests/test_cursor.py +141 -0
  63. singlestoredb/mysql/tests/test_err.py +16 -0
  64. singlestoredb/mysql/tests/test_issues.py +514 -0
  65. singlestoredb/mysql/tests/test_load_local.py +75 -0
  66. singlestoredb/mysql/tests/test_nextset.py +88 -0
  67. singlestoredb/mysql/tests/test_optionfile.py +27 -0
  68. singlestoredb/mysql/tests/thirdparty/__init__.py +6 -0
  69. singlestoredb/mysql/tests/thirdparty/test_MySQLdb/__init__.py +9 -0
  70. singlestoredb/mysql/tests/thirdparty/test_MySQLdb/capabilities.py +323 -0
  71. singlestoredb/mysql/tests/thirdparty/test_MySQLdb/dbapi20.py +865 -0
  72. singlestoredb/mysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_capabilities.py +110 -0
  73. singlestoredb/mysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_dbapi20.py +224 -0
  74. singlestoredb/mysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_nonstandard.py +101 -0
  75. singlestoredb/mysql/times.py +23 -0
  76. singlestoredb/pytest.py +283 -0
  77. singlestoredb/tests/empty.sql +0 -0
  78. singlestoredb/tests/ext_funcs/__init__.py +385 -0
  79. singlestoredb/tests/test.sql +210 -0
  80. singlestoredb/tests/test2.sql +1 -0
  81. singlestoredb/tests/test_basics.py +482 -117
  82. singlestoredb/tests/test_config.py +13 -15
  83. singlestoredb/tests/test_connection.py +241 -289
  84. singlestoredb/tests/test_dbapi.py +27 -0
  85. singlestoredb/tests/test_exceptions.py +0 -2
  86. singlestoredb/tests/test_ext_func.py +1193 -0
  87. singlestoredb/tests/test_ext_func_data.py +1101 -0
  88. singlestoredb/tests/test_fusion.py +465 -0
  89. singlestoredb/tests/test_http.py +32 -28
  90. singlestoredb/tests/test_management.py +588 -10
  91. singlestoredb/tests/test_plugin.py +33 -0
  92. singlestoredb/tests/test_results.py +11 -14
  93. singlestoredb/tests/test_types.py +0 -2
  94. singlestoredb/tests/test_udf.py +687 -0
  95. singlestoredb/tests/test_xdict.py +0 -2
  96. singlestoredb/tests/utils.py +3 -4
  97. singlestoredb/types.py +4 -5
  98. singlestoredb/utils/config.py +71 -12
  99. singlestoredb/utils/convert_rows.py +0 -2
  100. singlestoredb/utils/debug.py +13 -0
  101. singlestoredb/utils/mogrify.py +151 -0
  102. singlestoredb/utils/results.py +4 -3
  103. singlestoredb/utils/xdict.py +12 -12
  104. singlestoredb-1.0.3.dist-info/METADATA +139 -0
  105. singlestoredb-1.0.3.dist-info/RECORD +112 -0
  106. {singlestoredb-0.3.3.dist-info → singlestoredb-1.0.3.dist-info}/WHEEL +1 -1
  107. singlestoredb-1.0.3.dist-info/entry_points.txt +2 -0
  108. singlestoredb/drivers/__init__.py +0 -46
  109. singlestoredb/drivers/base.py +0 -200
  110. singlestoredb/drivers/cymysql.py +0 -40
  111. singlestoredb/drivers/http.py +0 -49
  112. singlestoredb/drivers/mariadb.py +0 -42
  113. singlestoredb/drivers/mysqlconnector.py +0 -51
  114. singlestoredb/drivers/mysqldb.py +0 -62
  115. singlestoredb/drivers/pymysql.py +0 -39
  116. singlestoredb/drivers/pyodbc.py +0 -67
  117. singlestoredb/http.py +0 -794
  118. singlestoredb-0.3.3.dist-info/METADATA +0 -105
  119. singlestoredb-0.3.3.dist-info/RECORD +0 -46
  120. {singlestoredb-0.3.3.dist-info → singlestoredb-1.0.3.dist-info}/LICENSE +0 -0
  121. {singlestoredb-0.3.3.dist-info → singlestoredb-1.0.3.dist-info}/top_level.txt +0 -0
@@ -1,105 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: singlestoredb
3
- Version: 0.3.3
4
- Summary: Interface to the SingleStore database and cluster management APIs
5
- Home-page: https://github.com/singlestore-labs/singlestore-python
6
- Author: SingleStore
7
- Author-email: support@singlestore.com
8
- License: Apache-2.0
9
- Classifier: Development Status :: 4 - Beta
10
- Classifier: License :: OSI Approved :: Apache Software License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3 :: Only
13
- Classifier: Programming Language :: Python :: 3.8
14
- Classifier: Programming Language :: Python :: 3.9
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: Topic :: Database
17
- Requires-Python: >=3.8
18
- Description-Content-Type: text/markdown
19
- License-File: LICENSE
20
- Requires-Dist: PyJWT
21
- Requires-Dist: PyMySQL
22
- Requires-Dist: requests
23
- Requires-Dist: sqlparams
24
- Provides-Extra: dataframe
25
- Requires-Dist: ibis-singlestoredb ; extra == 'dataframe'
26
- Provides-Extra: dbt
27
- Requires-Dist: dbt-singlestore ; extra == 'dbt'
28
- Provides-Extra: ibis
29
- Requires-Dist: ibis-singlestoredb ; extra == 'ibis'
30
- Provides-Extra: sqlalchemy
31
- Requires-Dist: sqlalchemy-singlestoredb ; extra == 'sqlalchemy'
32
-
33
- # <img src="https://github.com/singlestore-labs/singlestore-python/blob/main/resources/singlestore-logo.png" height="60" valign="middle"/> SingleStoreDB Python Interface
34
-
35
- This project contains a [DB-API 2.0](https://www.python.org/dev/peps/pep-0249/)
36
- compatible Python interface to the SingleStore database and workspace management API.
37
-
38
- ## Install
39
-
40
- This package can be install from PyPI using `pip`:
41
- ```
42
- pip install singlestoredb
43
- ```
44
-
45
- If you are using Anaconda, you can install with `conda`:
46
- ```
47
- conda install -c singlestore singlestoredb
48
- ```
49
-
50
- ## Usage
51
-
52
- Connections to the SingleStore database are made using the DB-API parameters
53
- `host`, `port`, `user`, `password`, etc, but they may also be done using
54
- URLs that specify these parameters as well (much like the
55
- [SQLAlchemy](https://www.sqlalchemy.org) package).
56
- ```
57
- import singlestoredb as s2
58
-
59
- # Connect using the default connector
60
- conn = s2.connect('user:password@host:3306/db_name')
61
-
62
- # Create a cursor
63
- cur = conn.cursor()
64
-
65
- # Execute SQL
66
- cur.execute('select * from foo')
67
-
68
- # Fetch the results
69
- print(cur.description)
70
- for item in cur:
71
- print(item)
72
-
73
- # Close the connection
74
- conn.close()
75
- ```
76
-
77
- Connecting to the HTTP API is done as follows:
78
- ```
79
- # Use the HTTP API connector
80
- conn = s2.connect('https://user:password@host:8080/db_name')
81
- ```
82
-
83
- ## License
84
-
85
- This library is licensed under the [Apache 2.0 License](https://raw.githubusercontent.com/singlestore-labs/singlestoredb-python/main/LICENSE?token=GHSAT0AAAAAABMGV6QPNR6N23BVICDYK5LAYTVK5EA).
86
-
87
- ## Resources
88
-
89
- * [Documentation](https://singlestore-labs.github.io/singlestore-python)
90
- * [SingleStore](https://singlestore.com)
91
- * [Python](https://python.org)
92
-
93
- ## User agreement
94
-
95
- SINGLESTORE, INC. ("SINGLESTORE") AGREES TO GRANT YOU AND YOUR COMPANY ACCESS TO THIS OPEN SOURCE SOFTWARE CONNECTOR ONLY IF (A) YOU AND YOUR COMPANY REPRESENT AND WARRANT THAT YOU, ON BEHALF OF YOUR COMPANY, HAVE THE AUTHORITY TO LEGALLY BIND YOUR COMPANY AND (B) YOU, ON BEHALF OF YOUR COMPANY ACCEPT AND AGREE TO BE BOUND BY ALL OF THE OPEN SOURCE TERMS AND CONDITIONS APPLICABLE TO THIS OPEN SOURCE CONNECTOR AS SET FORTH BELOW (THIS “AGREEMENT”), WHICH SHALL BE DEFINITIVELY EVIDENCED BY ANY ONE OF THE FOLLOWING MEANS: YOU, ON BEHALF OF YOUR COMPANY, CLICKING THE “DOWNLOAD, “ACCEPTANCE” OR “CONTINUE” BUTTON, AS APPLICABLE OR COMPANY’S INSTALLATION, ACCESS OR USE OF THE OPEN SOURCE CONNECTOR AND SHALL BE EFFECTIVE ON THE EARLIER OF THE DATE ON WHICH THE DOWNLOAD, ACCESS, COPY OR INSTALL OF THE CONNECTOR OR USE ANY SERVICES (INCLUDING ANY UPDATES OR UPGRADES) PROVIDED BY SINGLESTORE.
96
- BETA SOFTWARE CONNECTOR
97
-
98
- Customer Understands and agrees that it is being granted access to pre-release or “beta” versions of SingleStore’s open source software connector (“Beta Software Connector”) for the limited purposes of non-production testing and evaluation of such Beta Software Connector. Customer acknowledges that SingleStore shall have no obligation to release a generally available version of such Beta Software Connector or to provide support or warranty for such versions of the Beta Software Connector for any production or non-evaluation use.
99
-
100
- NOTWITHSTANDING ANYTHING TO THE CONTRARY IN ANY DOCUMENTATION, AGREEMENT OR IN ANY ORDER DOCUMENT, SINGLESTORE WILL HAVE NO WARRANTY, INDEMNITY, SUPPORT, OR SERVICE LEVEL, OBLIGATIONS WITH
101
- RESPECT TO THIS BETA SOFTWARE CONNECTOR (INCLUDING TOOLS AND UTILITIES).
102
-
103
- APPLICABLE OPEN SOURCE LICENSE: Apache 2.0
104
-
105
- IF YOU OR YOUR COMPANY DO NOT AGREE TO THESE TERMS AND CONDITIONS, DO NOT CHECK THE ACCEPTANCE BOX, AND DO NOT DOWNLOAD, ACCESS, COPY, INSTALL OR USE THE SOFTWARE OR THE SERVICES.
@@ -1,46 +0,0 @@
1
- singlestoredb/__init__.py,sha256=_BEFofbmgnjouXR30lMqMqbOwOM78JsvLBTX-qgKyW0,877
2
- singlestoredb/auth.py,sha256=gHhWLHaK58WI_P-p5ngRgCU1qu_eZP3ywVqEd00hacs,7536
3
- singlestoredb/config.py,sha256=ajBPszySJKsoJ80_A5pWtDOuMJcFKX6e96mq16jXLmo,4710
4
- singlestoredb/connection.py,sha256=5HSm_aUfFi_734-Qc0y1qvs6LZyEZI5ky41Tjns9bxo,45030
5
- singlestoredb/converters.py,sha256=w1O81mbzsOm3MNZpmqtTScgHgcLJ23sobnsNzlb8Jio,5540
6
- singlestoredb/exceptions.py,sha256=GUTBYQOG94WuOj4Hmzff98X3k5vRcXr-ij7bNBcK-1o,2397
7
- singlestoredb/http.py,sha256=mOONcCi4a4VKqPJoc8rMSgA7dEvMSP7XV8-rD1VSNIs,23712
8
- singlestoredb/types.py,sha256=TNfLcozidtJaF_tF-LAjninMCS9lflug7tLau1d9eko,9968
9
- singlestoredb/drivers/__init__.py,sha256=FzmJsz8skhxINE2H9I6asS0S1ujKSd46DW4DLxVyjEw,1338
10
- singlestoredb/drivers/base.py,sha256=HFnBTjOW1DyVQSftbUGS6on2TJs21Y5yWkir613DDDQ,6405
11
- singlestoredb/drivers/cymysql.py,sha256=-f0XvrIVjYf0LbBJPppC48BeADEHCuK-gPphUbKp4qs,1096
12
- singlestoredb/drivers/http.py,sha256=2E9gje3Y_zH5jgJE2L7-8FID-tWHfUees4t5at2F_6g,1239
13
- singlestoredb/drivers/mariadb.py,sha256=uqfBGstu23mtg96sMQyvsFK20Q_J76Wuc43nGnH1-_I,1058
14
- singlestoredb/drivers/mysqlconnector.py,sha256=-YLEIXzsV0YAr4wOju7SYXXvvJKVVr3vxHcgFllCeWo,1617
15
- singlestoredb/drivers/mysqldb.py,sha256=bLkLcZIQvwfuUE9Rw_e-tyoUpNU0jjiDdabje81iglI,1759
16
- singlestoredb/drivers/pymysql.py,sha256=NXya6q9DKoncXkqzq-_XGV3K6zxicK-Z17pBXdLh6IE,1101
17
- singlestoredb/drivers/pyodbc.py,sha256=0qMzNJ8jMbMkv2XcjTzP3U33SYZwZVMf8_UWt27TH8Y,1785
18
- singlestoredb/management/__init__.py,sha256=UAVSIA_u9Rir_2D8xNM_WnAlSk8ejJ4FDKjBQSFXFis,135
19
- singlestoredb/management/cluster.py,sha256=SzzWhlo0jEhKMyNcKd8_4CyCS0oQ3IAZW6uA1mMV0Gg,14178
20
- singlestoredb/management/manager.py,sha256=OWy5iQu9Xty8o1qJ-TXrajk73GiPCDhawPeUNn7TUJU,6537
21
- singlestoredb/management/region.py,sha256=cRXCwRdnQvOnQ2CUTf2y-d8C23ASqPG1u76lR35QIV4,1633
22
- singlestoredb/management/utils.py,sha256=QYmo-oBEAved-HdemvXhq0XRH_1eYOcGKjJZQeQYeRc,1035
23
- singlestoredb/management/workspace.py,sha256=npCbo2gZXQKuEwV6bF9OR-uKjya5KlhSvC816CDjsEQ,17933
24
- singlestoredb/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- singlestoredb/tests/local_infile.csv,sha256=sBtqjvfkS9aoOVx8nMXYgYv4rDuT4OuYhqUhNRu0O68,42
26
- singlestoredb/tests/test.sql,sha256=5nTFzubFQJ79UsfVWp-haSK63tFZhN-j6hPCGswjOP4,5040
27
- singlestoredb/tests/test_basics.py,sha256=saT2DhEIWIY_0PiaJ0F3IVCJPicGELNv62m6k69usPo,30906
28
- singlestoredb/tests/test_config.py,sha256=uRMZjgLjpCGw6mLh_F1qPQbsLOzHczuAal1eF-m0HvA,11216
29
- singlestoredb/tests/test_connection.py,sha256=udYWJvlCGASu_tDsAfecg37RTndRIQU--wAt1vgwCok,52585
30
- singlestoredb/tests/test_exceptions.py,sha256=_B79BlsJzzmKQyfXj6RNNzBzgnA4KLxKUnDGAVmlqJs,1167
31
- singlestoredb/tests/test_http.py,sha256=1fTMbmyMD1f9TC-VuYk-pt13nYgYbIUPYVQeYkGdy0Q,8367
32
- singlestoredb/tests/test_management.py,sha256=Syv0xEXaOxAzuXMhPBlgysk-r3MtR6vrODMccLCf2Ec,9692
33
- singlestoredb/tests/test_results.py,sha256=mheFtJzz-G-xhoPhznYysVMydrjl4OKdpsMohZHx4-I,6677
34
- singlestoredb/tests/test_types.py,sha256=z7w_E-bKGk9nL_6otJlCd5nAenwp7e5nIbL2EuKf9DA,4536
35
- singlestoredb/tests/test_xdict.py,sha256=nmE3wDuL4IiHxCblaK9iT3GohRAWE6C7H4WgJqZucxE,10444
36
- singlestoredb/tests/utils.py,sha256=EkMMXHc5TIqnCPn1OUheIgOU2VRaPLoEbrmOccvZ0Uo,4634
37
- singlestoredb/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- singlestoredb/utils/config.py,sha256=Lu0QHhw2PKU1te8Eqi6mnZQKF2a932Cql1Z2GLBrTCQ,23266
39
- singlestoredb/utils/convert_rows.py,sha256=B3TU300jS-JWVi51Sxb-euMjgCCR9Oe6Y70vTf-F7YI,1852
40
- singlestoredb/utils/results.py,sha256=aw__NLuupoOSU_U9dNuy5Me9pe5CLNKtDe7zk0SYkOE,5136
41
- singlestoredb/utils/xdict.py,sha256=izC2z-X9RtpSZoe68gLvyR7PHlUDDBaSm9bLq9B3dh8,12877
42
- singlestoredb-0.3.3.dist-info/LICENSE,sha256=Mlq78idURT-9G026aMYswwwnnrLcgzTLuXeAs5hjDLM,11341
43
- singlestoredb-0.3.3.dist-info/METADATA,sha256=sPMu9calagBbbgteKuFDUDAogdN7W7LXTMSzM2rnZYE,4806
44
- singlestoredb-0.3.3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
45
- singlestoredb-0.3.3.dist-info/top_level.txt,sha256=eet8bVPNRqiGeY0PrO5ERH2UpamwlrKHEQCffz4dOh8,14
46
- singlestoredb-0.3.3.dist-info/RECORD,,