mst-python 0.4.2__cp314-cp314-win_amd64.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.
mst/__init__.py ADDED
@@ -0,0 +1,29 @@
1
+ """mst: CGO Python bindings for mst (Meta-Search Tool).
2
+
3
+ Concurrent multi-engine web search with RRF ranking, zero subprocess overhead.
4
+
5
+ Usage:
6
+ import mst
7
+
8
+ result = mst.search("rust async runtime comparison")
9
+ for item in result["results"]:
10
+ print(f"{item['rank']}. {item['title']}")
11
+
12
+ engines = mst.list_engines()
13
+ """
14
+
15
+ from ._mst import MSTError, list_engines, search
16
+
17
+ __all__ = ["search", "list_engines", "MSTError"]
18
+
19
+ # Reflect the installed distribution version (populated by setup.py from the
20
+ # release tag). Falls back when run from a source tree that isn't installed.
21
+ try:
22
+ from importlib.metadata import PackageNotFoundError, version as _dist_version
23
+
24
+ try:
25
+ __version__ = _dist_version("mst")
26
+ except PackageNotFoundError:
27
+ __version__ = "0.0.0-dev"
28
+ except ImportError: # Python <3.8 (unsupported, but stay safe)
29
+ __version__ = "0.0.0-dev"
Binary file
mst/_mst.dll ADDED
Binary file
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.4
2
+ Name: mst-python
3
+ Version: 0.4.2
4
+ Summary: CGO Python bindings for mst (Meta-Search Tool) — concurrent multi-engine web search with RRF ranking
5
+ Author: mst contributors
6
+ License-Expression: Apache-2.0
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Python :: 3.14
13
+ Requires-Python: >=3.11
14
+ Description-Content-Type: text/markdown
15
+
16
+ # mst-python — Meta Search Tool (Python bindings)
17
+
18
+ [![Release](https://github.com/openmtx/meta-search-tool/actions/workflows/release.yml/badge.svg)](https://github.com/openmtx/meta-search-tool/actions/workflows/release.yml)
19
+ [![PyPI](https://img.shields.io/pypi/v/mst-python)](https://pypi.org/project/mst-python/)
20
+ [![Python Versions](https://img.shields.io/pypi/pyversions/mst-python)](https://pypi.org/project/mst-python/)
21
+
22
+ CGO Python bindings for **mst** — a concurrent multi-engine web search tool with
23
+ transparent RRF ranking. Fan out to 12+ engines in parallel, get merged JSON
24
+ results with scores. No server, no setup.
25
+
26
+ ```python
27
+ import mst
28
+
29
+ # Search across all enabled engines
30
+ result = mst.search("rust async runtime comparison")
31
+
32
+ # Or pick specific engines
33
+ result = mst.search("riscv paging", engines=["ddg", "google"], limit=10)
34
+
35
+ print(f"Found {len(result['results'])} results in {result['took_ms']}ms")
36
+ for r in result['results']:
37
+ print(f" #{r['rank']} {r['title']} (score={r['score']})")
38
+ ```
39
+
40
+ ## Features
41
+
42
+ - **12 engines** across general web, academic, reference, Q&A, and AI categories
43
+ - **Concurrent fan-out** with per-engine timeouts — a slow engine never blocks the run
44
+ - **RRF ranking** with configurable per-engine weights and smoothing constant
45
+ - **Keyless engines** work out of the box: DuckDuckGo, Google, Wikipedia, arXiv, and more
46
+ - **Keyed engines** (Brave, Bing, Tavily) ready when you set their API keys
47
+
48
+ ## Installation
49
+
50
+ ```bash
51
+ pip install mst-python
52
+ ```
53
+
54
+ Works on Linux (manylinux_2_34 x86_64) and macOS (Apple Silicon arm64).
55
+
56
+ ## Quick start
57
+
58
+ ```python
59
+ import mst
60
+
61
+ # List all engines and their status
62
+ engines = mst.list_engines()
63
+ for e in engines:
64
+ print(f"{e['name']:20s} {e['status']:15s} weight={e['weight']}")
65
+
66
+ # Run a search
67
+ result = mst.search("python asyncio vs threading", limit=5)
68
+ print(result)
69
+ ```
70
+
71
+ ## API
72
+
73
+ ### `mst.search(query, engines=None, limit=10, offset=0, rrf_k=60, timeout="8s", weights=None)`
74
+
75
+ | Param | Type | Default | Description |
76
+ |-------|------|---------|-------------|
77
+ | `query` | `str` | — | Search query |
78
+ | `engines` | `list[str]` or `None` | `None` | Engine whitelist (`None` = all enabled engines) |
79
+ | `limit` | `int` | `10` | Max merged results (1–100) |
80
+ | `offset` | `int` | `0` | Skip first N results |
81
+ | `rrf_k` | `int` | `60` | RRF smoothing constant |
82
+ | `timeout` | `str` | `"8s"` | Per-engine timeout duration |
83
+ | `weights` | `dict[str, float]` or `None` | `None` | Per-engine weight overrides |
84
+
85
+ Returns a dict with `query`, `took_ms`, `results` (list of ranked results).
86
+
87
+ ### `mst.list_engines()`
88
+
89
+ Returns a list of engine dicts with `name`, `enabled`, `keyed`, `weight`, `category`, `status`.
90
+
91
+ ### `mst.__version__`
92
+
93
+ Package version string (derived from the release tag when installed via PyPI).
94
+
95
+ ## Requirements
96
+
97
+ - Python ≥ 3.11
98
+ - Linux (x86_64, glibc ≥ 2.34) or macOS (arm64)
99
+
100
+ No runtime dependencies — the CGO shared library is bundled in the wheel.
101
+
102
+ ## License
103
+
104
+ Apache-2.0. See [`LICENSE`](https://github.com/openmtx/meta-search-tool/blob/master/LICENSE).
@@ -0,0 +1,7 @@
1
+ mst/__init__.py,sha256=_NGWxymQOV5kfs5JxasbW9uZ30hOLTHFxJ83yGfv4IM,925
2
+ mst/_mst.cp314-win_amd64.pyd,sha256=9lz9rDaytDTAH__J12W4KhMxMb0K6Gr71whvwu5xdk4,62976
3
+ mst/_mst.dll,sha256=eau_gk4pXYFcXNdeOmBhpEZ1hFKRGDbe45S_MTDSvn0,14454402
4
+ mst_python-0.4.2.dist-info/METADATA,sha256=na7bmrmt4453mOZHZahd65BuEZw6Mi5l-svn4kmBf8c,3742
5
+ mst_python-0.4.2.dist-info/WHEEL,sha256=pIUzES5vCYHKBR6AfxXxDFyqjZ9ckCheusePfq1FYSo,101
6
+ mst_python-0.4.2.dist-info/top_level.txt,sha256=wWnObFIH0CbsgenDXlDpKZv1zdBkbCM4iASswi0Vofw,4
7
+ mst_python-0.4.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp314-cp314-win_amd64
5
+
@@ -0,0 +1 @@
1
+ mst