MindsDB 25.4.5.0__py3-none-any.whl → 25.5.4.0__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 MindsDB might be problematic. Click here for more details.

Files changed (350) hide show
  1. mindsdb/__about__.py +1 -1
  2. mindsdb/__main__.py +215 -185
  3. mindsdb/api/a2a/__init__.py +0 -0
  4. mindsdb/api/a2a/__main__.py +114 -0
  5. mindsdb/api/a2a/a2a_client.py +439 -0
  6. mindsdb/api/a2a/agent.py +308 -0
  7. mindsdb/api/a2a/common/__init__.py +0 -0
  8. mindsdb/api/a2a/common/client/__init__.py +4 -0
  9. mindsdb/api/a2a/common/client/card_resolver.py +21 -0
  10. mindsdb/api/a2a/common/client/client.py +86 -0
  11. mindsdb/api/a2a/common/server/__init__.py +4 -0
  12. mindsdb/api/a2a/common/server/server.py +164 -0
  13. mindsdb/api/a2a/common/server/task_manager.py +287 -0
  14. mindsdb/api/a2a/common/server/utils.py +28 -0
  15. mindsdb/api/a2a/common/types.py +365 -0
  16. mindsdb/api/a2a/constants.py +9 -0
  17. mindsdb/api/a2a/run_a2a.py +129 -0
  18. mindsdb/api/a2a/task_manager.py +594 -0
  19. mindsdb/api/executor/command_executor.py +49 -28
  20. mindsdb/api/executor/datahub/classes/response.py +5 -2
  21. mindsdb/api/executor/datahub/datanodes/information_schema_datanode.py +8 -0
  22. mindsdb/api/executor/datahub/datanodes/integration_datanode.py +39 -72
  23. mindsdb/api/executor/datahub/datanodes/system_tables.py +10 -13
  24. mindsdb/api/executor/planner/query_planner.py +14 -2
  25. mindsdb/api/executor/sql_query/result_set.py +185 -52
  26. mindsdb/api/executor/sql_query/sql_query.py +1 -1
  27. mindsdb/api/executor/sql_query/steps/apply_predictor_step.py +11 -13
  28. mindsdb/api/executor/sql_query/steps/fetch_dataframe.py +8 -10
  29. mindsdb/api/executor/sql_query/steps/fetch_dataframe_partition.py +5 -44
  30. mindsdb/api/executor/sql_query/steps/insert_step.py +24 -15
  31. mindsdb/api/executor/sql_query/steps/join_step.py +1 -1
  32. mindsdb/api/executor/sql_query/steps/project_step.py +1 -1
  33. mindsdb/api/executor/sql_query/steps/sql_steps.py +1 -1
  34. mindsdb/api/executor/sql_query/steps/subselect_step.py +4 -8
  35. mindsdb/api/executor/sql_query/steps/union_step.py +1 -3
  36. mindsdb/api/http/initialize.py +118 -85
  37. mindsdb/api/http/namespaces/analysis.py +17 -4
  38. mindsdb/api/http/namespaces/file.py +8 -2
  39. mindsdb/api/http/namespaces/sql.py +13 -27
  40. mindsdb/api/http/namespaces/tree.py +1 -1
  41. mindsdb/api/http/start.py +7 -2
  42. mindsdb/api/mcp/start.py +42 -5
  43. mindsdb/api/mysql/mysql_proxy/data_types/mysql_packet.py +0 -1
  44. mindsdb/api/mysql/mysql_proxy/data_types/mysql_packets/binary_resultset_row_package.py +52 -19
  45. mindsdb/api/mysql/mysql_proxy/executor/mysql_executor.py +8 -10
  46. mindsdb/api/mysql/mysql_proxy/libs/constants/mysql.py +54 -38
  47. mindsdb/api/mysql/mysql_proxy/mysql_proxy.py +86 -123
  48. mindsdb/api/mysql/mysql_proxy/utilities/dump.py +351 -0
  49. mindsdb/api/mysql/mysql_proxy/utilities/exceptions.py +0 -4
  50. mindsdb/api/postgres/postgres_proxy/executor/executor.py +1 -1
  51. mindsdb/api/postgres/postgres_proxy/postgres_packets/postgres_message_formats.py +2 -2
  52. mindsdb/api/postgres/postgres_proxy/postgres_proxy.py +5 -6
  53. mindsdb/integrations/handlers/altibase_handler/altibase_handler.py +26 -27
  54. mindsdb/integrations/handlers/altibase_handler/connection_args.py +13 -13
  55. mindsdb/integrations/handlers/altibase_handler/tests/test_altibase_handler.py +8 -8
  56. mindsdb/integrations/handlers/altibase_handler/tests/test_altibase_handler_dsn.py +13 -13
  57. mindsdb/integrations/handlers/anthropic_handler/__init__.py +2 -2
  58. mindsdb/integrations/handlers/anthropic_handler/anthropic_handler.py +1 -3
  59. mindsdb/integrations/handlers/aurora_handler/aurora_handler.py +1 -0
  60. mindsdb/integrations/handlers/autosklearn_handler/autosklearn_handler.py +1 -1
  61. mindsdb/integrations/handlers/autosklearn_handler/config.py +0 -1
  62. mindsdb/integrations/handlers/bigquery_handler/bigquery_handler.py +1 -1
  63. mindsdb/integrations/handlers/bigquery_handler/requirements.txt +1 -0
  64. mindsdb/integrations/handlers/bigquery_handler/tests/test_bigquery_handler.py +1 -1
  65. mindsdb/integrations/handlers/binance_handler/binance_handler.py +1 -0
  66. mindsdb/integrations/handlers/binance_handler/binance_tables.py +3 -4
  67. mindsdb/integrations/handlers/byom_handler/__init__.py +0 -1
  68. mindsdb/integrations/handlers/chromadb_handler/requirements.txt +1 -0
  69. mindsdb/integrations/handlers/ckan_handler/ckan_handler.py +3 -0
  70. mindsdb/integrations/handlers/clickhouse_handler/__init__.py +1 -1
  71. mindsdb/integrations/handlers/cloud_spanner_handler/tests/test_cloud_spanner_handler.py +0 -2
  72. mindsdb/integrations/handlers/cloud_sql_handler/cloud_sql_handler.py +0 -1
  73. mindsdb/integrations/handlers/cohere_handler/__init__.py +1 -1
  74. mindsdb/integrations/handlers/cohere_handler/cohere_handler.py +11 -13
  75. mindsdb/integrations/handlers/confluence_handler/confluence_tables.py +6 -0
  76. mindsdb/integrations/handlers/databend_handler/connection_args.py +1 -1
  77. mindsdb/integrations/handlers/databend_handler/databend_handler.py +4 -4
  78. mindsdb/integrations/handlers/databend_handler/tests/__init__.py +0 -1
  79. mindsdb/integrations/handlers/databend_handler/tests/test_databend_handler.py +1 -1
  80. mindsdb/integrations/handlers/derby_handler/connection_args.py +1 -1
  81. mindsdb/integrations/handlers/derby_handler/derby_handler.py +14 -22
  82. mindsdb/integrations/handlers/derby_handler/tests/test_derby_handler.py +6 -6
  83. mindsdb/integrations/handlers/discord_handler/discord_handler.py +5 -5
  84. mindsdb/integrations/handlers/discord_handler/discord_tables.py +3 -3
  85. mindsdb/integrations/handlers/discord_handler/tests/test_discord.py +5 -3
  86. mindsdb/integrations/handlers/dockerhub_handler/dockerhub.py +3 -3
  87. mindsdb/integrations/handlers/dockerhub_handler/dockerhub_handler.py +2 -2
  88. mindsdb/integrations/handlers/dockerhub_handler/dockerhub_tables.py +57 -54
  89. mindsdb/integrations/handlers/dremio_handler/__init__.py +2 -2
  90. mindsdb/integrations/handlers/druid_handler/__init__.py +1 -1
  91. mindsdb/integrations/handlers/druid_handler/druid_handler.py +2 -2
  92. mindsdb/integrations/handlers/edgelessdb_handler/tests/test_edgelessdb_handler.py +9 -9
  93. mindsdb/integrations/handlers/email_handler/email_client.py +1 -1
  94. mindsdb/integrations/handlers/email_handler/email_ingestor.py +1 -1
  95. mindsdb/integrations/handlers/email_handler/email_tables.py +0 -1
  96. mindsdb/integrations/handlers/email_handler/settings.py +0 -1
  97. mindsdb/integrations/handlers/eventstoredb_handler/eventstoredb_handler.py +2 -1
  98. mindsdb/integrations/handlers/firebird_handler/firebird_handler.py +1 -1
  99. mindsdb/integrations/handlers/flaml_handler/flaml_handler.py +9 -9
  100. mindsdb/integrations/handlers/frappe_handler/frappe_client.py +5 -5
  101. mindsdb/integrations/handlers/frappe_handler/frappe_handler.py +6 -5
  102. mindsdb/integrations/handlers/frappe_handler/frappe_tables.py +2 -2
  103. mindsdb/integrations/handlers/github_handler/connection_args.py +2 -2
  104. mindsdb/integrations/handlers/github_handler/github_handler.py +1 -8
  105. mindsdb/integrations/handlers/github_handler/github_tables.py +13 -24
  106. mindsdb/integrations/handlers/gitlab_handler/gitlab_handler.py +2 -1
  107. mindsdb/integrations/handlers/gitlab_handler/gitlab_tables.py +1 -4
  108. mindsdb/integrations/handlers/gmail_handler/gmail_handler.py +6 -13
  109. mindsdb/integrations/handlers/gmail_handler/requirements.txt +1 -0
  110. mindsdb/integrations/handlers/google_analytics_handler/requirements.txt +2 -1
  111. mindsdb/integrations/handlers/google_books_handler/google_books_handler.py +2 -1
  112. mindsdb/integrations/handlers/google_books_handler/google_books_tables.py +0 -3
  113. mindsdb/integrations/handlers/google_books_handler/requirements.txt +1 -1
  114. mindsdb/integrations/handlers/google_calendar_handler/google_calendar_handler.py +4 -4
  115. mindsdb/integrations/handlers/google_calendar_handler/google_calendar_tables.py +2 -6
  116. mindsdb/integrations/handlers/google_calendar_handler/requirements.txt +1 -0
  117. mindsdb/integrations/handlers/google_content_shopping_handler/google_content_shopping_handler.py +3 -2
  118. mindsdb/integrations/handlers/google_content_shopping_handler/google_content_shopping_tables.py +0 -3
  119. mindsdb/integrations/handlers/google_content_shopping_handler/requirements.txt +1 -1
  120. mindsdb/integrations/handlers/google_fit_handler/google_fit_handler.py +10 -12
  121. mindsdb/integrations/handlers/google_fit_handler/google_fit_tables.py +11 -13
  122. mindsdb/integrations/handlers/google_fit_handler/requirements.txt +2 -0
  123. mindsdb/integrations/handlers/google_search_handler/google_search_handler.py +2 -1
  124. mindsdb/integrations/handlers/google_search_handler/google_search_tables.py +0 -3
  125. mindsdb/integrations/handlers/google_search_handler/requirements.txt +1 -1
  126. mindsdb/integrations/handlers/groq_handler/__init__.py +3 -3
  127. mindsdb/integrations/handlers/hackernews_handler/hn_handler.py +5 -7
  128. mindsdb/integrations/handlers/hackernews_handler/hn_table.py +6 -7
  129. mindsdb/integrations/handlers/hive_handler/tests/test_hive_handler.py +1 -1
  130. mindsdb/integrations/handlers/hsqldb_handler/connection_args.py +6 -6
  131. mindsdb/integrations/handlers/hsqldb_handler/hsqldb_handler.py +4 -3
  132. mindsdb/integrations/handlers/huggingface_api_handler/exceptions.py +1 -1
  133. mindsdb/integrations/handlers/huggingface_api_handler/huggingface_api_handler.py +1 -8
  134. mindsdb/integrations/handlers/huggingface_handler/huggingface_handler.py +6 -6
  135. mindsdb/integrations/handlers/huggingface_handler/requirements.txt +1 -1
  136. mindsdb/integrations/handlers/huggingface_handler/requirements_cpu.txt +1 -1
  137. mindsdb/integrations/handlers/ignite_handler/ignite_handler.py +2 -1
  138. mindsdb/integrations/handlers/impala_handler/impala_handler.py +9 -12
  139. mindsdb/integrations/handlers/impala_handler/tests/test_impala_handler.py +11 -11
  140. mindsdb/integrations/handlers/influxdb_handler/influxdb_handler.py +10 -13
  141. mindsdb/integrations/handlers/influxdb_handler/influxdb_tables.py +20 -20
  142. mindsdb/integrations/handlers/informix_handler/__about__.py +8 -8
  143. mindsdb/integrations/handlers/informix_handler/__init__.py +12 -5
  144. mindsdb/integrations/handlers/informix_handler/informix_handler.py +99 -133
  145. mindsdb/integrations/handlers/informix_handler/tests/test_informix_handler.py +13 -11
  146. mindsdb/integrations/handlers/ingres_handler/__about__.py +0 -1
  147. mindsdb/integrations/handlers/ingres_handler/ingres_handler.py +1 -0
  148. mindsdb/integrations/handlers/jira_handler/jira_handler.archived.py +75 -0
  149. mindsdb/integrations/handlers/jira_handler/jira_handler.py +113 -38
  150. mindsdb/integrations/handlers/jira_handler/jira_tables.py +229 -0
  151. mindsdb/integrations/handlers/jira_handler/requirements.txt +1 -0
  152. mindsdb/integrations/handlers/kinetica_handler/__init__.py +0 -1
  153. mindsdb/integrations/handlers/langchain_handler/langchain_handler.py +4 -4
  154. mindsdb/integrations/handlers/langchain_handler/tools.py +9 -10
  155. mindsdb/integrations/handlers/leonardoai_handler/__init__.py +1 -1
  156. mindsdb/integrations/handlers/lightfm_handler/requirements.txt +1 -0
  157. mindsdb/integrations/handlers/lightwood_handler/functions.py +2 -2
  158. mindsdb/integrations/handlers/lightwood_handler/lightwood_handler.py +0 -3
  159. mindsdb/integrations/handlers/lightwood_handler/requirements.txt +4 -4
  160. mindsdb/integrations/handlers/lightwood_handler/tests/test_lightwood_handler.py +11 -11
  161. mindsdb/integrations/handlers/lindorm_handler/requirements.txt +1 -0
  162. mindsdb/integrations/handlers/llama_index_handler/llama_index_handler.py +4 -4
  163. mindsdb/integrations/handlers/llama_index_handler/settings.py +10 -9
  164. mindsdb/integrations/handlers/materialize_handler/tests/test_materialize_handler.py +8 -10
  165. mindsdb/integrations/handlers/matrixone_handler/matrixone_handler.py +4 -4
  166. mindsdb/integrations/handlers/matrixone_handler/tests/test_matrixone_handler.py +8 -9
  167. mindsdb/integrations/handlers/maxdb_handler/connection_args.py +25 -25
  168. mindsdb/integrations/handlers/maxdb_handler/maxdb_handler.py +1 -0
  169. mindsdb/integrations/handlers/mediawiki_handler/mediawiki_handler.py +3 -2
  170. mindsdb/integrations/handlers/mediawiki_handler/mediawiki_tables.py +1 -1
  171. mindsdb/integrations/handlers/mendeley_handler/__about__.py +1 -1
  172. mindsdb/integrations/handlers/mendeley_handler/__init__.py +2 -2
  173. mindsdb/integrations/handlers/mendeley_handler/mendeley_handler.py +48 -56
  174. mindsdb/integrations/handlers/mendeley_handler/mendeley_tables.py +24 -29
  175. mindsdb/integrations/handlers/mendeley_handler/tests/test_mendeley_handler.py +19 -17
  176. mindsdb/integrations/handlers/merlion_handler/merlion_handler.py +5 -4
  177. mindsdb/integrations/handlers/minds_endpoint_handler/__init__.py +3 -3
  178. mindsdb/integrations/handlers/mlflow_handler/mlflow_handler.py +58 -36
  179. mindsdb/integrations/handlers/monetdb_handler/__about__.py +8 -8
  180. mindsdb/integrations/handlers/monetdb_handler/__init__.py +15 -5
  181. mindsdb/integrations/handlers/monetdb_handler/connection_args.py +17 -18
  182. mindsdb/integrations/handlers/monetdb_handler/monetdb_handler.py +40 -57
  183. mindsdb/integrations/handlers/monetdb_handler/tests/test_monetdb_handler.py +7 -8
  184. mindsdb/integrations/handlers/monetdb_handler/utils/monet_get_id.py +13 -14
  185. mindsdb/integrations/handlers/monkeylearn_handler/__about__.py +1 -1
  186. mindsdb/integrations/handlers/monkeylearn_handler/__init__.py +1 -1
  187. mindsdb/integrations/handlers/monkeylearn_handler/monkeylearn_handler.py +2 -5
  188. mindsdb/integrations/handlers/ms_one_drive_handler/ms_graph_api_one_drive_client.py +1 -0
  189. mindsdb/integrations/handlers/ms_one_drive_handler/ms_one_drive_handler.py +1 -1
  190. mindsdb/integrations/handlers/ms_one_drive_handler/requirements.txt +2 -0
  191. mindsdb/integrations/handlers/ms_teams_handler/ms_graph_api_teams_client.py +23 -23
  192. mindsdb/integrations/handlers/ms_teams_handler/ms_teams_handler.py +3 -3
  193. mindsdb/integrations/handlers/ms_teams_handler/ms_teams_tables.py +10 -5
  194. mindsdb/integrations/handlers/ms_teams_handler/requirements.txt +3 -1
  195. mindsdb/integrations/handlers/mssql_handler/mssql_handler.py +73 -8
  196. mindsdb/integrations/handlers/mysql_handler/__about__.py +8 -8
  197. mindsdb/integrations/handlers/mysql_handler/__init__.py +15 -5
  198. mindsdb/integrations/handlers/mysql_handler/connection_args.py +43 -47
  199. mindsdb/integrations/handlers/mysql_handler/mysql_handler.py +101 -34
  200. mindsdb/integrations/handlers/mysql_handler/settings.py +15 -13
  201. mindsdb/integrations/handlers/neuralforecast_handler/neuralforecast_handler.py +1 -1
  202. mindsdb/integrations/handlers/newsapi_handler/newsapi_handler.py +1 -1
  203. mindsdb/integrations/handlers/newsapi_handler/tests/test_newsapi_handler.py +4 -4
  204. mindsdb/integrations/handlers/nuo_jdbc_handler/connection_args.py +2 -2
  205. mindsdb/integrations/handlers/nuo_jdbc_handler/nuo_jdbc_handler.py +28 -36
  206. mindsdb/integrations/handlers/nuo_jdbc_handler/tests/test_nuo_handler.py +5 -5
  207. mindsdb/integrations/handlers/oceanbase_handler/oceanbase_handler.py +0 -1
  208. mindsdb/integrations/handlers/oceanbase_handler/tests/test_oceanbase_handler.py +8 -10
  209. mindsdb/integrations/handlers/ollama_handler/ollama_handler.py +3 -3
  210. mindsdb/integrations/handlers/openai_handler/openai_handler.py +5 -4
  211. mindsdb/integrations/handlers/opengauss_handler/tests/test_opengauss_handler.py +1 -2
  212. mindsdb/integrations/handlers/openstreetmap_handler/__init__.py +7 -7
  213. mindsdb/integrations/handlers/oracle_handler/connection_args.py +6 -0
  214. mindsdb/integrations/handlers/oracle_handler/oracle_handler.py +77 -11
  215. mindsdb/integrations/handlers/orioledb_handler/tests/test_orioledb_handler.py +8 -10
  216. mindsdb/integrations/handlers/palm_handler/__about__.py +1 -1
  217. mindsdb/integrations/handlers/palm_handler/__init__.py +1 -1
  218. mindsdb/integrations/handlers/palm_handler/palm_handler.py +1 -3
  219. mindsdb/integrations/handlers/paypal_handler/paypal_handler.py +2 -2
  220. mindsdb/integrations/handlers/paypal_handler/paypal_tables.py +15 -14
  221. mindsdb/integrations/handlers/pgvector_handler/pgvector_handler.py +53 -10
  222. mindsdb/integrations/handlers/phoenix_handler/__init__.py +1 -1
  223. mindsdb/integrations/handlers/phoenix_handler/phoenix_handler.py +1 -0
  224. mindsdb/integrations/handlers/pinot_handler/__init__.py +1 -1
  225. mindsdb/integrations/handlers/pinot_handler/pinot_handler.py +3 -2
  226. mindsdb/integrations/handlers/plaid_handler/plaid_handler.py +13 -13
  227. mindsdb/integrations/handlers/plaid_handler/plaid_tables.py +10 -12
  228. mindsdb/integrations/handlers/plaid_handler/utils.py +4 -6
  229. mindsdb/integrations/handlers/planetscale_handler/planetscale_handler.py +1 -4
  230. mindsdb/integrations/handlers/portkey_handler/__init__.py +2 -2
  231. mindsdb/integrations/handlers/postgres_handler/postgres_handler.py +105 -24
  232. mindsdb/integrations/handlers/postgres_handler/tests/test_postgres_handler.py +11 -6
  233. mindsdb/integrations/handlers/questdb_handler/questdb_handler.py +1 -2
  234. mindsdb/integrations/handlers/questdb_handler/tests/test_questdb_handler.py +2 -3
  235. mindsdb/integrations/handlers/quickbooks_handler/quickbooks_handler.py +6 -8
  236. mindsdb/integrations/handlers/quickbooks_handler/quickbooks_table.py +10 -10
  237. mindsdb/integrations/handlers/rag_handler/ingest.py +2 -2
  238. mindsdb/integrations/handlers/rag_handler/rag_handler.py +1 -1
  239. mindsdb/integrations/handlers/rag_handler/settings.py +1 -1
  240. mindsdb/integrations/handlers/reddit_handler/reddit_handler.py +2 -7
  241. mindsdb/integrations/handlers/reddit_handler/reddit_tables.py +2 -3
  242. mindsdb/integrations/handlers/replicate_handler/replicate_handler.py +6 -6
  243. mindsdb/integrations/handlers/rocket_chat_handler/rocket_chat_handler.py +1 -2
  244. mindsdb/integrations/handlers/rocket_chat_handler/rocket_chat_tables.py +0 -3
  245. mindsdb/integrations/handlers/rockset_handler/connection_args.py +14 -14
  246. mindsdb/integrations/handlers/rockset_handler/tests/test_rockset_handler.py +1 -0
  247. mindsdb/integrations/handlers/scylla_handler/scylla_handler.py +6 -5
  248. mindsdb/integrations/handlers/sendinblue_handler/sendinblue_handler.py +2 -1
  249. mindsdb/integrations/handlers/sendinblue_handler/sendinblue_tables.py +16 -16
  250. mindsdb/integrations/handlers/sentence_transformers_handler/__init__.py +1 -1
  251. mindsdb/integrations/handlers/sheets_handler/connection_args.py +1 -1
  252. mindsdb/integrations/handlers/shopify_handler/shopify_handler.py +7 -6
  253. mindsdb/integrations/handlers/shopify_handler/shopify_tables.py +38 -41
  254. mindsdb/integrations/handlers/singlestore_handler/__about__.py +1 -1
  255. mindsdb/integrations/handlers/singlestore_handler/__init__.py +0 -1
  256. mindsdb/integrations/handlers/singlestore_handler/singlestore_handler.py +1 -0
  257. mindsdb/integrations/handlers/singlestore_handler/tests/test_singlestore_handler.py +3 -3
  258. mindsdb/integrations/handlers/slack_handler/__init__.py +3 -3
  259. mindsdb/integrations/handlers/snowflake_handler/requirements.txt +1 -1
  260. mindsdb/integrations/handlers/snowflake_handler/snowflake_handler.py +100 -6
  261. mindsdb/integrations/handlers/solr_handler/connection_args.py +7 -7
  262. mindsdb/integrations/handlers/solr_handler/solr_handler.py +2 -1
  263. mindsdb/integrations/handlers/solr_handler/tests/test_solr_handler.py +2 -1
  264. mindsdb/integrations/handlers/sqlany_handler/sqlany_handler.py +3 -2
  265. mindsdb/integrations/handlers/sqlite_handler/sqlite_handler.py +1 -0
  266. mindsdb/integrations/handlers/sqreamdb_handler/connection_args.py +1 -1
  267. mindsdb/integrations/handlers/sqreamdb_handler/sqreamdb_handler.py +15 -20
  268. mindsdb/integrations/handlers/sqreamdb_handler/tests/test_sqreamdb_handler.py +4 -4
  269. mindsdb/integrations/handlers/stabilityai_handler/__init__.py +1 -1
  270. mindsdb/integrations/handlers/starrocks_handler/starrocks_handler.py +0 -1
  271. mindsdb/integrations/handlers/starrocks_handler/tests/test_starrocks_handler.py +8 -10
  272. mindsdb/integrations/handlers/statsforecast_handler/statsforecast_handler.py +2 -2
  273. mindsdb/integrations/handlers/strava_handler/strava_handler.py +4 -8
  274. mindsdb/integrations/handlers/strava_handler/strava_tables.py +22 -30
  275. mindsdb/integrations/handlers/stripe_handler/stripe_handler.py +3 -2
  276. mindsdb/integrations/handlers/stripe_handler/stripe_tables.py +11 -27
  277. mindsdb/integrations/handlers/supabase_handler/tests/test_supabase_handler.py +1 -1
  278. mindsdb/integrations/handlers/surrealdb_handler/surrealdb_handler.py +4 -4
  279. mindsdb/integrations/handlers/tdengine_handler/tdengine_handler.py +25 -27
  280. mindsdb/integrations/handlers/tdengine_handler/tests/test_tdengine_handler.py +8 -8
  281. mindsdb/integrations/handlers/tidb_handler/tests/test_tidb_handler.py +1 -2
  282. mindsdb/integrations/handlers/timegpt_handler/timegpt_handler.py +5 -5
  283. mindsdb/integrations/handlers/tpot_handler/tpot_handler.py +21 -26
  284. mindsdb/integrations/handlers/trino_handler/trino_handler.py +14 -14
  285. mindsdb/integrations/handlers/twitter_handler/twitter_handler.py +2 -4
  286. mindsdb/integrations/handlers/unify_handler/tests/test_unify_handler.py +7 -8
  287. mindsdb/integrations/handlers/unify_handler/unify_handler.py +9 -9
  288. mindsdb/integrations/handlers/vertex_handler/requirements.txt +1 -0
  289. mindsdb/integrations/handlers/vertex_handler/vertex_client.py +1 -1
  290. mindsdb/integrations/handlers/vertica_handler/tests/test_vertica_handler.py +11 -11
  291. mindsdb/integrations/handlers/vertica_handler/vertica_handler.py +11 -14
  292. mindsdb/integrations/handlers/vitess_handler/tests/test_vitess_handler.py +9 -11
  293. mindsdb/integrations/handlers/vitess_handler/vitess_handler.py +0 -1
  294. mindsdb/integrations/handlers/web_handler/web_handler.py +1 -0
  295. mindsdb/integrations/handlers/whatsapp_handler/__init__.py +3 -3
  296. mindsdb/integrations/handlers/writer_handler/evaluate.py +1 -1
  297. mindsdb/integrations/handlers/writer_handler/settings.py +0 -1
  298. mindsdb/integrations/handlers/writer_handler/writer_handler.py +1 -0
  299. mindsdb/integrations/handlers/youtube_handler/requirements.txt +1 -0
  300. mindsdb/integrations/handlers/youtube_handler/youtube_handler.py +5 -5
  301. mindsdb/integrations/handlers/youtube_handler/youtube_tables.py +26 -27
  302. mindsdb/integrations/handlers/yugabyte_handler/tests/test_yugabyte_handler.py +3 -3
  303. mindsdb/integrations/handlers/yugabyte_handler/yugabyte_handler.py +0 -6
  304. mindsdb/integrations/libs/response.py +67 -52
  305. mindsdb/integrations/libs/vectordatabase_handler.py +6 -0
  306. mindsdb/integrations/utilities/files/file_reader.py +5 -2
  307. mindsdb/integrations/utilities/handler_utils.py +15 -3
  308. mindsdb/integrations/utilities/handlers/api_utilities/__init__.py +0 -1
  309. mindsdb/integrations/utilities/handlers/auth_utilities/__init__.py +0 -2
  310. mindsdb/integrations/utilities/utils.py +3 -3
  311. mindsdb/interfaces/agents/agents_controller.py +164 -1
  312. mindsdb/interfaces/agents/constants.py +29 -2
  313. mindsdb/interfaces/agents/langchain_agent.py +18 -8
  314. mindsdb/interfaces/agents/mindsdb_database_agent.py +101 -2
  315. mindsdb/interfaces/database/projects.py +1 -7
  316. mindsdb/interfaces/functions/controller.py +11 -14
  317. mindsdb/interfaces/functions/to_markdown.py +9 -124
  318. mindsdb/interfaces/knowledge_base/controller.py +47 -19
  319. mindsdb/interfaces/knowledge_base/preprocessing/document_preprocessor.py +41 -15
  320. mindsdb/interfaces/knowledge_base/preprocessing/json_chunker.py +434 -0
  321. mindsdb/interfaces/knowledge_base/preprocessing/models.py +54 -0
  322. mindsdb/interfaces/knowledge_base/utils.py +10 -15
  323. mindsdb/interfaces/model/model_controller.py +0 -2
  324. mindsdb/interfaces/query_context/context_controller.py +66 -10
  325. mindsdb/interfaces/skills/custom/text2sql/mindsdb_kb_tools.py +190 -0
  326. mindsdb/interfaces/skills/custom/text2sql/mindsdb_sql_toolkit.py +92 -0
  327. mindsdb/interfaces/skills/skill_tool.py +202 -57
  328. mindsdb/interfaces/skills/sql_agent.py +238 -28
  329. mindsdb/interfaces/storage/fs.py +1 -0
  330. mindsdb/interfaces/variables/__init__.py +0 -0
  331. mindsdb/interfaces/variables/variables_controller.py +97 -0
  332. mindsdb/migrations/env.py +5 -7
  333. mindsdb/migrations/migrate.py +47 -9
  334. mindsdb/migrations/versions/2025-05-21_9f150e4f9a05_checkpoint_1.py +360 -0
  335. mindsdb/utilities/config.py +333 -220
  336. mindsdb/utilities/context.py +1 -1
  337. mindsdb/utilities/functions.py +0 -36
  338. mindsdb/utilities/langfuse.py +19 -10
  339. mindsdb/utilities/otel/__init__.py +9 -193
  340. mindsdb/utilities/otel/metric_handlers/__init__.py +5 -1
  341. mindsdb/utilities/otel/prepare.py +198 -0
  342. mindsdb/utilities/sql.py +83 -0
  343. mindsdb/utilities/starters.py +13 -0
  344. {mindsdb-25.4.5.0.dist-info → mindsdb-25.5.4.0.dist-info}/METADATA +351 -338
  345. {mindsdb-25.4.5.0.dist-info → mindsdb-25.5.4.0.dist-info}/RECORD +348 -322
  346. {mindsdb-25.4.5.0.dist-info → mindsdb-25.5.4.0.dist-info}/WHEEL +1 -1
  347. mindsdb/api/mysql/mysql_proxy/classes/sql_statement_parser.py +0 -151
  348. mindsdb/integrations/handlers/monkeylearn_handler/requirements.txt +0 -1
  349. {mindsdb-25.4.5.0.dist-info → mindsdb-25.5.4.0.dist-info}/licenses/LICENSE +0 -0
  350. {mindsdb-25.4.5.0.dist-info → mindsdb-25.5.4.0.dist-info}/top_level.txt +0 -0
@@ -76,7 +76,7 @@ class MessagesTable(APITable):
76
76
  raise NotImplementedError(
77
77
  f'Unsupported operator {op} for timestamp'
78
78
  )
79
-
79
+
80
80
  elif arg1 in ['author_id', 'author_username', 'author_global_name']:
81
81
  if user_filter_flag:
82
82
  raise NotImplementedError('Multiple user filters are not supported')
@@ -108,7 +108,7 @@ class MessagesTable(APITable):
108
108
 
109
109
  if not channel_filter_flag:
110
110
  raise NotImplementedError('Channel filter is required')
111
-
111
+
112
112
  result = self.handler.call_discord_api(
113
113
  'get_messages', params=params, filters=filters
114
114
  )
@@ -183,7 +183,7 @@ class MessagesTable(APITable):
183
183
  try:
184
184
  params = {'channel_id': message['channel_id'], 'text': message['text']}
185
185
  self.handler.call_discord_api('send_message', params=params)
186
- logger.info(f"Message sent to Discord channel successfully.")
186
+ logger.info("Message sent to Discord channel successfully.")
187
187
  except Exception as e:
188
188
  logger.error(f"Error sending message to Discord channel: {e}")
189
189
  raise e
@@ -1,16 +1,17 @@
1
1
  import unittest
2
2
  from unittest.mock import patch
3
- from mindsdb.integrations.handlers.discord_handler.discord_handler import DiscordHandler
4
3
 
5
4
  from mindsdb_sql_parser import ast
6
5
  from mindsdb_sql_parser.ast import BinaryOperation, Identifier, Constant
7
6
  from mindsdb_sql_parser.ast.select.star import Star
7
+ from mindsdb.integrations.handlers.discord_handler.discord_handler import DiscordHandler
8
+
8
9
 
9
10
  class DiscordHandlerTest(unittest.TestCase):
10
11
  @classmethod
11
12
  def setUpClass(cls):
12
13
  cls.handler = DiscordHandler(
13
- name = 'discord_datasource', connection_data = {'token': 'test-discord-token'}
14
+ name='discord_datasource', connection_data={'token': 'test-discord-token'}
14
15
  )
15
16
 
16
17
  def test_0_check_connection(self):
@@ -28,7 +29,7 @@ class DiscordHandlerTest(unittest.TestCase):
28
29
  ),
29
30
  )
30
31
 
31
- messages = self.handler._tables['messages'].select(query)
32
+ self.handler._tables['messages'].select(query)
32
33
  mock_get.assert_called_with(
33
34
  'https://discord.com/api/v10/channels/1234567890/messages',
34
35
  headers={
@@ -55,5 +56,6 @@ class DiscordHandlerTest(unittest.TestCase):
55
56
  json={'content': 'Test message'},
56
57
  )
57
58
 
59
+
58
60
  if __name__ == '__main__':
59
61
  unittest.main()
@@ -41,15 +41,15 @@ class DockerHubClient:
41
41
  def get_repo_images(self, namespace, repo):
42
42
  url = f'{self.docker_hub_base_endpoint}namespaces/{namespace}/repositories/{repo}/images'
43
43
  return self.make_request(url)
44
-
44
+
45
45
  def get_repo_tag(self, namespace, repo, tag):
46
46
  url = f'{self.docker_hub_base_endpoint}namespaces/{namespace}/repositories/{repo}/tags/{tag}'
47
47
  return self.make_request(url)
48
-
48
+
49
49
  def get_repo_tags(self, namespace, repo):
50
50
  url = f'{self.docker_hub_base_endpoint}namespaces/{namespace}/repositories/{repo}/tags'
51
51
  return self.make_request(url)
52
-
52
+
53
53
  def get_org_settings(self, namespace):
54
54
  url = f'{self.docker_hub_base_endpoint}orgs/{namespace}/settings'
55
55
  return self.make_request(url)
@@ -38,13 +38,13 @@ class DockerHubHandler(APIHandler):
38
38
 
39
39
  repo_images_stats_data = DockerHubRepoImagesSummaryTable(self)
40
40
  self._register_table("repo_images_summary", repo_images_stats_data)
41
-
41
+
42
42
  repo_images_data = DockerHubRepoImagesTable(self)
43
43
  self._register_table("repo_images", repo_images_data)
44
44
 
45
45
  repo_tag_details_data = DockerHubRepoTagTable(self)
46
46
  self._register_table("repo_tag_details", repo_tag_details_data)
47
-
47
+
48
48
  repo_tags_data = DockerHubRepoTagsTable(self)
49
49
  self._register_table("repo_tags", repo_tags_data)
50
50
 
@@ -100,7 +100,8 @@ class DockerHubRepoImagesSummaryTable(APITable):
100
100
  "active",
101
101
  "inactive"
102
102
  ]
103
-
103
+
104
+
104
105
  class DockerHubOrgSettingsTable(APITable):
105
106
  """The DockerHub Repo Org Settings Table implementation"""
106
107
 
@@ -186,6 +187,7 @@ class DockerHubOrgSettingsTable(APITable):
186
187
  "restricted_images_allow_verified_publishers"
187
188
  ]
188
189
 
190
+
189
191
  class DockerHubRepoImagesTable(APITable):
190
192
  """The DockerHub Repo Images Table implementation"""
191
193
 
@@ -273,13 +275,13 @@ class DockerHubRepoImagesTable(APITable):
273
275
  """
274
276
 
275
277
  return ["namespace",
276
- "repository",
277
- "digest",
278
- "tags",
279
- "last_pushed",
280
- "last_pulled",
281
- "status"
282
- ]
278
+ "repository",
279
+ "digest",
280
+ "tags",
281
+ "last_pushed",
282
+ "last_pulled",
283
+ "status"
284
+ ]
283
285
 
284
286
 
285
287
  class DockerHubRepoTagTable(APITable):
@@ -346,22 +348,22 @@ class DockerHubRepoTagTable(APITable):
346
348
 
347
349
  content = response["content"]
348
350
 
349
- repo_tag_summary_df = pd.json_normalize({"creator": content["creator"],
350
- "id": content["id"],
351
- "images": content["images"],
352
- "last_updated": content["last_updated"],
353
- "last_updater": content["last_updater"],
354
- "last_updater_username": content["last_updater_username"],
355
- "name": content["name"],
356
- "repository": content["repository"],
357
- "full_size": content["full_size"],
358
- "v2": content["v2"],
359
- "tag_status": content["tag_status"],
360
- "tag_last_pulled": content["tag_last_pulled"],
361
- "tag_last_pushed": content["tag_last_pushed"],
362
- "media_type": content["media_type"],
363
- "content_type": content["media_type"]
364
- })
351
+ repo_tag_summary_df = pd.json_normalize({"creator": content["creator"],
352
+ "id": content["id"],
353
+ "images": content["images"],
354
+ "last_updated": content["last_updated"],
355
+ "last_updater": content["last_updater"],
356
+ "last_updater_username": content["last_updater_username"],
357
+ "name": content["name"],
358
+ "repository": content["repository"],
359
+ "full_size": content["full_size"],
360
+ "v2": content["v2"],
361
+ "tag_status": content["tag_status"],
362
+ "tag_last_pulled": content["tag_last_pulled"],
363
+ "tag_last_pushed": content["tag_last_pushed"],
364
+ "media_type": content["media_type"],
365
+ "content_type": content["media_type"]
366
+ })
365
367
 
366
368
  select_statement_executor = SELECTQueryExecutor(
367
369
  repo_tag_summary_df,
@@ -388,22 +390,23 @@ class DockerHubRepoTagTable(APITable):
388
390
  List of columns
389
391
  """
390
392
 
391
- return ["creator",
392
- "id",
393
- "images",
394
- "last_updated",
395
- "last_updater",
396
- "last_updater_username",
397
- "name",
398
- "repository",
399
- "full_size",
400
- "v2",
401
- "tag_status",
402
- "tag_last_pulled",
403
- "tag_last_pushed",
404
- "media_type",
393
+ return ["creator",
394
+ "id",
395
+ "images",
396
+ "last_updated",
397
+ "last_updater",
398
+ "last_updater_username",
399
+ "name",
400
+ "repository",
401
+ "full_size",
402
+ "v2",
403
+ "tag_status",
404
+ "tag_last_pulled",
405
+ "tag_last_pushed",
406
+ "media_type",
405
407
  "content_type"
406
- ]
408
+ ]
409
+
407
410
 
408
411
  class DockerHubRepoTagsTable(APITable):
409
412
  """The DockerHub Repo Tags Table implementation"""
@@ -491,19 +494,19 @@ class DockerHubRepoTagsTable(APITable):
491
494
  List of columns
492
495
  """
493
496
 
494
- return ["creator",
495
- "id",
496
- "images",
497
- "last_updated",
498
- "last_updater",
499
- "last_updater_username",
500
- "name",
501
- "repository",
502
- "full_size",
503
- "v2",
504
- "tag_status",
505
- "tag_last_pulled",
506
- "tag_last_pushed",
507
- "media_type",
497
+ return ["creator",
498
+ "id",
499
+ "images",
500
+ "last_updated",
501
+ "last_updater",
502
+ "last_updater_username",
503
+ "name",
504
+ "repository",
505
+ "full_size",
506
+ "v2",
507
+ "tag_status",
508
+ "tag_last_pulled",
509
+ "tag_last_pushed",
510
+ "media_type",
508
511
  "content_type"
509
- ]
512
+ ]
@@ -1,7 +1,7 @@
1
1
  from mindsdb.integrations.libs.const import HANDLER_TYPE
2
2
 
3
3
  from .__about__ import __version__ as version, __description__ as description
4
- from .connection_args import connection_args, connection_args
4
+ from .connection_args import connection_args
5
5
  try:
6
6
  from .dremio_handler import DremioHandler as Handler
7
7
  import_error = None
@@ -17,4 +17,4 @@ icon_path = 'icon.svg'
17
17
  __all__ = [
18
18
  'Handler', 'version', 'name', 'type', 'title', 'description',
19
19
  'connection_args', 'connection_args_example', 'import_error', 'icon_path'
20
- ]
20
+ ]
@@ -17,4 +17,4 @@ icon_path = 'icon.svg'
17
17
  __all__ = [
18
18
  'Handler', 'version', 'name', 'type', 'title', 'description',
19
19
  'connection_args', 'connection_args_example', 'import_error', 'icon_path'
20
- ]
20
+ ]
@@ -105,8 +105,8 @@ class DruidHandler(DatabaseHandler):
105
105
  need_to_close = self.is_connected is False
106
106
 
107
107
  try:
108
- conn=self.connect()
109
- conn.cursor().execute('select 1') # raise exception if provided wrong credentials
108
+ conn = self.connect()
109
+ conn.cursor().execute('select 1') # raise exception if provided wrong credentials
110
110
 
111
111
  response.success = True
112
112
  except Exception as e:
@@ -2,6 +2,7 @@ import unittest
2
2
  from mindsdb.integrations.handlers.edgelessdb_handler.edgelessdb_handler import EdgelessDBHandler
3
3
  from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
4
4
 
5
+
5
6
  class EdgelessDBHandlerTest(unittest.TestCase):
6
7
  @classmethod
7
8
  def setUpClass(cls):
@@ -18,7 +19,7 @@ class EdgelessDBHandlerTest(unittest.TestCase):
18
19
 
19
20
  def test_0_connect(self):
20
21
  assert self.handler.connect()
21
-
22
+
22
23
  def test_1_drop_table(self):
23
24
  res = self.handler.query("DROP TABLE IF EXISTS TEST_TABLE")
24
25
  assert res.type is RESPONSE_TYPE.OK
@@ -26,20 +27,20 @@ class EdgelessDBHandlerTest(unittest.TestCase):
26
27
  def test_2_create_table(self):
27
28
  res = self.handler.query(
28
29
  '''CREATE TABLE TEST_TABLE (
29
- ID INT PRIMARY KEY,
30
+ ID INT PRIMARY KEY,
30
31
  NAME VARCHAR(14)
31
32
  )'''
32
- )
33
+ )
33
34
  assert res.type is RESPONSE_TYPE.OK
34
35
 
35
36
  def test_3_insert(self):
36
37
  res = self.handler.query(
37
- """INSERT INTO TEST_TABLE
38
- VALUES
38
+ """INSERT INTO TEST_TABLE
39
+ VALUES
39
40
  (100,'ONE HUNDRED'),
40
41
  (200,'TWO HUNDRED'),
41
42
  (300,'THREE HUNDRED')"""
42
- )
43
+ )
43
44
  assert res.type is RESPONSE_TYPE.OK
44
45
 
45
46
  def test_4_select(self):
@@ -59,8 +60,7 @@ class EdgelessDBHandlerTest(unittest.TestCase):
59
60
 
60
61
  def test_8_disconnect(self):
61
62
  assert self.handler.disconnect()
62
-
63
63
 
64
-
64
+
65
65
  if __name__ == '__main__':
66
- unittest.main()
66
+ unittest.main()
@@ -70,7 +70,7 @@ class EmailClient:
70
70
  def send_email(self, to_addr: str, subject: str, body: str):
71
71
  '''
72
72
  Sends an email to the given address.
73
-
73
+
74
74
  Parameters:
75
75
  to_addr (str): The email address to send the email to.
76
76
  subject (str): The subject of the email.
@@ -15,6 +15,7 @@ class EmailIngestor:
15
15
  Parses emails into a DataFrame.
16
16
  Does some preprocessing on the raw HTML to extract meaningful text.
17
17
  """
18
+
18
19
  def __init__(self, email_client: EmailClient, search_options: EmailSearchOptions):
19
20
  self.email_client = email_client
20
21
  self.search_options = search_options
@@ -83,4 +84,3 @@ class EmailIngestor:
83
84
  df['datetime'] = pd.to_datetime(df['datetime'], utc=True, format="%a, %d %b %Y %H:%M:%S %z", errors='coerce')
84
85
 
85
86
  return df
86
-
@@ -1,5 +1,4 @@
1
1
  import datetime as dt
2
- import ast
3
2
  import pytz
4
3
 
5
4
  import pandas as pd
@@ -57,4 +57,3 @@ class EmailConnectionDetails(BaseModel):
57
57
  }
58
58
  }
59
59
  extra = "forbid"
60
-
@@ -8,9 +8,10 @@ from mindsdb.integrations.libs.response import (
8
8
  RESPONSE_TYPE
9
9
  )
10
10
 
11
- from .utils.helpers import *
11
+ from .utils.helpers import get_auth_string, build_basic_url, build_health_url, build_stream_url, build_streams_url, build_next_url, entry_to_df, build_stream_url_last_event
12
12
  import requests
13
13
  import pandas as pd
14
+ import re
14
15
 
15
16
  logger = log.getLogger(__name__)
16
17
 
@@ -166,7 +166,7 @@ class FirebirdHandler(DatabaseHandler):
166
166
  """
167
167
 
168
168
  query = """
169
- SELECT RDB$RELATION_NAME
169
+ SELECT RDB$RELATION_NAME
170
170
  FROM RDB$RELATIONS
171
171
  WHERE (RDB$SYSTEM_FLAG <> 1 OR RDB$SYSTEM_FLAG IS NULL) AND RDB$VIEW_BLR IS NULL
172
172
  ORDER BY RDB$RELATION_NAME;
@@ -12,26 +12,26 @@ class FLAMLHandler(BaseMLEngine):
12
12
  def create(self, target: str, df: Optional[pd.DataFrame] = None, args: Optional[Dict] = None) -> None:
13
13
  if args is None:
14
14
  args = {}
15
-
15
+
16
16
  if df is not None:
17
17
  target_dtype = infer_types(df, 0).to_dict()["dtypes"][target]
18
18
  model = AutoML(verbose=0)
19
19
 
20
20
  if target_dtype in ['binary', 'categorical', 'tags']:
21
21
  model.fit(X_train=df.drop(columns=[target]),
22
- y_train=df[target],
23
- task='classification',
24
- **args.get('using'))
22
+ y_train=df[target],
23
+ task='classification',
24
+ **args.get('using'))
25
25
 
26
26
  elif target_dtype in ['integer', 'float', 'quantity']:
27
27
  model.fit(X_train=df.drop(columns=[target]),
28
- y_train=df[target],
29
- task='regression',
30
- **args.get('using'))
31
-
28
+ y_train=df[target],
29
+ task='regression',
30
+ **args.get('using'))
31
+
32
32
  self.model_storage.json_set('args', args)
33
33
  self.model_storage.file_set('model', dill.dumps(model))
34
-
34
+
35
35
  else:
36
36
  raise Exception(
37
37
  "Data is empty!!"
@@ -5,7 +5,7 @@ from typing import Dict, List
5
5
 
6
6
  class FrappeClient(object):
7
7
  """Client to interact with the Frappe API.
8
-
8
+
9
9
  Attributes:
10
10
  domain (str): Path to Frappe domain to use (e.g. https://mindsdbfrappe.com).
11
11
  access_token (str): Frappe authorization token to use for all API requests.
@@ -25,7 +25,7 @@ class FrappeClient(object):
25
25
 
26
26
  def get_document(self, doctype: str, name: str) -> Dict:
27
27
  """Gets a document matching the given doctype from Frappe.
28
-
28
+
29
29
  See https://frappeframework.com/docs/v14/user/en/api/rest#listing-documents
30
30
  Args:
31
31
  doctype (str): The document type to retrieve.
@@ -40,7 +40,7 @@ class FrappeClient(object):
40
40
 
41
41
  def get_documents(self, doctype: str, limit: int = None, fields: List[str] = None, filters: List[List] = None) -> List[Dict]:
42
42
  """Gets all documents matching the given doctype from Frappe.
43
-
43
+
44
44
  See https://frappeframework.com/docs/v14/user/en/api/rest#listing-documents
45
45
  Args:
46
46
  doctype (str): The document type to retrieve.
@@ -83,7 +83,7 @@ class FrappeClient(object):
83
83
  data: Dict):
84
84
  """Creates a new document of the given doctype.
85
85
  See https://frappeframework.com/docs/v14/user/en/api/rest#listing-documents
86
-
86
+
87
87
  Args:
88
88
  doctype (str): Type of the document to create.
89
89
  data (Dict): Document object.
@@ -99,7 +99,7 @@ class FrappeClient(object):
99
99
 
100
100
  def ping(self) -> bool:
101
101
  """Sends a basic request to the Frappe API to see if it succeeds.
102
-
102
+
103
103
  Returns whether or not the connection to the Frappe API is valid.
104
104
  See https://frappeframework.com/docs/v14/user/en/api/rest#1-token-based-authentication
105
105
  """
@@ -15,6 +15,7 @@ from mindsdb_sql_parser import parse_sql
15
15
 
16
16
  logger = log.getLogger(__name__)
17
17
 
18
+
18
19
  class FrappeHandler(APIHandler):
19
20
  """A class for handling connections and interactions with the Frappe API.
20
21
 
@@ -36,9 +37,9 @@ class FrappeHandler(APIHandler):
36
37
  self.is_connected = False
37
38
 
38
39
  args = kwargs.get('connection_data', {})
39
- if not 'access_token' in args:
40
+ if 'access_token' not in args:
40
41
  raise ValueError('"access_token" parameter required for authentication')
41
- if not 'domain' in args:
42
+ if 'domain' not in args:
42
43
  raise ValueError('"domain" parameter required to connect to your Frappe instance')
43
44
  self.access_token = args['access_token']
44
45
  self.domain = args['domain']
@@ -52,8 +53,8 @@ class FrappeHandler(APIHandler):
52
53
  'register_sales_invoice': 'have to be used by assistant to register a sales invoice. Input is JSON object serialized as a string. Due date have to be passed in format: "yyyy-mm-dd".',
53
54
  'check_company_exists': 'useful to check the company is exist. Input is company',
54
55
  'check_expense_type': 'useful to check the expense_type is exist. Input is expense_type',
55
- 'check_customer': 'useful to check the customer is exist. Input is customer',
56
- 'check_item_code': 'have to be used to check the item code. Input is item_code',
56
+ 'check_customer': 'useful to check the customer is exist. Input is customer',
57
+ 'check_item_code': 'have to be used to check the item code. Input is item_code',
57
58
  }
58
59
  return {
59
60
  'tools': tools,
@@ -96,7 +97,7 @@ class FrappeHandler(APIHandler):
96
97
  self.client.post_document('Sales Invoice', invoice)
97
98
  except Exception as e:
98
99
  return f"Error: {e}"
99
- return f"Success"
100
+ return "Success"
100
101
 
101
102
  def check_item_code(self, item_code):
102
103
  self.connect()
@@ -10,7 +10,7 @@ class FrappeDocumentsTable(APITable):
10
10
 
11
11
  def select(self, query: ast.Select) -> pd.DataFrame:
12
12
  """Selects data from the Frappe API and returns it as a pandas DataFrame.
13
-
13
+
14
14
  Returns dataframe representing the Frappe API results.
15
15
 
16
16
  Args:
@@ -30,7 +30,7 @@ class FrappeDocumentsTable(APITable):
30
30
  else:
31
31
  filters.append([arg1, op, arg2])
32
32
 
33
- if not 'doctype' in params:
33
+ if 'doctype' not in params:
34
34
  raise ValueError('"doctype" parameter required')
35
35
 
36
36
  if query.limit:
@@ -26,7 +26,7 @@ connection_args = OrderedDict(
26
26
  )
27
27
 
28
28
  connection_args_example = OrderedDict(
29
- repository="mindsdb/mindsdb",
30
- api_key="ghp_z91InCQZWZAMlddOzFCX7xHJrf9Fai35HT7",
29
+ repository="mindsdb/mindsdb",
30
+ api_key="ghp_z91InCQZWZAMlddOzFCX7xHJrf9Fai35HT7",
31
31
  github_url="https://github.com/mindsdb/mindsdb"
32
32
  )
@@ -4,13 +4,7 @@ from mindsdb_sql_parser import parse_sql
4
4
 
5
5
  from mindsdb.integrations.handlers.github_handler.github_tables import (
6
6
  GithubIssuesTable,
7
- GithubPullRequestsTable,
8
- GithubCommitsTable,
9
- GithubReleasesTable,
10
- GithubBranchesTable,
11
- GithubContributorsTable,
12
- GithubMilestonesTable,
13
- GithubProjectsTable, GithubFilesTable
7
+ GithubFilesTable
14
8
  )
15
9
  from mindsdb.integrations.handlers.github_handler.generate_api import get_github_types, get_github_methods, GHTable
16
10
  from mindsdb.integrations.libs.api_handler import APIHandler
@@ -59,7 +53,6 @@ class GithubHandler(APIHandler):
59
53
  table = GHTable(self, github_types=github_types, method=method)
60
54
  self._register_table(method.table_name, table)
61
55
 
62
-
63
56
  def connect(self) -> StatusResponse:
64
57
  """Set up the connection required by the handler.
65
58