hisamdb 1.0.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 (47) hide show
  1. hisamdb/__init__.py +151 -0
  2. hisamdb/api/__init__.py +42 -0
  3. hisamdb/api/client.py +551 -0
  4. hisamdb/api/metrics.py +134 -0
  5. hisamdb/api/schemas.py +192 -0
  6. hisamdb/api/security.py +221 -0
  7. hisamdb/api/server.py +774 -0
  8. hisamdb/client.py +282 -0
  9. hisamdb/collection.py +2694 -0
  10. hisamdb/concurrency/__init__.py +15 -0
  11. hisamdb/concurrency/async_client.py +451 -0
  12. hisamdb/concurrency/executor.py +175 -0
  13. hisamdb/concurrency/rwlock.py +67 -0
  14. hisamdb/distance.py +30 -0
  15. hisamdb/filtering/__init__.py +5 -0
  16. hisamdb/filtering/metadata_index.py +627 -0
  17. hisamdb/indexes/__init__.py +17 -0
  18. hisamdb/indexes/disk_index.py +536 -0
  19. hisamdb/indexes/hnsw.py +351 -0
  20. hisamdb/indexes/ivf.py +656 -0
  21. hisamdb/indexes/ivf_pq.py +608 -0
  22. hisamdb/indexes/optimizer.py +290 -0
  23. hisamdb/ivf_index.py +10 -0
  24. hisamdb/metrics/__init__.py +33 -0
  25. hisamdb/metrics/kernels.py +215 -0
  26. hisamdb/metrics/native_simd.py +196 -0
  27. hisamdb/quantization/__init__.py +13 -0
  28. hisamdb/quantization/binary.py +134 -0
  29. hisamdb/quantization/float16.py +62 -0
  30. hisamdb/quantization/product.py +407 -0
  31. hisamdb/quantization/scalar.py +299 -0
  32. hisamdb/search/__init__.py +31 -0
  33. hisamdb/search/hybrid.py +109 -0
  34. hisamdb/search/rag.py +348 -0
  35. hisamdb/search/sparse.py +355 -0
  36. hisamdb/storage/__init__.py +42 -0
  37. hisamdb/storage/binary_format.py +274 -0
  38. hisamdb/storage/engine.py +1075 -0
  39. hisamdb/storage/vector_buffer.py +256 -0
  40. hisamdb/storage/wal.py +193 -0
  41. hisamdb/types.py +141 -0
  42. hisamdb-1.0.0.dist-info/METADATA +458 -0
  43. hisamdb-1.0.0.dist-info/RECORD +47 -0
  44. hisamdb-1.0.0.dist-info/WHEEL +5 -0
  45. hisamdb-1.0.0.dist-info/entry_points.txt +2 -0
  46. hisamdb-1.0.0.dist-info/licenses/LICENSE +21 -0
  47. hisamdb-1.0.0.dist-info/top_level.txt +1 -0
hisamdb/__init__.py ADDED
@@ -0,0 +1,151 @@
1
+ """
2
+ HisamDB (hisamdb)
3
+ =================
4
+ Cutting-Edge, yüksek performanslı, ultra düşük bellek tüketimli, hibrit arama ve RAG destekli,
5
+ WAL korumalı ve geliştirici dostu Python Vektör Veritabanı.
6
+ """
7
+
8
+ from hisamdb.api.client import (
9
+ RemoteAPIError,
10
+ RemoteCollection,
11
+ RemoteHisamDB,
12
+ RemoteMicroVectorDB,
13
+ )
14
+ from hisamdb.client import (
15
+ BaseClient,
16
+ EphemeralClient,
17
+ HisamDB,
18
+ MicroVectorDB,
19
+ PersistentClient,
20
+ )
21
+ from hisamdb.collection import Collection
22
+ from hisamdb.concurrency import (
23
+ BackgroundTaskManager,
24
+ BatchQueryExecutor,
25
+ RWLock,
26
+ )
27
+ from hisamdb.concurrency.async_client import (
28
+ AsyncCollection,
29
+ AsyncHisamDB,
30
+ AsyncMicroVectorDB,
31
+ AsyncTenantCollection,
32
+ )
33
+ from hisamdb.filtering import MetadataIndex
34
+ from hisamdb.indexes import (
35
+ DiskIndex,
36
+ DiskStreamingScanner,
37
+ HNSWIndex,
38
+ IVFIndex,
39
+ IVFPQIndex,
40
+ QueryOptimizer,
41
+ is_hnsw_available,
42
+ )
43
+ from hisamdb.metrics import (
44
+ is_native_simd_available,
45
+ native_simd_path,
46
+ set_native_simd_enabled,
47
+ )
48
+ from hisamdb.quantization import (
49
+ BinaryQuantizer,
50
+ Float16Quantizer,
51
+ ProductQuantizer,
52
+ ScalarQuantizer,
53
+ )
54
+ from hisamdb.search import (
55
+ BM25Index,
56
+ SparseVector,
57
+ SparseVectorIndex,
58
+ TenantCollection,
59
+ apply_reranker,
60
+ chunk_text,
61
+ deduplicate_results,
62
+ fuse_rrf,
63
+ fuse_weighted,
64
+ group_results_by_field,
65
+ normalize_scores,
66
+ tokenize_text,
67
+ )
68
+ from hisamdb.storage import StorageEngine, VectorBuffer, WriteAheadLog
69
+ from hisamdb.types import (
70
+ CollectionAlreadyExistsError,
71
+ CollectionNotFoundError,
72
+ DataCorruptionError,
73
+ DimensionMismatchError,
74
+ IndexType,
75
+ InvalidCollectionNameError,
76
+ InvalidMetricError,
77
+ InvalidVectorError,
78
+ MetricType,
79
+ QuantizationType,
80
+ QueryPlan,
81
+ QueryResult,
82
+ SearchResultItem,
83
+ StorageDType,
84
+ VectorDBError,
85
+ )
86
+
87
+ __version__ = "1.0.0"
88
+ __all__ = [
89
+ "HisamDB",
90
+ "AsyncHisamDB",
91
+ "RemoteHisamDB",
92
+ "MicroVectorDB",
93
+ "AsyncMicroVectorDB",
94
+ "RemoteMicroVectorDB",
95
+ "RemoteCollection",
96
+ "RemoteAPIError",
97
+ "PersistentClient",
98
+ "EphemeralClient",
99
+ "BaseClient",
100
+ "Collection",
101
+ "AsyncCollection",
102
+ "TenantCollection",
103
+ "AsyncTenantCollection",
104
+ "BatchQueryExecutor",
105
+ "BackgroundTaskManager",
106
+ "IVFIndex",
107
+ "IVFPQIndex",
108
+ "HNSWIndex",
109
+ "DiskIndex",
110
+ "DiskStreamingScanner",
111
+ "QueryOptimizer",
112
+ "is_hnsw_available",
113
+ "is_native_simd_available",
114
+ "native_simd_path",
115
+ "set_native_simd_enabled",
116
+ "ScalarQuantizer",
117
+ "Float16Quantizer",
118
+ "BinaryQuantizer",
119
+ "ProductQuantizer",
120
+ "BM25Index",
121
+ "SparseVectorIndex",
122
+ "SparseVector",
123
+ "tokenize_text",
124
+ "normalize_scores",
125
+ "fuse_rrf",
126
+ "fuse_weighted",
127
+ "chunk_text",
128
+ "apply_reranker",
129
+ "deduplicate_results",
130
+ "group_results_by_field",
131
+ "MetadataIndex",
132
+ "StorageEngine",
133
+ "VectorBuffer",
134
+ "WriteAheadLog",
135
+ "RWLock",
136
+ "QueryPlan",
137
+ "QueryResult",
138
+ "SearchResultItem",
139
+ "VectorDBError",
140
+ "CollectionNotFoundError",
141
+ "CollectionAlreadyExistsError",
142
+ "DimensionMismatchError",
143
+ "InvalidMetricError",
144
+ "InvalidVectorError",
145
+ "InvalidCollectionNameError",
146
+ "DataCorruptionError",
147
+ "MetricType",
148
+ "IndexType",
149
+ "QuantizationType",
150
+ "StorageDType",
151
+ ]
@@ -0,0 +1,42 @@
1
+ """
2
+ hisamdb.api
3
+ -----------------
4
+ REST Sunucusu (opsiyonel FastAPI + Uvicorn) ve Sıfır-Bağımlılıklı Python HTTP SDK paketi.
5
+ """
6
+
7
+ from hisamdb.api.client import (
8
+ RemoteAPIError,
9
+ RemoteCollection,
10
+ RemoteHisamDB,
11
+ RemoteMicroVectorDB,
12
+ )
13
+ from hisamdb.api.metrics import MetricsCollector
14
+ from hisamdb.api.security import (
15
+ APIKeyRegistry,
16
+ AuthPrincipal,
17
+ SanitizingLogFilter,
18
+ TokenBucketRateLimiter,
19
+ hash_api_key,
20
+ mask_secret,
21
+ )
22
+
23
+ __all__ = [
24
+ "RemoteHisamDB",
25
+ "RemoteMicroVectorDB",
26
+ "RemoteCollection",
27
+ "RemoteAPIError",
28
+ "APIKeyRegistry",
29
+ "AuthPrincipal",
30
+ "TokenBucketRateLimiter",
31
+ "SanitizingLogFilter",
32
+ "MetricsCollector",
33
+ "hash_api_key",
34
+ "mask_secret",
35
+ ]
36
+
37
+ try:
38
+ from hisamdb.api.server import ServerConfig, create_app
39
+
40
+ __all__ += ["ServerConfig", "create_app"]
41
+ except ImportError:
42
+ pass