pyseekdb 1.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. pyseekdb-1.4.1/LICENSE +202 -0
  2. pyseekdb-1.4.1/NOTICE +15 -0
  3. pyseekdb-1.4.1/PKG-INFO +83 -0
  4. pyseekdb-1.4.1/README.md +57 -0
  5. pyseekdb-1.4.1/REDISTRIBUTION.md +52 -0
  6. pyseekdb-1.4.1/THIRD_PARTY_COMPONENTS.json +98 -0
  7. pyseekdb-1.4.1/THIRD_PARTY_COMPONENTS.md +28 -0
  8. pyseekdb-1.4.1/docs/_static/custom.css +66 -0
  9. pyseekdb-1.4.1/docs/_templates/layout.html +18 -0
  10. pyseekdb-1.4.1/docs/_templates/module.rst +51 -0
  11. pyseekdb-1.4.1/docs/api/index.rst +27 -0
  12. pyseekdb-1.4.1/docs/build_multiversion.sh +50 -0
  13. pyseekdb-1.4.1/docs/conf.py +84 -0
  14. pyseekdb-1.4.1/docs/guide/admin-client.md +55 -0
  15. pyseekdb-1.4.1/docs/guide/client-connection.md +81 -0
  16. pyseekdb-1.4.1/docs/guide/collection-management.md +192 -0
  17. pyseekdb-1.4.1/docs/guide/dml.md +215 -0
  18. pyseekdb-1.4.1/docs/guide/dql.md +349 -0
  19. pyseekdb-1.4.1/docs/guide/embedding-functions.md +262 -0
  20. pyseekdb-1.4.1/docs/guide/index.md +17 -0
  21. pyseekdb-1.4.1/docs/guide/namespace.md +99 -0
  22. pyseekdb-1.4.1/docs/guide/release-memory.md +55 -0
  23. pyseekdb-1.4.1/docs/index.md +68 -0
  24. pyseekdb-1.4.1/examples/complete_example.py +435 -0
  25. pyseekdb-1.4.1/examples/hybrid_search_example.py +358 -0
  26. pyseekdb-1.4.1/examples/namespace_example.py +61 -0
  27. pyseekdb-1.4.1/examples/simple_example.py +125 -0
  28. pyseekdb-1.4.1/examples/sparse_vector_index_example.py +287 -0
  29. pyseekdb-1.4.1/examples/sqlalchemy_hybrid_search_example.py +174 -0
  30. pyseekdb-1.4.1/pyproject.toml +137 -0
  31. pyseekdb-1.4.1/src/pyseekdb/__init__.py +156 -0
  32. pyseekdb-1.4.1/src/pyseekdb/cli/__init__.py +14 -0
  33. pyseekdb-1.4.1/src/pyseekdb/cli/main.py +400 -0
  34. pyseekdb-1.4.1/src/pyseekdb/client/__init__.py +350 -0
  35. pyseekdb-1.4.1/src/pyseekdb/client/admin_client.py +277 -0
  36. pyseekdb-1.4.1/src/pyseekdb/client/base_connection.py +73 -0
  37. pyseekdb-1.4.1/src/pyseekdb/client/client_base.py +6736 -0
  38. pyseekdb-1.4.1/src/pyseekdb/client/client_seekdb_embedded.py +462 -0
  39. pyseekdb-1.4.1/src/pyseekdb/client/client_seekdb_server.py +233 -0
  40. pyseekdb-1.4.1/src/pyseekdb/client/collection.py +778 -0
  41. pyseekdb-1.4.1/src/pyseekdb/client/configuration.py +618 -0
  42. pyseekdb-1.4.1/src/pyseekdb/client/database.py +53 -0
  43. pyseekdb-1.4.1/src/pyseekdb/client/document_query_builder.py +265 -0
  44. pyseekdb-1.4.1/src/pyseekdb/client/embedding_function.py +485 -0
  45. pyseekdb-1.4.1/src/pyseekdb/client/filters.py +391 -0
  46. pyseekdb-1.4.1/src/pyseekdb/client/kernel_errors.py +183 -0
  47. pyseekdb-1.4.1/src/pyseekdb/client/memory.py +83 -0
  48. pyseekdb-1.4.1/src/pyseekdb/client/meta_info.py +127 -0
  49. pyseekdb-1.4.1/src/pyseekdb/client/namespace.py +295 -0
  50. pyseekdb-1.4.1/src/pyseekdb/client/query_types.py +32 -0
  51. pyseekdb-1.4.1/src/pyseekdb/client/schema.py +167 -0
  52. pyseekdb-1.4.1/src/pyseekdb/client/sparse_embedding_function.py +392 -0
  53. pyseekdb-1.4.1/src/pyseekdb/client/sql_utils.py +98 -0
  54. pyseekdb-1.4.1/src/pyseekdb/client/types.py +49 -0
  55. pyseekdb-1.4.1/src/pyseekdb/client/validators.py +136 -0
  56. pyseekdb-1.4.1/src/pyseekdb/client/version.py +116 -0
  57. pyseekdb-1.4.1/src/pyseekdb/schema.py +27 -0
  58. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/__init__.py +54 -0
  59. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/amazon_bedrock_embedding_function.py +267 -0
  60. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/bm25_sparse_embedding_function.py +262 -0
  61. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/cohere_embedding_function.py +213 -0
  62. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/google_vertex_embedding_function.py +130 -0
  63. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/huggingface_sparse_embedding_function.py +157 -0
  64. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/jina_embedding_function.py +201 -0
  65. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/litellm_base_embedding_function.py +149 -0
  66. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/mistral_embedding_function.py +139 -0
  67. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/mnn_embedding_function.py +653 -0
  68. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/morph_embedding_function.py +137 -0
  69. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/ollama_embedding_function.py +166 -0
  70. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/onnx_embedding_function.py +394 -0
  71. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/openai_base_embedding_function.py +212 -0
  72. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/openai_embedding_function.py +131 -0
  73. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/qwen_embedding_function.py +153 -0
  74. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/sentence_transformer_embedding_function.py +109 -0
  75. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/siliconflow_embedding_function.py +133 -0
  76. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/tencent_hunyuan_embedding_function.py +146 -0
  77. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/text2vec_embedding_function.py +138 -0
  78. pyseekdb-1.4.1/src/pyseekdb/utils/embedding_functions/voyageai_embedding_function.py +235 -0
  79. pyseekdb-1.4.1/tests/__init__.py +0 -0
  80. pyseekdb-1.4.1/tests/integration_tests/__init__.py +0 -0
  81. pyseekdb-1.4.1/tests/integration_tests/conftest.py +281 -0
  82. pyseekdb-1.4.1/tests/integration_tests/namespace_dml_helpers.py +381 -0
  83. pyseekdb-1.4.1/tests/integration_tests/namespace_fts_helpers.py +772 -0
  84. pyseekdb-1.4.1/tests/integration_tests/namespace_hybrid_search_helpers.py +1641 -0
  85. pyseekdb-1.4.1/tests/integration_tests/namespace_test_support.py +182 -0
  86. pyseekdb-1.4.1/tests/integration_tests/test_admin_database_management.py +96 -0
  87. pyseekdb-1.4.1/tests/integration_tests/test_client_creation.py +210 -0
  88. pyseekdb-1.4.1/tests/integration_tests/test_collection_dml.py +185 -0
  89. pyseekdb-1.4.1/tests/integration_tests/test_collection_embedding_function.py +857 -0
  90. pyseekdb-1.4.1/tests/integration_tests/test_collection_fork.py +560 -0
  91. pyseekdb-1.4.1/tests/integration_tests/test_collection_get.py +610 -0
  92. pyseekdb-1.4.1/tests/integration_tests/test_collection_hybrid_search.py +478 -0
  93. pyseekdb-1.4.1/tests/integration_tests/test_collection_hybrid_search_source_inference.py +135 -0
  94. pyseekdb-1.4.1/tests/integration_tests/test_collection_query.py +309 -0
  95. pyseekdb-1.4.1/tests/integration_tests/test_collection_v1_compatibility.py +506 -0
  96. pyseekdb-1.4.1/tests/integration_tests/test_collection_weighted_rrf.py +188 -0
  97. pyseekdb-1.4.1/tests/integration_tests/test_database_fork.py +220 -0
  98. pyseekdb-1.4.1/tests/integration_tests/test_default_embedding_function.py +228 -0
  99. pyseekdb-1.4.1/tests/integration_tests/test_detect_db_type_and_version.py +136 -0
  100. pyseekdb-1.4.1/tests/integration_tests/test_empty_value_handling.py +232 -0
  101. pyseekdb-1.4.1/tests/integration_tests/test_fulltext_parser_config.py +195 -0
  102. pyseekdb-1.4.1/tests/integration_tests/test_get_or_create_collection_concurrency.py +96 -0
  103. pyseekdb-1.4.1/tests/integration_tests/test_get_or_create_collection_multiprocess.py +760 -0
  104. pyseekdb-1.4.1/tests/integration_tests/test_hnsw_sync_mode.py +66 -0
  105. pyseekdb-1.4.1/tests/integration_tests/test_logic_table_monitoring_p1.py +103 -0
  106. pyseekdb-1.4.1/tests/integration_tests/test_long_collection_name.py +74 -0
  107. pyseekdb-1.4.1/tests/integration_tests/test_namespace_constraints.py +180 -0
  108. pyseekdb-1.4.1/tests/integration_tests/test_namespace_dml.py +462 -0
  109. pyseekdb-1.4.1/tests/integration_tests/test_namespace_dml_multi_coll.py +69 -0
  110. pyseekdb-1.4.1/tests/integration_tests/test_namespace_dml_multi_coll_multi_ns.py +85 -0
  111. pyseekdb-1.4.1/tests/integration_tests/test_namespace_dml_multi_ns.py +114 -0
  112. pyseekdb-1.4.1/tests/integration_tests/test_namespace_drop_validation.py +768 -0
  113. pyseekdb-1.4.1/tests/integration_tests/test_namespace_get_delete_filters.py +262 -0
  114. pyseekdb-1.4.1/tests/integration_tests/test_namespace_hybrid_search_combined.py +73 -0
  115. pyseekdb-1.4.1/tests/integration_tests/test_namespace_hybrid_search_fulltext.py +137 -0
  116. pyseekdb-1.4.1/tests/integration_tests/test_namespace_hybrid_search_fulltext_multi_coll_multi_ns.py +190 -0
  117. pyseekdb-1.4.1/tests/integration_tests/test_namespace_hybrid_search_multi_coll_multi_ns.py +153 -0
  118. pyseekdb-1.4.1/tests/integration_tests/test_namespace_hybrid_search_search_index.py +68 -0
  119. pyseekdb-1.4.1/tests/integration_tests/test_namespace_hybrid_search_triple_branch.py +111 -0
  120. pyseekdb-1.4.1/tests/integration_tests/test_namespace_hybrid_search_triple_branch_multi_coll_multi_ns.py +263 -0
  121. pyseekdb-1.4.1/tests/integration_tests/test_namespace_hybrid_search_vector.py +97 -0
  122. pyseekdb-1.4.1/tests/integration_tests/test_namespace_lifecycle.py +400 -0
  123. pyseekdb-1.4.1/tests/integration_tests/test_namespace_lifecycle_concurrency.py +159 -0
  124. pyseekdb-1.4.1/tests/integration_tests/test_namespace_optional_indexes.py +224 -0
  125. pyseekdb-1.4.1/tests/integration_tests/test_namespace_prewarm.py +86 -0
  126. pyseekdb-1.4.1/tests/integration_tests/test_namespace_prewarm_lob.py +377 -0
  127. pyseekdb-1.4.1/tests/integration_tests/test_namespace_public_api.py +78 -0
  128. pyseekdb-1.4.1/tests/integration_tests/test_namespace_query.py +423 -0
  129. pyseekdb-1.4.1/tests/integration_tests/test_namespace_query_where_document.py +275 -0
  130. pyseekdb-1.4.1/tests/integration_tests/test_namespace_reconnect.py +147 -0
  131. pyseekdb-1.4.1/tests/integration_tests/test_namespace_session_vars.py +97 -0
  132. pyseekdb-1.4.1/tests/integration_tests/test_namespace_upsert_concurrency.py +79 -0
  133. pyseekdb-1.4.1/tests/integration_tests/test_offical_case.py +104 -0
  134. pyseekdb-1.4.1/tests/integration_tests/test_release_memory.py +212 -0
  135. pyseekdb-1.4.1/tests/integration_tests/test_security_sql_injection.py +367 -0
  136. pyseekdb-1.4.1/tests/integration_tests/test_sparse_vector_index.py +920 -0
  137. pyseekdb-1.4.1/tests/integration_tests/test_special_characters_bugs.py +273 -0
  138. pyseekdb-1.4.1/tests/unit_tests/__init__.py +0 -0
  139. pyseekdb-1.4.1/tests/unit_tests/test_amazon_bedrock_embedding_function.py +440 -0
  140. pyseekdb-1.4.1/tests/unit_tests/test_bm25_sparse_embedding_function.py +638 -0
  141. pyseekdb-1.4.1/tests/unit_tests/test_build_document_query.py +74 -0
  142. pyseekdb-1.4.1/tests/unit_tests/test_build_knn_filter.py +40 -0
  143. pyseekdb-1.4.1/tests/unit_tests/test_build_query_expression.py +130 -0
  144. pyseekdb-1.4.1/tests/unit_tests/test_ci_pytest_summary.py +62 -0
  145. pyseekdb-1.4.1/tests/unit_tests/test_cohere_embedding_function.py +443 -0
  146. pyseekdb-1.4.1/tests/unit_tests/test_collection_name_validation.py +79 -0
  147. pyseekdb-1.4.1/tests/unit_tests/test_configuration.py +337 -0
  148. pyseekdb-1.4.1/tests/unit_tests/test_default_embedding_function.py +85 -0
  149. pyseekdb-1.4.1/tests/unit_tests/test_document_query_builder.py +102 -0
  150. pyseekdb-1.4.1/tests/unit_tests/test_embedded_client_lifecycle.py +323 -0
  151. pyseekdb-1.4.1/tests/unit_tests/test_embedding_function_registry.py +422 -0
  152. pyseekdb-1.4.1/tests/unit_tests/test_env_guard.py +116 -0
  153. pyseekdb-1.4.1/tests/unit_tests/test_get_or_create_collection_concurrency.py +441 -0
  154. pyseekdb-1.4.1/tests/unit_tests/test_get_or_create_namespace_concurrency.py +94 -0
  155. pyseekdb-1.4.1/tests/unit_tests/test_google_vertex_embedding_function.py +383 -0
  156. pyseekdb-1.4.1/tests/unit_tests/test_hnsw_sync_mode.py +100 -0
  157. pyseekdb-1.4.1/tests/unit_tests/test_huggingface_sparse_embedding_function.py +359 -0
  158. pyseekdb-1.4.1/tests/unit_tests/test_hybrid_search_source_inference.py +115 -0
  159. pyseekdb-1.4.1/tests/unit_tests/test_hybrid_search_sql_rewrite.py +41 -0
  160. pyseekdb-1.4.1/tests/unit_tests/test_jina_embedding_function.py +331 -0
  161. pyseekdb-1.4.1/tests/unit_tests/test_mistral_embedding_function.py +188 -0
  162. pyseekdb-1.4.1/tests/unit_tests/test_mnn_embedding_function.py +225 -0
  163. pyseekdb-1.4.1/tests/unit_tests/test_mnn_execstack.py +208 -0
  164. pyseekdb-1.4.1/tests/unit_tests/test_morph_embedding_function.py +343 -0
  165. pyseekdb-1.4.1/tests/unit_tests/test_namespace.py +1555 -0
  166. pyseekdb-1.4.1/tests/unit_tests/test_namespace_kernel_errors.py +110 -0
  167. pyseekdb-1.4.1/tests/unit_tests/test_namespace_lifecycle_lock.py +43 -0
  168. pyseekdb-1.4.1/tests/unit_tests/test_namespace_no_index_embedding_dim.py +60 -0
  169. pyseekdb-1.4.1/tests/unit_tests/test_namespace_public_api.py +127 -0
  170. pyseekdb-1.4.1/tests/unit_tests/test_namespace_upsert_reconcile.py +98 -0
  171. pyseekdb-1.4.1/tests/unit_tests/test_ollama_embedding_function.py +458 -0
  172. pyseekdb-1.4.1/tests/unit_tests/test_onnx_embedding_function.py +78 -0
  173. pyseekdb-1.4.1/tests/unit_tests/test_openai_embedding_function.py +453 -0
  174. pyseekdb-1.4.1/tests/unit_tests/test_qwen_embedding_function.py +431 -0
  175. pyseekdb-1.4.1/tests/unit_tests/test_schema.py +173 -0
  176. pyseekdb-1.4.1/tests/unit_tests/test_sentence_transformer_embedding_function.py +262 -0
  177. pyseekdb-1.4.1/tests/unit_tests/test_siliconflow_embedding_function.py +490 -0
  178. pyseekdb-1.4.1/tests/unit_tests/test_sparse_embedding_function_registry.py +367 -0
  179. pyseekdb-1.4.1/tests/unit_tests/test_sparse_vector.py +125 -0
  180. pyseekdb-1.4.1/tests/unit_tests/test_sparse_vector_index_config.py +235 -0
  181. pyseekdb-1.4.1/tests/unit_tests/test_sparse_vector_sql.py +118 -0
  182. pyseekdb-1.4.1/tests/unit_tests/test_tencent_hunyuan_embedding_function.py +403 -0
  183. pyseekdb-1.4.1/tests/unit_tests/test_text2vec_embedding.py +120 -0
  184. pyseekdb-1.4.1/tests/unit_tests/test_types.py +117 -0
  185. pyseekdb-1.4.1/tests/unit_tests/test_utils.py +152 -0
  186. pyseekdb-1.4.1/tests/unit_tests/test_version.py +46 -0
  187. pyseekdb-1.4.1/tests/unit_tests/test_voyageai_embedding_function.py +539 -0
  188. pyseekdb-1.4.1/tests/unit_tests/test_weighted_rrf.py +202 -0
pyseekdb-1.4.1/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
pyseekdb-1.4.1/NOTICE ADDED
@@ -0,0 +1,15 @@
1
+ pyseekdb
2
+ Copyright (c) 2026 OceanBase and contributors
3
+
4
+ This product includes software developed by OceanBase and contributors and is
5
+ licensed under the Apache License, Version 2.0 (see LICENSE).
6
+
7
+ pyseekdb does not bundle third-party code. Its direct runtime dependencies are
8
+ installed separately; they are listed in THIRD_PARTY_COMPONENTS.md with their
9
+ constraints, licenses and the location of their license texts. Transitive
10
+ dependencies are resolved at install time and ship their own license texts.
11
+
12
+ The embedded engine driver pylibseekdb ships its complete engine license
13
+ bundle under pylibseekdb/licenses/ in its wheel (from version 1.4.1).
14
+ Downstream redistributors must retain that bundle together with the pyseekdb
15
+ package.
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyseekdb
3
+ Version: 1.4.1
4
+ Summary: A unified Python client for seekdb that supports embedded, server, and OceanBase.
5
+ Author-Email: OceanBase <open_oceanbase@oceanbase.com>
6
+ License-Expression: Apache-2.0
7
+ License-File: LICENSE
8
+ License-File: NOTICE
9
+ License-File: REDISTRIBUTION.md
10
+ License-File: THIRD_PARTY_COMPONENTS.json
11
+ License-File: THIRD_PARTY_COMPONENTS.md
12
+ Classifier: Development Status :: 4 - Beta
13
+ Project-URL: Homepage, https://www.seekdb.ai/
14
+ Project-URL: Repository, https://github.com/oceanbase/pyseekdb/
15
+ Project-URL: Bug Tracker, https://github.com/oceanbase/pyseekdb/issues
16
+ Requires-Python: <4,>=3.11
17
+ Requires-Dist: pymysql>=1.1.1
18
+ Requires-Dist: pylibseekdb; sys_platform == "linux" or (sys_platform == "darwin" and platform_machine == "arm64")
19
+ Requires-Dist: MNN>=3.6.1
20
+ Requires-Dist: tokenizers>=0.15.0
21
+ Requires-Dist: httpx
22
+ Requires-Dist: tqdm
23
+ Requires-Dist: tenacity
24
+ Requires-Dist: numpy!=2.4.0,>=1.26
25
+ Description-Content-Type: text/markdown
26
+
27
+ # pyseekdb
28
+
29
+ pyseekdb is a Python SDK for seekdb and OceanBase AI search. It supports embedded and server deployments with vector, full-text, and hybrid retrieval, and exposes a collection-first API for application workflows. For advanced database operations, you can use MySQL-compatible drivers to run SQL against seekdb and OceanBase.
30
+
31
+ Key features:
32
+
33
+ - **Unified API**: Single interface for embedded and remote server modes
34
+ - **Vector Operations**: Efficient vector similarity search
35
+ - **Hybrid Search**: Combine vector and full-text search
36
+ - **Embedding Functions**: Built-in support for various embedding models
37
+ - **Collection Management**: Easy collection (table) creation and management
38
+ - **Database Management**: Admin operations for database management
39
+
40
+ ## Documentation
41
+
42
+ - Docs home: https://docs.seekdb.ai
43
+ - SDK guide: https://docs.seekdb.ai/seekdb/pyseekdb-sdk-get-started
44
+ - User guide: https://docs.seekdb.ai/seekdb/deploy-overview
45
+ - API reference: https://docs.seekdb.ai/seekdb/api-overview
46
+ - RAG demo: [English](demo/rag/README.md) / [中文](demo/rag/README_CN.md)
47
+ - Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)
48
+
49
+ ## Installation
50
+
51
+ ```bash
52
+ pip install -U pyseekdb
53
+ # or with uv
54
+ uv add pyseekdb
55
+ ```
56
+
57
+ ## Quick Start
58
+
59
+ ```python
60
+ import pyseekdb
61
+
62
+ client = pyseekdb.Client(path="./seekdb.db", database="demo")
63
+ collection = client.get_or_create_collection("my_collection")
64
+
65
+ collection.add(
66
+ ids=["doc1", "doc2"],
67
+ documents=["Hello world", "pyseekdb quick start"],
68
+ metadatas=[{"tag": "hello"}, {"tag": "demo"}],
69
+ )
70
+
71
+ # Refresh the index to make the added documents searchable
72
+ collection.refresh_index()
73
+
74
+ results = collection.query(query_texts=["hello"], n_results=3)
75
+ print(results["ids"][0])
76
+ ```
77
+
78
+ For full usage, connection modes, collection management, and operations, see the
79
+ [User Guide](https://oceanbase.github.io/pyseekdb/guide/).
80
+
81
+ ## License
82
+
83
+ This package is licensed under Apache 2.0. See [LICENSE](LICENSE).
@@ -0,0 +1,57 @@
1
+ # pyseekdb
2
+
3
+ pyseekdb is a Python SDK for seekdb and OceanBase AI search. It supports embedded and server deployments with vector, full-text, and hybrid retrieval, and exposes a collection-first API for application workflows. For advanced database operations, you can use MySQL-compatible drivers to run SQL against seekdb and OceanBase.
4
+
5
+ Key features:
6
+
7
+ - **Unified API**: Single interface for embedded and remote server modes
8
+ - **Vector Operations**: Efficient vector similarity search
9
+ - **Hybrid Search**: Combine vector and full-text search
10
+ - **Embedding Functions**: Built-in support for various embedding models
11
+ - **Collection Management**: Easy collection (table) creation and management
12
+ - **Database Management**: Admin operations for database management
13
+
14
+ ## Documentation
15
+
16
+ - Docs home: https://docs.seekdb.ai
17
+ - SDK guide: https://docs.seekdb.ai/seekdb/pyseekdb-sdk-get-started
18
+ - User guide: https://docs.seekdb.ai/seekdb/deploy-overview
19
+ - API reference: https://docs.seekdb.ai/seekdb/api-overview
20
+ - RAG demo: [English](demo/rag/README.md) / [中文](demo/rag/README_CN.md)
21
+ - Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ pip install -U pyseekdb
27
+ # or with uv
28
+ uv add pyseekdb
29
+ ```
30
+
31
+ ## Quick Start
32
+
33
+ ```python
34
+ import pyseekdb
35
+
36
+ client = pyseekdb.Client(path="./seekdb.db", database="demo")
37
+ collection = client.get_or_create_collection("my_collection")
38
+
39
+ collection.add(
40
+ ids=["doc1", "doc2"],
41
+ documents=["Hello world", "pyseekdb quick start"],
42
+ metadatas=[{"tag": "hello"}, {"tag": "demo"}],
43
+ )
44
+
45
+ # Refresh the index to make the added documents searchable
46
+ collection.refresh_index()
47
+
48
+ results = collection.query(query_texts=["hello"], n_results=3)
49
+ print(results["ids"][0])
50
+ ```
51
+
52
+ For full usage, connection modes, collection management, and operations, see the
53
+ [User Guide](https://oceanbase.github.io/pyseekdb/guide/).
54
+
55
+ ## License
56
+
57
+ This package is licensed under Apache 2.0. See [LICENSE](LICENSE).
@@ -0,0 +1,52 @@
1
+ # Redistribution requirements
2
+
3
+ pyseekdb is Apache-2.0 (see LICENSE and NOTICE). It contains no bundled
4
+ third-party code; every component in `THIRD_PARTY_COMPONENTS.md` is a
5
+ separately installed runtime dependency.
6
+
7
+ ## What to retain
8
+
9
+ - Keep `LICENSE` and `NOTICE` with the pyseekdb distribution.
10
+ - Keep `THIRD_PARTY_COMPONENTS.md`, `THIRD_PARTY_COMPONENTS.json` and this
11
+ file so downstream redistributors can identify every direct dependency.
12
+ - For each separately installed dependency, retain the license text shipped
13
+ in its own distribution at the path recorded in the inventory, using the
14
+ version actually resolved for your distribution.
15
+ - For pylibseekdb, retain the complete `pylibseekdb/licenses/` bundle shipped
16
+ from 1.4.1 in its wheel: it contains the engine's component inventory,
17
+ license texts and redistribution requirements.
18
+
19
+ ## Per-component rules
20
+
21
+ | Component | Action |
22
+ | --- | --- |
23
+ | pylibseekdb | Retain the complete pylibseekdb/licenses/ bundle shipped in the pylibseekdb wheel (>=1.4.1), including the engine inventory and license texts. |
24
+ | PyMySQL | Retain the license text from the resolved pymysql distribution. |
25
+ | MNN | Retain the upstream MNN license text; the resolved wheel does not bundle one. |
26
+ | tokenizers | Retain the upstream tokenizers license text; the resolved wheel does not bundle one. |
27
+ | httpx | Retain the license text from the resolved httpx distribution. |
28
+ | tqdm | Retain the MPL-2.0 and MIT texts from the resolved tqdm distribution (dist-info/LICENCE). |
29
+ | tenacity | Retain the license text from the resolved tenacity distribution. |
30
+ | numpy | Retain the core license texts. If you redistribute the Linux wheels, also satisfy the vendored library licenses, including the LGPL-2.1 section 6 source conditions for libquadmath. |
31
+
32
+ ## Vendored libraries inside dependencies
33
+
34
+ The license expression recorded for numpy covers its core without vendored
35
+ libraries. The numpy 2.4.2 Linux wheels bundle OpenBLAS
36
+ (BSD-3-Clause AND BSD-3-Clause-Attribution), libgfortran
37
+ (GPL-3.0-with-GCC-exception) and libquadmath (LGPL-2.1-or-later) under
38
+ `numpy.libs/`; these texts are not in `dist-info/licenses/`. A distributor
39
+ that redistributes those wheels must also meet the LGPL-2.1 section 6
40
+ conditions for libquadmath, including providing its corresponding source or
41
+ equivalent access to it. This applies only to the components and platforms a
42
+ distributor actually ships.
43
+
44
+ ## Notes
45
+
46
+ - The inventory covers direct dependencies only. Transitive dependencies come
47
+ with their own license texts and must be identified from the resolved
48
+ environment when a downstream distribution bundles them.
49
+ - The locked tqdm wheel stores its license at `dist-info/LICENCE`, not under
50
+ `licenses/`.
51
+ - MNN and tokenizers ship no license text in their wheels; take the texts from
52
+ the upstream repositories listed in the inventory.
@@ -0,0 +1,98 @@
1
+ {
2
+ "schema_version": 1,
3
+ "artifact": {
4
+ "name": "pyseekdb",
5
+ "license": "Apache-2.0"
6
+ },
7
+ "scope": "Direct runtime dependencies declared in pyproject.toml. Transitive dependencies are resolved at install time and ship their own license texts.",
8
+ "components": [
9
+ {
10
+ "name": "pylibseekdb",
11
+ "constraint": "pylibseekdb (linux, macOS arm64)",
12
+ "locked_version": "1.3.0",
13
+ "source": "https://github.com/oceanbase/seekdb-bindings",
14
+ "license": "Apache-2.0",
15
+ "bundled": false,
16
+ "text_location": "none in 1.3.0; pylibseekdb/licenses/ and pylibseekdb-<version>.dist-info/licenses/ in >=1.4.1",
17
+ "notes": "The 1.3.0 wheel ships no license text. The complete engine and bindings bundle ships under pylibseekdb/licenses/ from 1.4.1 (oceanbase/seekdb-bindings#95).",
18
+ "redistribution": "Retain the complete pylibseekdb/licenses/ bundle shipped in the pylibseekdb wheel (>=1.4.1), including the engine inventory and license texts."
19
+ },
20
+ {
21
+ "name": "PyMySQL",
22
+ "constraint": "pymysql>=1.1.1",
23
+ "locked_version": "1.1.2",
24
+ "source": "https://github.com/PyMySQL/PyMySQL",
25
+ "license": "MIT",
26
+ "bundled": false,
27
+ "text_location": "pymysql-<version>.dist-info/licenses/LICENSE",
28
+ "notes": "",
29
+ "redistribution": "Retain the license text from the resolved pymysql distribution."
30
+ },
31
+ {
32
+ "name": "MNN",
33
+ "constraint": "MNN>=3.6.1",
34
+ "locked_version": "3.6.1",
35
+ "source": "https://github.com/alibaba/MNN",
36
+ "license": "BSD-3-Clause (declared in the PyPI metadata)",
37
+ "bundled": false,
38
+ "text_location": "no license file in the 3.6.1 wheel; upstream https://github.com/alibaba/MNN/blob/master/LICENSE",
39
+ "notes": "The resolved wheel bundles no license text; take it from the upstream repository.",
40
+ "redistribution": "Retain the upstream MNN license text; the resolved wheel does not bundle one."
41
+ },
42
+ {
43
+ "name": "tokenizers",
44
+ "constraint": "tokenizers>=0.15.0",
45
+ "locked_version": "0.22.2",
46
+ "source": "https://github.com/huggingface/tokenizers",
47
+ "license": "Apache-2.0",
48
+ "bundled": false,
49
+ "text_location": "no license file in the 0.22.2 wheel; upstream https://github.com/huggingface/tokenizers/blob/main/LICENSE",
50
+ "notes": "The resolved wheel bundles no license text; take it from the upstream repository.",
51
+ "redistribution": "Retain the upstream tokenizers license text; the resolved wheel does not bundle one."
52
+ },
53
+ {
54
+ "name": "httpx",
55
+ "constraint": "httpx",
56
+ "locked_version": "0.28.1",
57
+ "source": "https://github.com/encode/httpx",
58
+ "license": "BSD-3-Clause",
59
+ "bundled": false,
60
+ "text_location": "httpx-<version>.dist-info/licenses/LICENSE.md",
61
+ "notes": "",
62
+ "redistribution": "Retain the license text from the resolved httpx distribution."
63
+ },
64
+ {
65
+ "name": "tqdm",
66
+ "constraint": "tqdm",
67
+ "locked_version": "4.67.1",
68
+ "source": "https://github.com/tqdm/tqdm",
69
+ "license": "MPL-2.0 AND MIT",
70
+ "bundled": false,
71
+ "text_location": "tqdm-<version>.dist-info/LICENCE",
72
+ "notes": "The locked wheel stores the license at LICENCE, not under licenses/.",
73
+ "redistribution": "Retain the MPL-2.0 and MIT texts from the resolved tqdm distribution (dist-info/LICENCE)."
74
+ },
75
+ {
76
+ "name": "tenacity",
77
+ "constraint": "tenacity",
78
+ "locked_version": "9.1.2",
79
+ "source": "https://github.com/jd/tenacity",
80
+ "license": "Apache-2.0",
81
+ "bundled": false,
82
+ "text_location": "tenacity-<version>.dist-info/licenses/LICENSE",
83
+ "notes": "",
84
+ "redistribution": "Retain the license text from the resolved tenacity distribution."
85
+ },
86
+ {
87
+ "name": "numpy",
88
+ "constraint": "numpy>=1.26,!=2.4.0",
89
+ "locked_version": "2.4.2",
90
+ "source": "https://github.com/numpy/numpy",
91
+ "license": "BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0 (core only)",
92
+ "bundled": false,
93
+ "text_location": "numpy-<version>.dist-info/licenses/ (core)",
94
+ "notes": "The expression covers the numpy core without vendored libraries. The 2.4.2 Linux wheels bundle OpenBLAS (BSD-3-Clause AND BSD-3-Clause-Attribution), libgfortran (GPL-3.0-with-GCC-exception) and libquadmath (LGPL-2.1-or-later) under numpy.libs/; their texts are not in dist-info/licenses/.",
95
+ "redistribution": "Retain the core license texts. If you redistribute the Linux wheels, also satisfy the vendored library licenses, including the LGPL-2.1 section 6 source conditions for libquadmath."
96
+ }
97
+ ]
98
+ }
@@ -0,0 +1,28 @@
1
+ # Third-party components
2
+
3
+ pyseekdb does not bundle third-party code. The table lists the **direct**
4
+ runtime dependencies declared in `pyproject.toml`; transitive dependencies
5
+ are resolved at install time and ship their own license texts. The locked
6
+ column records the version resolved by `uv.lock`; downstream distributions
7
+ must use the license texts of the versions they actually resolve.
8
+
9
+ | Component | Constraint | Locked | Upstream source | License | License text |
10
+ | --- | --- | --- | --- | --- | --- |
11
+ | pylibseekdb | `pylibseekdb (linux, macOS arm64)` | 1.3.0 | https://github.com/oceanbase/seekdb-bindings | Apache-2.0 | `none in 1.3.0; pylibseekdb/licenses/ and pylibseekdb-<version>.dist-info/licenses/ in >=1.4.1` |
12
+ | PyMySQL | `pymysql>=1.1.1` | 1.1.2 | https://github.com/PyMySQL/PyMySQL | MIT | `pymysql-<version>.dist-info/licenses/LICENSE` |
13
+ | MNN | `MNN>=3.6.1` | 3.6.1 | https://github.com/alibaba/MNN | BSD-3-Clause (declared in the PyPI metadata) | `no license file in the 3.6.1 wheel; upstream https://github.com/alibaba/MNN/blob/master/LICENSE` |
14
+ | tokenizers | `tokenizers>=0.15.0` | 0.22.2 | https://github.com/huggingface/tokenizers | Apache-2.0 | `no license file in the 0.22.2 wheel; upstream https://github.com/huggingface/tokenizers/blob/main/LICENSE` |
15
+ | httpx | `httpx` | 0.28.1 | https://github.com/encode/httpx | BSD-3-Clause | `httpx-<version>.dist-info/licenses/LICENSE.md` |
16
+ | tqdm | `tqdm` | 4.67.1 | https://github.com/tqdm/tqdm | MPL-2.0 AND MIT | `tqdm-<version>.dist-info/LICENCE` |
17
+ | tenacity | `tenacity` | 9.1.2 | https://github.com/jd/tenacity | Apache-2.0 | `tenacity-<version>.dist-info/licenses/LICENSE` |
18
+ | numpy | `numpy>=1.26,!=2.4.0` | 2.4.2 | https://github.com/numpy/numpy | BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0 (core only) | `numpy-<version>.dist-info/licenses/ (core)` |
19
+
20
+ Notes:
21
+
22
+ - **pylibseekdb**: The 1.3.0 wheel ships no license text. The complete engine and bindings bundle ships under pylibseekdb/licenses/ from 1.4.1 (oceanbase/seekdb-bindings#95).
23
+ - **MNN**: The resolved wheel bundles no license text; take it from the upstream repository.
24
+ - **tokenizers**: The resolved wheel bundles no license text; take it from the upstream repository.
25
+ - **tqdm**: The locked wheel stores the license at LICENCE, not under licenses/.
26
+ - **numpy**: The expression covers the numpy core without vendored libraries. The 2.4.2 Linux wheels bundle OpenBLAS (BSD-3-Clause AND BSD-3-Clause-Attribution), libgfortran (GPL-3.0-with-GCC-exception) and libquadmath (LGPL-2.1-or-later) under numpy.libs/; their texts are not in dist-info/licenses/.
27
+
28
+ See `REDISTRIBUTION.md` for the per-component retention rules.
@@ -0,0 +1,66 @@
1
+ /* 版本选择器下拉框样式 - 放在左侧导航栏搜索框下方 */
2
+ .version-selector-dropdown {
3
+ display: flex;
4
+ align-items: center;
5
+ gap: 8px;
6
+ margin-top: 8px;
7
+ border-radius: 50px;
8
+ }
9
+
10
+ .version-selector-dropdown label {
11
+ font-size: 13px;
12
+ font-weight: 600;
13
+ color: #fff;
14
+ margin: 0;
15
+ white-space: nowrap;
16
+ }
17
+
18
+ .version-selector-dropdown select {
19
+ flex: 1;
20
+ padding: 6px 10px;
21
+ font-size: 13px;
22
+ color: #404040;
23
+ background-color: #fff;
24
+ border: 1px solid #d0d0d0;
25
+ border-radius: 4px;
26
+ cursor: pointer;
27
+ outline: none;
28
+ transition: all 0.2s ease;
29
+ }
30
+
31
+ .version-selector-dropdown select:hover {
32
+ border-color: #2980b9;
33
+ }
34
+
35
+ .version-selector-dropdown select:focus {
36
+ border-color: #2980b9;
37
+ box-shadow: 0 0 0 2px rgba(41, 128, 185, 0.1);
38
+ }
39
+
40
+ /* RTD 主题版本横幅样式 - 隐藏左下角的版本选择器 */
41
+ .rst-versions {
42
+ display: none !important;
43
+ }
44
+
45
+ /* 版本警告横幅 */
46
+ .version-warning {
47
+ padding: 10px 15px;
48
+ margin-bottom: 20px;
49
+ background-color: #fff3cd;
50
+ border: 1px solid #ffeaa7;
51
+ border-radius: 4px;
52
+ color: #856404;
53
+ }
54
+
55
+ .version-warning strong {
56
+ font-weight: bold;
57
+ }
58
+
59
+ .version-warning a {
60
+ color: #856404;
61
+ text-decoration: underline;
62
+ }
63
+
64
+ .version-warning a:hover {
65
+ color: #533f03;
66
+ }
@@ -0,0 +1,18 @@
1
+ {% extends "!layout.html" %}
2
+
3
+ {# 在左侧导航栏的搜索框下方插入版本选择器 #}
4
+ {% block sidebartitle %}
5
+ {{ super() }}
6
+ {% if versions %}
7
+ <div class="version-selector-dropdown">
8
+ <label for="version-select">版本:</label>
9
+ <select id="version-select" onchange="window.location.href=this.value">
10
+ {% for item in versions %}
11
+ <option value="{{ item.url }}" {% if item.name == current_version %}selected{% endif %}>
12
+ {{ item.name }}{% if item.name == current_version %} (当前){% elif item.is_released %} (稳定){% endif %}
13
+ </option>
14
+ {% endfor %}
15
+ </select>
16
+ </div>
17
+ {% endif %}
18
+ {% endblock %}