asksql 2.1.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.
Files changed (291) hide show
  1. asksql-2.1.0.dist-info/METADATA +517 -0
  2. asksql-2.1.0.dist-info/RECORD +291 -0
  3. asksql-2.1.0.dist-info/WHEEL +4 -0
  4. asksql-2.1.0.dist-info/entry_points.txt +4 -0
  5. asksql-2.1.0.dist-info/licenses/LICENSE +21 -0
  6. vanna/__init__.py +172 -0
  7. vanna/agents/__init__.py +7 -0
  8. vanna/capabilities/__init__.py +17 -0
  9. vanna/capabilities/agent_memory/__init__.py +21 -0
  10. vanna/capabilities/agent_memory/base.py +103 -0
  11. vanna/capabilities/agent_memory/models.py +53 -0
  12. vanna/capabilities/file_system/__init__.py +14 -0
  13. vanna/capabilities/file_system/base.py +71 -0
  14. vanna/capabilities/file_system/models.py +25 -0
  15. vanna/capabilities/sql_runner/__init__.py +13 -0
  16. vanna/capabilities/sql_runner/base.py +37 -0
  17. vanna/capabilities/sql_runner/models.py +13 -0
  18. vanna/components/__init__.py +92 -0
  19. vanna/components/base.py +11 -0
  20. vanna/components/rich/__init__.py +83 -0
  21. vanna/components/rich/containers/__init__.py +7 -0
  22. vanna/components/rich/containers/card.py +20 -0
  23. vanna/components/rich/data/__init__.py +9 -0
  24. vanna/components/rich/data/chart.py +17 -0
  25. vanna/components/rich/data/dataframe.py +93 -0
  26. vanna/components/rich/feedback/__init__.py +21 -0
  27. vanna/components/rich/feedback/badge.py +16 -0
  28. vanna/components/rich/feedback/icon_text.py +14 -0
  29. vanna/components/rich/feedback/log_viewer.py +41 -0
  30. vanna/components/rich/feedback/notification.py +19 -0
  31. vanna/components/rich/feedback/progress.py +37 -0
  32. vanna/components/rich/feedback/status_card.py +28 -0
  33. vanna/components/rich/feedback/status_indicator.py +14 -0
  34. vanna/components/rich/interactive/__init__.py +21 -0
  35. vanna/components/rich/interactive/button.py +95 -0
  36. vanna/components/rich/interactive/task_list.py +58 -0
  37. vanna/components/rich/interactive/ui_state.py +93 -0
  38. vanna/components/rich/specialized/__init__.py +7 -0
  39. vanna/components/rich/specialized/artifact.py +20 -0
  40. vanna/components/rich/text.py +16 -0
  41. vanna/components/simple/__init__.py +15 -0
  42. vanna/components/simple/image.py +15 -0
  43. vanna/components/simple/link.py +15 -0
  44. vanna/components/simple/text.py +11 -0
  45. vanna/core/__init__.py +193 -0
  46. vanna/core/_compat.py +19 -0
  47. vanna/core/agent/__init__.py +10 -0
  48. vanna/core/agent/agent.py +1407 -0
  49. vanna/core/agent/config.py +123 -0
  50. vanna/core/audit/__init__.py +28 -0
  51. vanna/core/audit/base.py +299 -0
  52. vanna/core/audit/models.py +131 -0
  53. vanna/core/component_manager.py +329 -0
  54. vanna/core/components.py +53 -0
  55. vanna/core/enhancer/__init__.py +11 -0
  56. vanna/core/enhancer/base.py +94 -0
  57. vanna/core/enhancer/default.py +118 -0
  58. vanna/core/enricher/__init__.py +10 -0
  59. vanna/core/enricher/base.py +59 -0
  60. vanna/core/errors.py +47 -0
  61. vanna/core/evaluation/__init__.py +81 -0
  62. vanna/core/evaluation/base.py +186 -0
  63. vanna/core/evaluation/dataset.py +254 -0
  64. vanna/core/evaluation/evaluators.py +376 -0
  65. vanna/core/evaluation/report.py +289 -0
  66. vanna/core/evaluation/runner.py +313 -0
  67. vanna/core/filter/__init__.py +10 -0
  68. vanna/core/filter/base.py +67 -0
  69. vanna/core/lifecycle/__init__.py +10 -0
  70. vanna/core/lifecycle/base.py +83 -0
  71. vanna/core/llm/__init__.py +16 -0
  72. vanna/core/llm/base.py +40 -0
  73. vanna/core/llm/models.py +61 -0
  74. vanna/core/middleware/__init__.py +10 -0
  75. vanna/core/middleware/base.py +69 -0
  76. vanna/core/observability/__init__.py +11 -0
  77. vanna/core/observability/base.py +88 -0
  78. vanna/core/observability/models.py +47 -0
  79. vanna/core/recovery/__init__.py +11 -0
  80. vanna/core/recovery/base.py +84 -0
  81. vanna/core/recovery/models.py +32 -0
  82. vanna/core/registry.py +278 -0
  83. vanna/core/rich_component.py +156 -0
  84. vanna/core/simple_component.py +27 -0
  85. vanna/core/storage/__init__.py +14 -0
  86. vanna/core/storage/base.py +46 -0
  87. vanna/core/storage/models.py +46 -0
  88. vanna/core/system_prompt/__init__.py +13 -0
  89. vanna/core/system_prompt/base.py +36 -0
  90. vanna/core/system_prompt/default.py +157 -0
  91. vanna/core/tool/__init__.py +18 -0
  92. vanna/core/tool/base.py +70 -0
  93. vanna/core/tool/models.py +84 -0
  94. vanna/core/user/__init__.py +17 -0
  95. vanna/core/user/base.py +29 -0
  96. vanna/core/user/models.py +25 -0
  97. vanna/core/user/request_context.py +70 -0
  98. vanna/core/user/resolver.py +42 -0
  99. vanna/core/validation.py +164 -0
  100. vanna/core/workflow/__init__.py +12 -0
  101. vanna/core/workflow/base.py +254 -0
  102. vanna/core/workflow/default.py +789 -0
  103. vanna/examples/__init__.py +1 -0
  104. vanna/examples/__main__.py +44 -0
  105. vanna/examples/anthropic_quickstart.py +80 -0
  106. vanna/examples/artifact_example.py +293 -0
  107. vanna/examples/claude_sqlite_example.py +236 -0
  108. vanna/examples/coding_agent_example.py +300 -0
  109. vanna/examples/custom_system_prompt_example.py +174 -0
  110. vanna/examples/default_workflow_handler_example.py +208 -0
  111. vanna/examples/email_auth_example.py +340 -0
  112. vanna/examples/evaluation_example.py +269 -0
  113. vanna/examples/extensibility_example.py +262 -0
  114. vanna/examples/minimal_example.py +67 -0
  115. vanna/examples/mock_auth_example.py +227 -0
  116. vanna/examples/mock_custom_tool.py +311 -0
  117. vanna/examples/mock_quickstart.py +79 -0
  118. vanna/examples/mock_quota_example.py +145 -0
  119. vanna/examples/mock_rich_components_demo.py +396 -0
  120. vanna/examples/mock_sqlite_example.py +223 -0
  121. vanna/examples/openai_quickstart.py +83 -0
  122. vanna/examples/primitive_components_demo.py +305 -0
  123. vanna/examples/quota_lifecycle_example.py +139 -0
  124. vanna/examples/visualization_example.py +251 -0
  125. vanna/integrations/__init__.py +17 -0
  126. vanna/integrations/anthropic/__init__.py +9 -0
  127. vanna/integrations/anthropic/llm.py +270 -0
  128. vanna/integrations/azureopenai/__init__.py +9 -0
  129. vanna/integrations/azureopenai/llm.py +329 -0
  130. vanna/integrations/azuresearch/__init__.py +7 -0
  131. vanna/integrations/azuresearch/agent_memory.py +413 -0
  132. vanna/integrations/bigquery/__init__.py +5 -0
  133. vanna/integrations/bigquery/sql_runner.py +81 -0
  134. vanna/integrations/chromadb/__init__.py +104 -0
  135. vanna/integrations/chromadb/agent_memory.py +488 -0
  136. vanna/integrations/clickhouse/__init__.py +5 -0
  137. vanna/integrations/clickhouse/sql_runner.py +82 -0
  138. vanna/integrations/duckdb/__init__.py +5 -0
  139. vanna/integrations/duckdb/sql_runner.py +65 -0
  140. vanna/integrations/faiss/__init__.py +7 -0
  141. vanna/integrations/faiss/agent_memory.py +435 -0
  142. vanna/integrations/google/__init__.py +9 -0
  143. vanna/integrations/google/gemini.py +370 -0
  144. vanna/integrations/hive/__init__.py +5 -0
  145. vanna/integrations/hive/sql_runner.py +87 -0
  146. vanna/integrations/local/__init__.py +17 -0
  147. vanna/integrations/local/agent_memory/__init__.py +7 -0
  148. vanna/integrations/local/agent_memory/in_memory.py +285 -0
  149. vanna/integrations/local/audit.py +59 -0
  150. vanna/integrations/local/file_system.py +242 -0
  151. vanna/integrations/local/file_system_conversation_store.py +255 -0
  152. vanna/integrations/local/storage.py +62 -0
  153. vanna/integrations/marqo/__init__.py +7 -0
  154. vanna/integrations/marqo/agent_memory.py +354 -0
  155. vanna/integrations/milvus/__init__.py +7 -0
  156. vanna/integrations/milvus/agent_memory.py +458 -0
  157. vanna/integrations/mock/__init__.py +9 -0
  158. vanna/integrations/mock/llm.py +65 -0
  159. vanna/integrations/mssql/__init__.py +5 -0
  160. vanna/integrations/mssql/sql_runner.py +66 -0
  161. vanna/integrations/mysql/__init__.py +5 -0
  162. vanna/integrations/mysql/sql_runner.py +92 -0
  163. vanna/integrations/ollama/__init__.py +7 -0
  164. vanna/integrations/ollama/llm.py +252 -0
  165. vanna/integrations/openai/__init__.py +10 -0
  166. vanna/integrations/openai/llm.py +267 -0
  167. vanna/integrations/openai/responses.py +163 -0
  168. vanna/integrations/opensearch/__init__.py +7 -0
  169. vanna/integrations/opensearch/agent_memory.py +411 -0
  170. vanna/integrations/oracle/__init__.py +5 -0
  171. vanna/integrations/oracle/sql_runner.py +75 -0
  172. vanna/integrations/pinecone/__init__.py +7 -0
  173. vanna/integrations/pinecone/agent_memory.py +329 -0
  174. vanna/integrations/plotly/__init__.py +5 -0
  175. vanna/integrations/plotly/chart_generator.py +313 -0
  176. vanna/integrations/postgres/__init__.py +9 -0
  177. vanna/integrations/postgres/sql_runner.py +112 -0
  178. vanna/integrations/premium/agent_memory/__init__.py +7 -0
  179. vanna/integrations/premium/agent_memory/premium.py +186 -0
  180. vanna/integrations/presto/__init__.py +5 -0
  181. vanna/integrations/presto/sql_runner.py +107 -0
  182. vanna/integrations/qdrant/__init__.py +7 -0
  183. vanna/integrations/qdrant/agent_memory.py +466 -0
  184. vanna/integrations/snowflake/__init__.py +5 -0
  185. vanna/integrations/snowflake/sql_runner.py +147 -0
  186. vanna/integrations/sqlite/__init__.py +9 -0
  187. vanna/integrations/sqlite/sql_runner.py +65 -0
  188. vanna/integrations/weaviate/__init__.py +7 -0
  189. vanna/integrations/weaviate/agent_memory.py +428 -0
  190. vanna/legacy/ZhipuAI/ZhipuAI_Chat.py +233 -0
  191. vanna/legacy/ZhipuAI/ZhipuAI_embeddings.py +79 -0
  192. vanna/legacy/ZhipuAI/__init__.py +2 -0
  193. vanna/legacy/__init__.py +403 -0
  194. vanna/legacy/adapter.py +468 -0
  195. vanna/legacy/advanced/__init__.py +28 -0
  196. vanna/legacy/anthropic/__init__.py +1 -0
  197. vanna/legacy/anthropic/anthropic_chat.py +80 -0
  198. vanna/legacy/azuresearch/__init__.py +1 -0
  199. vanna/legacy/azuresearch/azuresearch_vector.py +274 -0
  200. vanna/legacy/base/__init__.py +1 -0
  201. vanna/legacy/base/base.py +2133 -0
  202. vanna/legacy/base/safe_exec.py +190 -0
  203. vanna/legacy/bedrock/__init__.py +1 -0
  204. vanna/legacy/bedrock/bedrock_converse.py +86 -0
  205. vanna/legacy/chromadb/__init__.py +1 -0
  206. vanna/legacy/chromadb/chromadb_vector.py +259 -0
  207. vanna/legacy/cohere/__init__.py +2 -0
  208. vanna/legacy/cohere/cohere_chat.py +99 -0
  209. vanna/legacy/cohere/cohere_embeddings.py +77 -0
  210. vanna/legacy/deepseek/__init__.py +1 -0
  211. vanna/legacy/deepseek/deepseek_chat.py +59 -0
  212. vanna/legacy/exceptions/__init__.py +46 -0
  213. vanna/legacy/faiss/__init__.py +1 -0
  214. vanna/legacy/faiss/faiss.py +230 -0
  215. vanna/legacy/flask/__init__.py +1355 -0
  216. vanna/legacy/flask/assets.py +58 -0
  217. vanna/legacy/flask/auth.py +56 -0
  218. vanna/legacy/google/__init__.py +2 -0
  219. vanna/legacy/google/bigquery_vector.py +293 -0
  220. vanna/legacy/google/gemini_chat.py +78 -0
  221. vanna/legacy/hf/__init__.py +1 -0
  222. vanna/legacy/hf/hf.py +80 -0
  223. vanna/legacy/local.py +8 -0
  224. vanna/legacy/marqo/__init__.py +1 -0
  225. vanna/legacy/marqo/marqo.py +168 -0
  226. vanna/legacy/milvus/__init__.py +1 -0
  227. vanna/legacy/milvus/milvus_vector.py +328 -0
  228. vanna/legacy/mistral/__init__.py +1 -0
  229. vanna/legacy/mistral/mistral.py +51 -0
  230. vanna/legacy/mock/__init__.py +3 -0
  231. vanna/legacy/mock/embedding.py +11 -0
  232. vanna/legacy/mock/llm.py +18 -0
  233. vanna/legacy/mock/vectordb.py +67 -0
  234. vanna/legacy/ollama/__init__.py +1 -0
  235. vanna/legacy/ollama/ollama.py +110 -0
  236. vanna/legacy/openai/__init__.py +2 -0
  237. vanna/legacy/openai/openai_chat.py +124 -0
  238. vanna/legacy/openai/openai_embeddings.py +46 -0
  239. vanna/legacy/opensearch/__init__.py +2 -0
  240. vanna/legacy/opensearch/opensearch_vector.py +369 -0
  241. vanna/legacy/opensearch/opensearch_vector_semantic.py +200 -0
  242. vanna/legacy/oracle/__init__.py +1 -0
  243. vanna/legacy/oracle/oracle_vector.py +584 -0
  244. vanna/legacy/pgvector/__init__.py +1 -0
  245. vanna/legacy/pgvector/pgvector.py +282 -0
  246. vanna/legacy/pinecone/__init__.py +3 -0
  247. vanna/legacy/pinecone/pinecone_vector.py +275 -0
  248. vanna/legacy/qdrant/__init__.py +3 -0
  249. vanna/legacy/qdrant/qdrant.py +329 -0
  250. vanna/legacy/qianfan/Qianfan_Chat.py +170 -0
  251. vanna/legacy/qianfan/Qianfan_embeddings.py +36 -0
  252. vanna/legacy/qianfan/__init__.py +2 -0
  253. vanna/legacy/qianwen/QianwenAI_chat.py +132 -0
  254. vanna/legacy/qianwen/QianwenAI_embeddings.py +46 -0
  255. vanna/legacy/qianwen/__init__.py +2 -0
  256. vanna/legacy/remote.py +79 -0
  257. vanna/legacy/types/__init__.py +292 -0
  258. vanna/legacy/utils.py +72 -0
  259. vanna/legacy/vannadb/__init__.py +1 -0
  260. vanna/legacy/vannadb/vannadb_vector.py +468 -0
  261. vanna/legacy/vllm/__init__.py +1 -0
  262. vanna/legacy/vllm/vllm.py +97 -0
  263. vanna/legacy/weaviate/__init__.py +1 -0
  264. vanna/legacy/weaviate/weaviate_vector.py +194 -0
  265. vanna/legacy/xinference/__init__.py +1 -0
  266. vanna/legacy/xinference/xinference.py +53 -0
  267. vanna/py.typed +0 -0
  268. vanna/servers/__init__.py +16 -0
  269. vanna/servers/__main__.py +8 -0
  270. vanna/servers/base/__init__.py +18 -0
  271. vanna/servers/base/chat_handler.py +65 -0
  272. vanna/servers/base/models.py +111 -0
  273. vanna/servers/base/rich_chat_handler.py +141 -0
  274. vanna/servers/base/templates.py +331 -0
  275. vanna/servers/cli/__init__.py +7 -0
  276. vanna/servers/cli/server_runner.py +204 -0
  277. vanna/servers/fastapi/__init__.py +7 -0
  278. vanna/servers/fastapi/app.py +163 -0
  279. vanna/servers/fastapi/routes.py +183 -0
  280. vanna/servers/flask/__init__.py +7 -0
  281. vanna/servers/flask/app.py +132 -0
  282. vanna/servers/flask/routes.py +137 -0
  283. vanna/tools/__init__.py +41 -0
  284. vanna/tools/agent_memory.py +322 -0
  285. vanna/tools/file_system.py +879 -0
  286. vanna/tools/python.py +222 -0
  287. vanna/tools/run_sql.py +173 -0
  288. vanna/tools/visualize_data.py +195 -0
  289. vanna/utils/__init__.py +0 -0
  290. vanna/utils/sql_safety.py +84 -0
  291. vanna/web_components/__init__.py +44 -0
@@ -0,0 +1,517 @@
1
+ Metadata-Version: 2.4
2
+ Name: asksql
3
+ Version: 2.1.0
4
+ Summary: Community-maintained, security-focused fork of Vanna: generate SQL from natural language. Drop-in: keeps `import vanna`.
5
+ Author-email: Zain Hoda <zain@vanna.ai>
6
+ Maintainer: Ayush Srivastava
7
+ Requires-Python: >=3.9
8
+ Description-Content-Type: text/markdown
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ License-File: LICENSE
13
+ Requires-Dist: pydantic>=2.0.0
14
+ Requires-Dist: click>=8.0.0
15
+ Requires-Dist: pandas
16
+ Requires-Dist: httpx>=0.28.0
17
+ Requires-Dist: PyYAML
18
+ Requires-Dist: plotly
19
+ Requires-Dist: tabulate
20
+ Requires-Dist: sqlparse
21
+ Requires-Dist: sqlalchemy
22
+ Requires-Dist: requests
23
+ Requires-Dist: psycopg2-binary ; extra == "all"
24
+ Requires-Dist: db-dtypes ; extra == "all"
25
+ Requires-Dist: PyMySQL ; extra == "all"
26
+ Requires-Dist: google-cloud-bigquery ; extra == "all"
27
+ Requires-Dist: snowflake-connector-python ; extra == "all"
28
+ Requires-Dist: duckdb ; extra == "all"
29
+ Requires-Dist: openai ; extra == "all"
30
+ Requires-Dist: qianfan ; extra == "all"
31
+ Requires-Dist: mistralai>=1.0.0 ; extra == "all"
32
+ Requires-Dist: chromadb>=1.1.0 ; extra == "all"
33
+ Requires-Dist: anthropic ; extra == "all"
34
+ Requires-Dist: zhipuai ; extra == "all"
35
+ Requires-Dist: marqo ; extra == "all"
36
+ Requires-Dist: google-generativeai ; extra == "all"
37
+ Requires-Dist: google-cloud-aiplatform ; extra == "all"
38
+ Requires-Dist: qdrant-client>=1.0.0 ; extra == "all"
39
+ Requires-Dist: fastembed ; extra == "all"
40
+ Requires-Dist: ollama ; extra == "all"
41
+ Requires-Dist: httpx ; extra == "all"
42
+ Requires-Dist: opensearch-py ; extra == "all"
43
+ Requires-Dist: opensearch-dsl ; extra == "all"
44
+ Requires-Dist: transformers ; extra == "all"
45
+ Requires-Dist: pinecone ; extra == "all"
46
+ Requires-Dist: pymilvus[model] ; extra == "all"
47
+ Requires-Dist: weaviate-client ; extra == "all"
48
+ Requires-Dist: azure-search-documents ; extra == "all"
49
+ Requires-Dist: azure-identity ; extra == "all"
50
+ Requires-Dist: azure-common ; extra == "all"
51
+ Requires-Dist: faiss-cpu ; extra == "all"
52
+ Requires-Dist: boto ; extra == "all"
53
+ Requires-Dist: boto3 ; extra == "all"
54
+ Requires-Dist: botocore ; extra == "all"
55
+ Requires-Dist: langchain_core ; extra == "all"
56
+ Requires-Dist: langchain_postgres ; extra == "all"
57
+ Requires-Dist: langchain-community ; extra == "all"
58
+ Requires-Dist: langchain-huggingface ; extra == "all"
59
+ Requires-Dist: xinference-client ; extra == "all"
60
+ Requires-Dist: anthropic ; extra == "anthropic"
61
+ Requires-Dist: openai ; extra == "azureopenai"
62
+ Requires-Dist: azure-identity ; extra == "azureopenai"
63
+ Requires-Dist: azure-search-documents ; extra == "azuresearch"
64
+ Requires-Dist: azure-identity ; extra == "azuresearch"
65
+ Requires-Dist: azure-common ; extra == "azuresearch"
66
+ Requires-Dist: fastembed ; extra == "azuresearch"
67
+ Requires-Dist: boto3 ; extra == "bedrock"
68
+ Requires-Dist: botocore ; extra == "bedrock"
69
+ Requires-Dist: google-cloud-bigquery ; extra == "bigquery"
70
+ Requires-Dist: chromadb>=1.1.0 ; extra == "chromadb"
71
+ Requires-Dist: clickhouse_connect ; extra == "clickhouse"
72
+ Requires-Dist: pytest>=7.0.0 ; extra == "dev"
73
+ Requires-Dist: pytest-asyncio>=0.21.0 ; extra == "dev"
74
+ Requires-Dist: pytest-mock>=3.10.0 ; extra == "dev"
75
+ Requires-Dist: pytest-cov>=4.0.0 ; extra == "dev"
76
+ Requires-Dist: tox>=4.0.0 ; extra == "dev"
77
+ Requires-Dist: mypy ; extra == "dev"
78
+ Requires-Dist: ruff ; extra == "dev"
79
+ Requires-Dist: pandas-stubs ; extra == "dev"
80
+ Requires-Dist: plotly-stubs ; extra == "dev"
81
+ Requires-Dist: types-PyYAML ; extra == "dev"
82
+ Requires-Dist: types-requests ; extra == "dev"
83
+ Requires-Dist: types-tabulate ; extra == "dev"
84
+ Requires-Dist: duckdb ; extra == "duckdb"
85
+ Requires-Dist: faiss-cpu ; extra == "faiss-cpu"
86
+ Requires-Dist: faiss-gpu ; extra == "faiss-gpu"
87
+ Requires-Dist: fastapi>=0.68.0 ; extra == "fastapi"
88
+ Requires-Dist: uvicorn>=0.15.0 ; extra == "fastapi"
89
+ Requires-Dist: flask>=2.0.0 ; extra == "flask"
90
+ Requires-Dist: flask-cors>=4.0.0 ; extra == "flask"
91
+ Requires-Dist: google-genai ; extra == "gemini"
92
+ Requires-Dist: google-generativeai ; extra == "google"
93
+ Requires-Dist: google-cloud-aiplatform ; extra == "google"
94
+ Requires-Dist: transformers ; extra == "hf"
95
+ Requires-Dist: pyhive ; extra == "hive"
96
+ Requires-Dist: thrift ; extra == "hive"
97
+ Requires-Dist: marqo ; extra == "marqo"
98
+ Requires-Dist: pymilvus[model] ; extra == "milvus"
99
+ Requires-Dist: mistralai>=1.0.0 ; extra == "mistralai"
100
+ Requires-Dist: pyodbc ; extra == "mssql"
101
+ Requires-Dist: PyMySQL ; extra == "mysql"
102
+ Requires-Dist: ollama ; extra == "ollama"
103
+ Requires-Dist: httpx ; extra == "ollama"
104
+ Requires-Dist: openai ; extra == "openai"
105
+ Requires-Dist: opensearch-py ; extra == "opensearch"
106
+ Requires-Dist: opensearch-dsl ; extra == "opensearch"
107
+ Requires-Dist: langchain-community ; extra == "opensearch"
108
+ Requires-Dist: langchain-huggingface ; extra == "opensearch"
109
+ Requires-Dist: oracledb ; extra == "oracle"
110
+ Requires-Dist: chromadb<1.0.0 ; extra == "oracle"
111
+ Requires-Dist: langchain-postgres>=0.0.12 ; extra == "pgvector"
112
+ Requires-Dist: pinecone ; extra == "pinecone"
113
+ Requires-Dist: fastembed ; extra == "pinecone"
114
+ Requires-Dist: psycopg2-binary ; extra == "postgres"
115
+ Requires-Dist: db-dtypes ; extra == "postgres"
116
+ Requires-Dist: pyhive ; extra == "presto"
117
+ Requires-Dist: thrift ; extra == "presto"
118
+ Requires-Dist: qdrant-client>=1.0.0 ; extra == "qdrant"
119
+ Requires-Dist: fastembed ; extra == "qdrant"
120
+ Requires-Dist: qianfan ; extra == "qianfan"
121
+ Requires-Dist: asksql[flask, fastapi] ; extra == "servers"
122
+ Requires-Dist: snowflake-connector-python ; extra == "snowflake"
123
+ Requires-Dist: pytest>=7.0.0 ; extra == "test"
124
+ Requires-Dist: pytest-asyncio>=0.21.0 ; extra == "test"
125
+ Requires-Dist: pytest-mock>=3.10.0 ; extra == "test"
126
+ Requires-Dist: pytest-cov>=4.0.0 ; extra == "test"
127
+ Requires-Dist: tox>=4.0.0 ; extra == "test"
128
+ Requires-Dist: vllm ; extra == "vllm"
129
+ Requires-Dist: weaviate-client ; extra == "weaviate"
130
+ Requires-Dist: xinference-client ; extra == "xinference-client"
131
+ Requires-Dist: zhipuai ; extra == "zhipuai"
132
+ Project-URL: Bug Tracker, https://github.com/buhtig47/vanna/issues
133
+ Project-URL: Changelog, https://github.com/buhtig47/vanna/blob/main/CHANGELOG.md
134
+ Project-URL: Homepage, https://github.com/buhtig47/vanna
135
+ Project-URL: Original project, https://github.com/vanna-ai/vanna
136
+ Provides-Extra: all
137
+ Provides-Extra: anthropic
138
+ Provides-Extra: azureopenai
139
+ Provides-Extra: azuresearch
140
+ Provides-Extra: bedrock
141
+ Provides-Extra: bigquery
142
+ Provides-Extra: chromadb
143
+ Provides-Extra: clickhouse
144
+ Provides-Extra: dev
145
+ Provides-Extra: duckdb
146
+ Provides-Extra: faiss-cpu
147
+ Provides-Extra: faiss-gpu
148
+ Provides-Extra: fastapi
149
+ Provides-Extra: flask
150
+ Provides-Extra: gemini
151
+ Provides-Extra: google
152
+ Provides-Extra: hf
153
+ Provides-Extra: hive
154
+ Provides-Extra: marqo
155
+ Provides-Extra: milvus
156
+ Provides-Extra: mistralai
157
+ Provides-Extra: mssql
158
+ Provides-Extra: mysql
159
+ Provides-Extra: ollama
160
+ Provides-Extra: openai
161
+ Provides-Extra: opensearch
162
+ Provides-Extra: oracle
163
+ Provides-Extra: pgvector
164
+ Provides-Extra: pinecone
165
+ Provides-Extra: postgres
166
+ Provides-Extra: presto
167
+ Provides-Extra: qdrant
168
+ Provides-Extra: qianfan
169
+ Provides-Extra: servers
170
+ Provides-Extra: snowflake
171
+ Provides-Extra: test
172
+ Provides-Extra: vllm
173
+ Provides-Extra: weaviate
174
+ Provides-Extra: xinference-client
175
+ Provides-Extra: zhipuai
176
+
177
+ # asksql
178
+
179
+ **The community-maintained, security-focused continuation of [Vanna](https://github.com/vanna-ai/vanna).**
180
+
181
+ > 🚧 **Work in progress.** Vanna was archived on 29 March 2026 with ~227 open issues. asksql picks it up: security fixes first, then bug fixes and dependency updates.
182
+
183
+ ### Coming from Vanna? Zero code changes.
184
+
185
+ ```bash
186
+ pip uninstall vanna
187
+ pip install asksql
188
+ ```
189
+
190
+ asksql keeps the `vanna` import name (like Pillow did for PIL), so `import vanna`, `from vanna import Agent` and the legacy 1.x `VannaBase` API work as before. Don't install both packages in the same environment.
191
+
192
+ ### What's fixed so far
193
+
194
+ | Issue | Fix |
195
+ |---|---|
196
+ | CVE-2026-4229 · [#1121](https://github.com/vanna-ai/vanna/issues/1121) | SQL injection in the BigQuery vector store |
197
+ | [#1098](https://github.com/vanna-ai/vanna/issues/1098) | LLM-written Plotly code could run arbitrary Python on the server (`exec` with full access) |
198
+ | [#1078](https://github.com/vanna-ai/vanna/issues/1078) | LLM-generated SQL ran unfiltered (prompt injection → `DROP`, shell commands via the database) |
199
+
200
+ ⚠️ **One behaviour change:** SQL generated by the LLM is now **read-only by default**. If you need the LLM to write data, opt in with `config={"allow_write_sql": True}` (legacy API) or `RunSqlTool(..., allow_write_sql=True)` (v2). See [CHANGELOG.md](https://github.com/buhtig47/vanna/blob/main/CHANGELOG.md).
201
+
202
+ Found a bug or a security problem? [Open an issue](https://github.com/buhtig47/vanna/issues).
203
+
204
+ ---
205
+
206
+ *Everything below is the original Vanna 2.0 README. Upstream docs at vanna.ai still describe the API.*
207
+
208
+ ## Vanna 2.0: Turn Questions into Data Insights
209
+
210
+ **Natural language → SQL → Answers.** Now with enterprise security and user-aware permissions.
211
+
212
+ [![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://python.org)
213
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/buhtig47/vanna/blob/main/LICENSE)
214
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
215
+
216
+ https://github.com/user-attachments/assets/476cd421-d0b0-46af-8b29-0f40c73d6d83
217
+
218
+
219
+ ![Vanna2 Demo](https://raw.githubusercontent.com/buhtig47/vanna/main/img/architecture.png)
220
+
221
+ ---
222
+
223
+ ## What's New in 2.0
224
+
225
+ 🔐 **User-Aware at Every Layer** — Queries automatically filtered per user permissions
226
+
227
+ 🎨 **Modern Web Interface** — Beautiful pre-built `<vanna-chat>` component
228
+
229
+ ⚡ **Streaming Responses** — Real-time tables, charts, and progress updates
230
+
231
+ 🔒 **Enterprise Security** — Row-level security, audit logs, rate limiting
232
+
233
+ 🔄 **Production-Ready** — FastAPI integration, observability, lifecycle hooks
234
+
235
+ > **Upgrading from 0.x?** See the [Migration Guide](https://github.com/buhtig47/vanna/blob/main/MIGRATION_GUIDE.md) | [What changed?](#migration-notes)
236
+
237
+ ---
238
+
239
+ ## Get Started
240
+
241
+ ### Try it with Sample Data
242
+
243
+ [Quickstart](https://vanna.ai/docs/quick-start)
244
+
245
+ ### Configure
246
+
247
+ [Configure](https://vanna.ai/docs/configure)
248
+
249
+ ### Web Component
250
+
251
+ ```html
252
+ <!-- Drop into any existing webpage -->
253
+ <script src="https://img.vanna.ai/vanna-components.js"></script>
254
+ <vanna-chat
255
+ sse-endpoint="https://your-api.com/chat"
256
+ theme="dark">
257
+ </vanna-chat>
258
+ ```
259
+
260
+ Uses your existing cookies/JWTs. Works with React, Vue, or plain HTML.
261
+
262
+ ---
263
+
264
+ ## What You Get
265
+
266
+ Ask a question in natural language and get back:
267
+
268
+ **1. Streaming Progress Updates**
269
+
270
+ **2. SQL Code Block (By default only shown to "admin" users)**
271
+
272
+ **3. Interactive Data Table**
273
+
274
+ **4. Charts** (Plotly visualizations)
275
+
276
+ **5. Natural Language Summary**
277
+
278
+ All streamed in real-time to your web component.
279
+
280
+ ---
281
+
282
+ ## Why Vanna 2.0?
283
+
284
+ ### ✅ Get Started Instantly
285
+ * Production chat interface
286
+ * Custom agent with your database
287
+ * Embed in any webpage
288
+
289
+ ### ✅ Enterprise-Ready Security
290
+ **User-aware at every layer** — Identity flows through system prompts, tool execution, and SQL filtering
291
+ **Row-level security** — Queries automatically filtered per user permissions
292
+ **Audit logs** — Every query tracked per user for compliance
293
+ **Rate limiting** — Per-user quotas via lifecycle hooks
294
+
295
+ ### ✅ Beautiful Web UI Included
296
+ **Pre-built `<vanna-chat>` component** — No need to build your own chat interface
297
+ **Streaming tables & charts** — Rich components, not just text
298
+ **Responsive & customizable** — Works on mobile, desktop, light/dark themes
299
+ **Framework-agnostic** — React, Vue, plain HTML
300
+
301
+ ### ✅ Works With Your Stack
302
+ **Any LLM:** OpenAI, Anthropic, Ollama, Azure, Google Gemini, AWS Bedrock, Mistral, Others
303
+ **Any Database:** PostgreSQL, MySQL, Snowflake, BigQuery, Redshift, SQLite, Oracle, SQL Server, DuckDB, ClickHouse, Others
304
+ **Your Auth System:** Bring your own — cookies, JWTs, OAuth tokens
305
+ **Your Framework:** FastAPI, Flask
306
+
307
+ ### ✅ Extensible But Opinionated
308
+ **Custom tools** — Extend the `Tool` base class
309
+ **Lifecycle hooks** — Quota checking, logging, content filtering
310
+ **LLM middlewares** — Caching, prompt engineering
311
+ **Observability** — Built-in tracing and metrics
312
+
313
+ ---
314
+
315
+ ## Architecture
316
+
317
+ ![Vanna2 Diagram](img/vanna2.svg)
318
+
319
+ ---
320
+
321
+ ## How It Works
322
+
323
+ ```mermaid
324
+ sequenceDiagram
325
+ participant U as 👤 User
326
+ participant W as 🌐 <vanna-chat>
327
+ participant S as 🐍 Your Server
328
+ participant A as 🤖 Agent
329
+ participant T as 🧰 Tools
330
+
331
+ U->>W: "Show Q4 sales"
332
+ W->>S: POST /api/vanna/v2/chat_sse (with auth)
333
+ S->>A: User(id=alice, groups=[read_sales])
334
+ A->>T: Execute SQL tool (user-aware)
335
+ T->>T: Apply row-level security
336
+ T->>A: Filtered results
337
+ A->>W: Stream: Table → Chart → Summary
338
+ W->>U: Display beautiful UI
339
+ ```
340
+
341
+ **Key Concepts:**
342
+
343
+ 1. **User Resolver** — You define how to extract user identity from requests (cookies, JWTs, etc.)
344
+ 2. **User-Aware Tools** — Tools automatically check permissions based on user's group memberships
345
+ 3. **Streaming Components** — Backend streams structured UI components (tables, charts) to frontend
346
+ 4. **Built-in Web UI** — Pre-built `<vanna-chat>` component renders everything beautifully
347
+
348
+ ---
349
+
350
+ ## Production Setup with Your Auth
351
+
352
+ Here's a complete example integrating Vanna with your existing FastAPI app and authentication:
353
+
354
+ ```python
355
+ from fastapi import FastAPI
356
+ from vanna import Agent
357
+ from vanna.servers.fastapi.routes import register_chat_routes
358
+ from vanna.servers.base import ChatHandler
359
+ from vanna.core.user import UserResolver, User, RequestContext
360
+ from vanna.integrations.anthropic import AnthropicLlmService
361
+ from vanna.tools import RunSqlTool
362
+ from vanna.integrations.sqlite import SqliteRunner
363
+ from vanna.core.registry import ToolRegistry
364
+
365
+ # Your existing FastAPI app
366
+ app = FastAPI()
367
+
368
+ # 1. Define your user resolver (using YOUR auth system)
369
+ class MyUserResolver(UserResolver):
370
+ async def resolve_user(self, request_context: RequestContext) -> User:
371
+ # Extract from cookies, JWTs, or session
372
+ token = request_context.get_header('Authorization')
373
+ user_data = self.decode_jwt(token) # Your existing logic
374
+
375
+ return User(
376
+ id=user_data['id'],
377
+ email=user_data['email'],
378
+ group_memberships=user_data['groups'] # Used for permissions
379
+ )
380
+
381
+ # 2. Set up agent with tools
382
+ llm = AnthropicLlmService(model="claude-sonnet-4-5")
383
+ tools = ToolRegistry()
384
+ tools.register(RunSqlTool(sql_runner=SqliteRunner("./data.db")))
385
+
386
+ agent = Agent(
387
+ llm_service=llm,
388
+ tool_registry=tools,
389
+ user_resolver=MyUserResolver()
390
+ )
391
+
392
+ # 3. Add Vanna routes to your app
393
+ chat_handler = ChatHandler(agent)
394
+ register_chat_routes(app, chat_handler)
395
+
396
+ # Now you have:
397
+ # - POST /api/vanna/v2/chat_sse (streaming endpoint)
398
+ # - GET / (optional web UI)
399
+ ```
400
+
401
+ **Then in your frontend:**
402
+ ```html
403
+ <vanna-chat sse-endpoint="/api/vanna/v2/chat_sse"></vanna-chat>
404
+ ```
405
+
406
+ See [Full Documentation](https://vanna.ai/docs) for custom tools, lifecycle hooks, and advanced configuration
407
+
408
+ ---
409
+
410
+ ## Custom Tools
411
+
412
+ Extend Vanna with custom tools for your specific use case:
413
+
414
+ ```python
415
+ from vanna.core.tool import Tool, ToolContext, ToolResult
416
+ from pydantic import BaseModel, Field
417
+ from typing import Type
418
+
419
+ class EmailArgs(BaseModel):
420
+ recipient: str = Field(description="Email recipient")
421
+ subject: str = Field(description="Email subject")
422
+
423
+ class EmailTool(Tool[EmailArgs]):
424
+ @property
425
+ def name(self) -> str:
426
+ return "send_email"
427
+
428
+ @property
429
+ def access_groups(self) -> list[str]:
430
+ return ["send_email"] # Permission check
431
+
432
+ def get_args_schema(self) -> Type[EmailArgs]:
433
+ return EmailArgs
434
+
435
+ async def execute(self, context: ToolContext, args: EmailArgs) -> ToolResult:
436
+ user = context.user # Automatically injected
437
+
438
+ # Your business logic
439
+ await self.email_service.send(
440
+ from_email=user.email,
441
+ to=args.recipient,
442
+ subject=args.subject
443
+ )
444
+
445
+ return ToolResult(success=True, result_for_llm=f"Email sent to {args.recipient}")
446
+
447
+ # Register your tool
448
+ tools.register(EmailTool())
449
+ ```
450
+
451
+ ---
452
+
453
+ ## Advanced Features
454
+
455
+ Vanna 2.0 includes powerful enterprise features for production use:
456
+
457
+ **Lifecycle Hooks** — Add quota checking, custom logging, content filtering at key points in the request lifecycle
458
+
459
+ **LLM Middlewares** — Implement caching, prompt engineering, or cost tracking around LLM calls
460
+
461
+ **Conversation Storage** — Persist and retrieve conversation history per user
462
+
463
+ **Observability** — Built-in tracing and metrics integration
464
+
465
+ **Context Enrichers** — Add RAG, memory, or documentation to enhance agent responses
466
+
467
+ **Agent Configuration** — Control streaming, temperature, max iterations, and more
468
+
469
+ ---
470
+
471
+ ## Use Cases
472
+
473
+ **Vanna is ideal for:**
474
+ - 📊 Data analytics applications with natural language interfaces
475
+ - 🔐 Multi-tenant SaaS needing user-aware permissions
476
+ - 🎨 Teams wanting a pre-built web component + backend
477
+ - 🏢 Enterprise environments with security/audit requirements
478
+ - 📈 Applications needing rich streaming responses (tables, charts, SQL)
479
+ - 🔄 Integrating with existing authentication systems
480
+
481
+ ---
482
+
483
+ ## Community & Support
484
+
485
+ - 🐛 **[asksql Issues](https://github.com/buhtig47/vanna/issues)** — Bug reports and security problems for this fork
486
+ - 📖 **[Upstream Vanna Documentation](https://vanna.ai/docs)** — Guides and API reference (still applies)
487
+
488
+ ---
489
+
490
+ ## Migration Notes
491
+
492
+ **Upgrading from Vanna 0.x?**
493
+
494
+ Vanna 2.0 is a complete rewrite focused on user-aware agents and production deployments. Key changes:
495
+
496
+ - **New API**: Agent-based instead of `VannaBase` class methods
497
+ - **User-aware**: Every component now knows the user identity
498
+ - **Streaming**: Rich UI components instead of text/dataframes
499
+ - **Web-first**: Built-in `<vanna-chat>` component and server
500
+
501
+ **Migration path:**
502
+
503
+ 1. **Quick wrap** — Use `LegacyVannaAdapter` to wrap your existing Vanna 0.x instance and get the new web UI immediately
504
+ 2. **Gradual migration** — Incrementally move to the new Agent API and tools
505
+
506
+ See the complete [Migration Guide](https://github.com/buhtig47/vanna/blob/main/MIGRATION_GUIDE.md) for step-by-step instructions.
507
+
508
+ ---
509
+
510
+ ## License
511
+
512
+ MIT License — See [LICENSE](https://github.com/buhtig47/vanna/blob/main/LICENSE) for details. Original copyright (c) 2024 Vanna.AI is kept.
513
+
514
+ ---
515
+
516
+ **Originally built with ❤️ by the [Vanna team](https://github.com/vanna-ai/vanna).** asksql is an independent community fork and is not affiliated with or endorsed by Vanna.AI.
517
+