search-api-webui 0.1.2__py3-none-any.whl → 0.1.3__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.
@@ -1,12 +1,18 @@
1
1
  import json
2
2
  import os
3
+ import webbrowser
3
4
  from pathlib import Path
4
5
  from flask import Flask, request, jsonify, send_from_directory
5
6
  from flask_cors import CORS
6
- from backend.providers import load_providers
7
+ from search_api_webui.providers import load_providers
7
8
 
8
9
  CURRENT_DIR = Path(__file__).resolve().parent
10
+
9
11
  STATIC_FOLDER = CURRENT_DIR / 'static'
12
+ if not STATIC_FOLDER.exists():
13
+ DEV_FRONTEND_DIST = CURRENT_DIR.parent / 'frontend' / 'dist'
14
+ if DEV_FRONTEND_DIST.exists():
15
+ STATIC_FOLDER = DEV_FRONTEND_DIST
10
16
 
11
17
  app = Flask(__name__, static_folder='static')
12
18
  CORS(app)
@@ -151,15 +157,18 @@ def main():
151
157
  import argparse
152
158
  parser = argparse.ArgumentParser(description="Search API WebUI")
153
159
  parser.add_argument("--port", type=int, default=8889, help="Port to run the server on")
154
- parser.add_argument("--host", type=str, default="0.0.0.0", help="Host to run the server on")
160
+ parser.add_argument("--host", type=str, default="127.0.0.1", help="Host to run the server on")
155
161
  args = parser.parse_args()
156
162
 
163
+ url = f"http://{args.host}:{args.port}"
157
164
  print(f"Starting Search API WebUI...")
158
165
  print(f" - Config Storage: {USER_CONFIG_JSON}")
159
- print(f" - Serving on: http://{args.host}:{args.port}")
166
+ print(f" - Serving on: {url}")
167
+
168
+ # Open browser automatically after a short delay to ensure server is ready
169
+ webbrowser.open(url)
160
170
 
161
171
  app.run(host=args.host, port=args.port)
162
172
 
163
173
  if __name__ == "__main__":
164
174
  main()
165
-
Binary file
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <link rel="icon" type="image/x-icon" href="/favicon.ico" />
6
7
  <title>Search API WebUI</title>
7
8
  <script type="module" crossorigin src="/assets/index-CF13bI2g.js"></script>
8
9
  <link rel="stylesheet" crossorigin href="/assets/index-DLyBd1PD.css">
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: search-api-webui
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: A Search API WebUI for Querit, You, and other search providers.
5
5
  Project-URL: Homepage, https://github.com/querit-ai/search-api-webui
6
6
  Project-URL: Repository, https://github.com/querit-ai/search-api-webui.git
@@ -24,17 +24,17 @@ Description-Content-Type: text/markdown
24
24
 
25
25
  # Search API WebUI
26
26
 
27
- A lightweight, local WebUI for testing and visualizing Search APIs (Querit, YDC, etc.).
27
+ A lightweight, local WebUI for testing and visualizing Search APIs (Querit, You, etc.).
28
28
 
29
29
  (images)
30
30
 
31
31
  ## Features
32
32
 
33
- **Search**: Support for Querit, You.com, and generic Search APIs via configuration.
34
- **Performance Metrics**: Real-time display of request latency and payload size.
35
- **Visual Rendering**: Renders standard search results (Title, Snippet, URL) in a clean card layout.
36
- **Configurable**: Easy-to-edit providers.yaml to add or modify search providers.
37
- **Secure**: API Keys are stored locally in user_config.json and never committed.
33
+ * **Search**: Support for [Querit.ai](https://www.querit.ai/en/docs/reference/post), [You.com](https://docs.you.com/api-reference/search/v1-search), and generic Search APIs via configuration.
34
+ * **Performance Metrics**: Real-time display of request latency and payload size.
35
+ * **Visual Rendering**: Renders standard search results (Title, Snippet, URL) in a clean card layout.
36
+ * **Configurable**: Easy-to-edit providers.yaml to add or modify search providers.
37
+ * **Secure**: API Keys are stored locally in your $HOME folder.
38
38
  ## Installation
39
39
 
40
40
  Use this method if you just want to run the tool without modifying the code.
@@ -0,0 +1,16 @@
1
+ search_api_webui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ search_api_webui/app.py,sha256=GsPD0tEsXvQnlryYWmwtsYaVPdgJulF8DrhAWeRC3Ao,5470
3
+ search_api_webui/providers.yaml,sha256=GMF7-o9eqe1AVXuMHEfdfl4OPeIZInDCqjsvO2tRHp0,752
4
+ search_api_webui/providers/__init__.py,sha256=1RfIA8eQxDLDjXrUxWzmg3tucZGv7WuZ5pJBsc6fAnQ,1052
5
+ search_api_webui/providers/base.py,sha256=_iYcxCxI7VCoxb02D71KqtojAU91D6rc3c5dwKNYJ2o,863
6
+ search_api_webui/providers/generic.py,sha256=ztwqko1KjiC2BS2afwZY2heREWLW0Kh2ZivqgLofbXU,6211
7
+ search_api_webui/providers/querit.py,sha256=5_vHXcDz59jhqY35w8vaoVH3BqGiQCYEZaekIvTKkak,2688
8
+ search_api_webui/static/favicon.ico,sha256=U_7TbOXM0jf963y9j0jogM0rBpKNr72HVVOofnBNAVQ,15086
9
+ search_api_webui/static/index.html,sha256=XpFSxOK7-zs_c4AmgSadEjBiAkAsSju2O275UrGMuBM,465
10
+ search_api_webui/static/assets/index-CF13bI2g.js,sha256=91wc8meWvRXloy4vzmGN43DvrpHIjMVIdCihXCw9zBU,208926
11
+ search_api_webui/static/assets/index-DLyBd1PD.css,sha256=nevUEbN7Fw9cq3aXWV7v_tQpD00d7kr3I64dgZ-e7ys,17914
12
+ search_api_webui-0.1.3.dist-info/METADATA,sha256=soEZ1eYNQ4QT1Fst0WA50vOrGHzQXCNYKqmY_6Bvibs,2924
13
+ search_api_webui-0.1.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
14
+ search_api_webui-0.1.3.dist-info/entry_points.txt,sha256=ogYy3eeonZ_oQlrEZC-4JBWfYdB7kkkdqXUUmX0xgMs,63
15
+ search_api_webui-0.1.3.dist-info/licenses/LICENSE,sha256=jHhlLwtvhZRz1yU1G_3cjsPigCTXQGT1qshhyekdmTE,1061
16
+ search_api_webui-0.1.3.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ search-api-webui = search_api_webui.app:main
@@ -1,15 +0,0 @@
1
- backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- backend/app.py,sha256=XLW8bJVgap4yZ6MUgAuJ4bxSID_zKM699nCW7L_e3XA,5144
3
- backend/providers/__init__.py,sha256=1RfIA8eQxDLDjXrUxWzmg3tucZGv7WuZ5pJBsc6fAnQ,1052
4
- backend/providers/base.py,sha256=_iYcxCxI7VCoxb02D71KqtojAU91D6rc3c5dwKNYJ2o,863
5
- backend/providers/generic.py,sha256=ztwqko1KjiC2BS2afwZY2heREWLW0Kh2ZivqgLofbXU,6211
6
- backend/providers/querit.py,sha256=5_vHXcDz59jhqY35w8vaoVH3BqGiQCYEZaekIvTKkak,2688
7
- backend/providers.yaml,sha256=GMF7-o9eqe1AVXuMHEfdfl4OPeIZInDCqjsvO2tRHp0,752
8
- backend/static/index.html,sha256=fhLWDY2W-bN-bBq2fmkch-e6gRZpoyqbKvNBzpWHiHk,401
9
- backend/static/assets/index-CF13bI2g.js,sha256=91wc8meWvRXloy4vzmGN43DvrpHIjMVIdCihXCw9zBU,208926
10
- backend/static/assets/index-DLyBd1PD.css,sha256=nevUEbN7Fw9cq3aXWV7v_tQpD00d7kr3I64dgZ-e7ys,17914
11
- search_api_webui-0.1.2.dist-info/METADATA,sha256=0_qkPbasFwqzvM-53fSlgwyAvo8cPwSYZ-nPq3007I0,2827
12
- search_api_webui-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
13
- search_api_webui-0.1.2.dist-info/entry_points.txt,sha256=D9R5N6s2Bt8rEKYSINTUB1f45nH-Xc5iIKNPfYYc8ec,54
14
- search_api_webui-0.1.2.dist-info/licenses/LICENSE,sha256=jHhlLwtvhZRz1yU1G_3cjsPigCTXQGT1qshhyekdmTE,1061
15
- search_api_webui-0.1.2.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- search-api-webui = backend.app:main
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes