slothquery 1.0.0__tar.gz → 1.0.2__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 (31) hide show
  1. {slothquery-1.0.0 → slothquery-1.0.2}/MANIFEST.in +1 -1
  2. {slothquery-1.0.0/backend/slothquery.egg-info → slothquery-1.0.2}/PKG-INFO +1 -1
  3. {slothquery-1.0.0 → slothquery-1.0.2}/README.md +234 -228
  4. {slothquery-1.0.0 → slothquery-1.0.2}/backend/app/__init__.py +1 -1
  5. {slothquery-1.0.0 → slothquery-1.0.2}/backend/app/cli.py +26 -26
  6. slothquery-1.0.2/backend/app/routers/__init__.py +1 -0
  7. slothquery-1.0.2/backend/app/routers/core.py +466 -0
  8. slothquery-1.0.2/backend/app/services/__init__.py +1 -0
  9. slothquery-1.0.2/backend/app/services/chat.py +217 -0
  10. slothquery-1.0.2/backend/app/services/encryption.py +28 -0
  11. slothquery-1.0.2/backend/app/services/export_import.py +55 -0
  12. slothquery-1.0.2/backend/app/services/extraction.py +403 -0
  13. slothquery-1.0.2/backend/app/services/provider.py +112 -0
  14. slothquery-1.0.2/backend/app/services/retrieval.py +185 -0
  15. slothquery-1.0.2/backend/app/services/vector_store.py +69 -0
  16. {slothquery-1.0.0 → slothquery-1.0.2/backend/slothquery.egg-info}/PKG-INFO +1 -1
  17. {slothquery-1.0.0 → slothquery-1.0.2}/backend/slothquery.egg-info/SOURCES.txt +10 -0
  18. {slothquery-1.0.0 → slothquery-1.0.2}/setup.py +35 -31
  19. {slothquery-1.0.0 → slothquery-1.0.2}/backend/app/database.py +0 -0
  20. {slothquery-1.0.0 → slothquery-1.0.2}/backend/app/dist/assets/index-BDTPNUTQ.css +0 -0
  21. {slothquery-1.0.0 → slothquery-1.0.2}/backend/app/dist/assets/index-DKvMVJoY.js +0 -0
  22. {slothquery-1.0.0 → slothquery-1.0.2}/backend/app/dist/assets/logo-RBZv3XvP.png +0 -0
  23. {slothquery-1.0.0 → slothquery-1.0.2}/backend/app/dist/index.html +0 -0
  24. {slothquery-1.0.0 → slothquery-1.0.2}/backend/app/main.py +0 -0
  25. {slothquery-1.0.0 → slothquery-1.0.2}/backend/app/models.py +0 -0
  26. {slothquery-1.0.0 → slothquery-1.0.2}/backend/app/schemas.py +0 -0
  27. {slothquery-1.0.0 → slothquery-1.0.2}/backend/slothquery.egg-info/dependency_links.txt +0 -0
  28. {slothquery-1.0.0 → slothquery-1.0.2}/backend/slothquery.egg-info/entry_points.txt +0 -0
  29. {slothquery-1.0.0 → slothquery-1.0.2}/backend/slothquery.egg-info/requires.txt +0 -0
  30. {slothquery-1.0.0 → slothquery-1.0.2}/backend/slothquery.egg-info/top_level.txt +0 -0
  31. {slothquery-1.0.0 → slothquery-1.0.2}/setup.cfg +0 -0
@@ -1 +1 @@
1
- recursive-include backend/app/dist *
1
+ recursive-include backend/app/dist *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: slothquery
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Local-first organizational intelligence platform
5
5
  Author: Ayush Thakur
6
6
  Author-email: ayush01thakur@gmail.com
@@ -1,229 +1,235 @@
1
- <div align="center">
2
-
3
- # SlothQuery
4
-
5
- **Local-first organizational intelligence platform for SQL engineers and data analysts.**
6
-
7
- SlothQuery transforms your raw SQL queries, business rules, table schemas, and analyst notes into a searchable, AI-powered knowledge base — so your team never has to rediscover the same logic twice.
8
-
9
- [![Python](https://img.shields.io/badge/Python-3.10+-3776AB?style=flat&logo=python&logoColor=white)](https://python.org)
10
- [![FastAPI](https://img.shields.io/badge/FastAPI-0.110+-009688?style=flat&logo=fastapi&logoColor=white)](https://fastapi.tiangolo.com)
11
- [![React](https://img.shields.io/badge/React-18+-61DAFB?style=flat&logo=react&logoColor=black)](https://react.dev)
12
- [![TypeScript](https://img.shields.io/badge/TypeScript-5+-3178C6?style=flat&logo=typescript&logoColor=white)](https://typescriptlang.org)
13
- [![SQLite](https://img.shields.io/badge/SQLite-Local--First-003B57?style=flat&logo=sqlite&logoColor=white)](https://sqlite.org)
14
-
15
- </div>
16
-
17
- ---
18
-
19
- ## What is SlothQuery?
20
-
21
- SlothQuery is a **local-first** knowledge retrieval system for data teams. Instead of storing queries in a flat file or Notion doc, SlothQuery extracts structured intelligence from each query — business intent, schema entities, business rules, transformations — and makes all of it searchable and retrievable at chat time.
22
-
23
- Think of it as **institutional memory for your SQL stack**, powered by an LLM that only ever answers from your own grounded knowledge — never from hallucinated context.
24
-
25
- ---
26
-
27
- ## Tech Stack
28
-
29
- | Layer | Technologies |
30
- |---|---|
31
- | **Backend** | Python · FastAPI · SQLAlchemy · SQLite · ChromaDB · LiteLLM |
32
- | **Frontend** | React · TypeScript · Vite · Tailwind CSS · Axios · Lucide Icons |
33
- | **AI / Retrieval** | BGE-small-en-v1.5 (local embeddings) · LiteLLM (multi-provider LLM) · ChromaDB (vector search) |
34
-
35
- ---
36
-
37
- ## Features
38
-
39
- ### Knowledge Studio
40
- - Add SQL queries with title, description, dialect, tags, and analyst comments
41
- - Human-in-the-loop AI extraction — review and approve extracted business intent, schema entities, business rules, metric transformations, and ambiguities before saving
42
- - Organize knowledge into domain Vaults (e.g. Marketing, Finance, Product)
43
- - Business Rules Playbooks — consolidated business logic documentation
44
- - Table Schema documentation with join patterns and naming conventions
45
- - Analyst Notes — freeform knowledge about metrics, caveats, and patterns
46
- - Delete queries (with ChromaDB sync) and delete entire vaults (full cascade)
47
-
48
- ### Chat Interface
49
- - Grounded AI chat — every answer is retrieved from your knowledge base; the LLM never invents tables or metrics
50
- - Multi-vault context — query across multiple vaults in a single conversation
51
- - Dialect-aware SQL generation — Snowflake, BigQuery, PostgreSQL, Trino, Redshift
52
- - Tag filtering — narrow retrieval to specific topic tags
53
- - Markdown-rendered responses with bold, italic, lists, and SQL code blocks with one-click copy
54
- - Auto-named persistent chat history
55
- - Onboarding guard — if your knowledge base is empty, SlothQuery guides you to add content first
56
-
57
- ### LLM Provider Management
58
- - Supports OpenAI, Anthropic, Google Gemini, Groq, OpenRouter, DeepSeek
59
- - API keys are encrypted with Fernet symmetric encryption before being written to SQLite — never logged or exposed to the frontend
60
- - Test Connection before saving
61
- - Dynamic provider switching without restarting the app
62
- - Last active provider automatically restored on restart
63
-
64
- ### Knowledge Portability
65
- - Export your entire knowledge base or individual vaults as a `.slothkb` archive
66
- - Import and automatically re-index embeddings
67
- - Re-index — rebuild the entire ChromaDB vector store from SQLite at any time
68
-
69
- ---
70
-
71
- ## Architecture
72
-
73
- ```
74
- UI (React)
75
-
76
- API (FastAPI)
77
-
78
- Services (chat · extraction · retrieval · provider · vector_store)
79
-
80
- Repositories (SQLAlchemy)
81
-
82
- Storage (SQLite + ChromaDB)
83
- ```
84
-
85
- - **Local-first** — all data lives in `~/Documents/SlothQuery/` on your machine
86
- - **SQLite** is the source of truth for all structured data
87
- - **ChromaDB** is derived state — always rebuildable from SQLite via Re-index
88
- - **No cloud dependency** — works fully offline once the embedding model is cached
89
-
90
- ---
91
-
92
- ## Getting Started
93
-
94
- ### Prerequisites
95
- - Python 3.10+
96
- - Node.js 18+
97
- - An API key from any supported LLM provider
98
-
99
- ### 1. Clone the repository
100
-
101
- ```bash
102
- git clone https://github.com/your-username/slothquery.git
103
- cd slothquery
104
- ```
105
-
106
- ### 2. Set up the Backend
107
-
108
- ```bash
109
- cd backend
110
-
111
- # Create and activate a virtual environment
112
- python -m venv venv
113
-
114
- # Windows
115
- .\venv\Scripts\activate
116
-
117
- # macOS / Linux
118
- source venv/bin/activate
119
-
120
- # Install dependencies
121
- pip install -r requirements.txt
122
-
123
- # Start the backend server
124
- uvicorn app.main:app --reload --port 8000
125
- ```
126
-
127
- > First run downloads the BGE-small-en-v1.5 embedding model (~130MB). Subsequent starts are fast.
128
-
129
- API available at: `http://127.0.0.1:8000`
130
- Interactive docs: `http://127.0.0.1:8000/docs`
131
-
132
- ### 3. Set up the Frontend
133
-
134
- ```bash
135
- cd frontend
136
- npm install
137
- npm run dev
138
- ```
139
-
140
- App available at: `http://localhost:3000`
141
-
142
- ---
143
-
144
- ## How to Use SlothQuery
145
-
146
- ### Step 1 Configure an LLM Provider
147
- 1. Open `http://localhost:3000`
148
- 2. Click the **Settings** icon or click **Configure** on the amber banner
149
- 3. Select your provider, enter model name and API key
150
- 4. Click **Test & Save** — your key is encrypted and stored locally
151
-
152
- ### Step 2Build Your Knowledge Base
153
-
154
- Go to **Knowledge Studio** in the left sidebar.
155
-
156
- **Adding a Query:**
157
- 1. Click `+ Add Asset → Add Query`
158
- 2. Fill in title, vault, dialect, description, and tags
159
- 3. Paste your SQL and analyst comments
160
- 4. Click **Generate & Review Intelligence** AI extracts context
161
- 5. Review the draft, edit anything incorrect, then **Approve & Save**
162
-
163
- **Adding Playbooks, Schemas, Notes:**
164
- 1. Click `+ Add Asset` and choose the asset type
165
- 2. Name it, select a vault, write the content, and save
166
-
167
- ### Step 3 Chat
168
-
169
- 1. Go to the **Chat** view
170
- 2. Ask questions or request SQL e.g.:
171
- - *"Show me the ARR calculation query"*
172
- - *"Write a Snowflake query for weekly active users"*
173
- - *"What business rules apply to revenue metrics?"*
174
- 3. SlothQuery retrieves matching context and generates a grounded response
175
- 4. SQL appears in a code block with a **Copy** button
176
-
177
- > Tip: Use the **+** button in the chat input to filter by vault or tags.
178
-
179
- ---
180
-
181
- ## Data Storage
182
-
183
- All data is stored locally at:
184
-
185
- ```
186
- ~/Documents/SlothQuery/
187
- ├── slothquery.db # SQLite — queries, chats, providers (encrypted keys)
188
- ├── chroma_db/ # ChromaDB — vector embeddings (rebuildable)
189
- └── Exports/ # .slothkb export archives
190
- ```
191
-
192
- > The SQLite database contains encrypted API keys. Never commit it to version control — it is excluded by `.gitignore`.
193
-
194
- ---
195
-
196
- ## Keyboard Shortcuts
197
-
198
- | Action | Shortcut |
199
- |---|---|
200
- | Send chat message | `Enter` |
201
- | New line in input | `Shift + Enter` |
202
-
203
- ---
204
-
205
- ## Roadmap
206
-
207
- - [ ] Schema Explorer with live table preview
208
- - [ ] Query versioning and diff view
209
- - [ ] Team shared knowledge base sync
210
- - [ ] Slack / Teams bot integration
211
- - [ ] Desktop wrapper (Tauri)
212
- - [ ] MCP server support for AI coding agents
213
-
214
- ---
215
-
216
- ## Contributing
217
-
218
- Branch naming:
219
- ```
220
- feat/add-schema-versioning
221
- fix/resolve-chromadb-sync
222
- refactor/move-embedding-service
223
- ```
224
-
225
- ---
226
-
227
- ## License
228
-
1
+ <div align="center">
2
+
3
+ # SlothQuery v1.0
4
+
5
+ **Local-first organizational intelligence platform for SQL engineers and data analysts.**
6
+
7
+ SlothQuery transforms your raw SQL queries, business rules, table schemas, and analyst notes into a searchable, AI-powered knowledge base — so your team never has to rediscover the same logic twice.
8
+
9
+ [![Python](https://img.shields.io/badge/Python-3.10+-3776AB?style=flat&logo=python&logoColor=white)](https://python.org)
10
+ [![FastAPI](https://img.shields.io/badge/FastAPI-0.110+-009688?style=flat&logo=fastapi&logoColor=white)](https://fastapi.tiangolo.com)
11
+ [![React](https://img.shields.io/badge/React-18+-61DAFB?style=flat&logo=react&logoColor=black)](https://react.dev)
12
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5+-3178C6?style=flat&logo=typescript&logoColor=white)](https://typescriptlang.org)
13
+ [![SQLite](https://img.shields.io/badge/SQLite-Local--First-003B57?style=flat&logo=sqlite&logoColor=white)](https://sqlite.org)
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## What is SlothQuery?
20
+
21
+ SlothQuery is a **local-first** knowledge retrieval system for data teams. Instead of storing queries in a flat file or Notion doc, SlothQuery extracts structured intelligence from each query — business intent, schema entities, business rules, transformations — and makes all of it searchable and retrievable at chat time.
22
+
23
+ Think of it as **institutional memory for your SQL stack**, powered by an LLM that only ever answers from your own grounded knowledge — never from hallucinated context.
24
+
25
+ ---
26
+
27
+ ## Tech Stack
28
+
29
+ | Layer | Technologies |
30
+ |---|---|
31
+ | **Backend** | Python · FastAPI · SQLAlchemy · SQLite · ChromaDB · LiteLLM |
32
+ | **Frontend** | React · TypeScript · Vite · Tailwind CSS · Axios · Lucide Icons |
33
+ | **AI / Retrieval** | BGE-small-en-v1.5 (local embeddings) · LiteLLM (multi-provider LLM) · ChromaDB (vector search) |
34
+
35
+ ---
36
+
37
+ ## Features
38
+
39
+ ### Knowledge Studio
40
+ - Add SQL queries with title, description, dialect, tags, and analyst comments
41
+ - Human-in-the-loop AI extraction — review and approve extracted business intent, schema entities, business rules, metric transformations, and ambiguities before saving
42
+ - Organize knowledge into domain Vaults (e.g. Marketing, Finance, Product)
43
+ - Business Rules Playbooks — consolidated business logic documentation
44
+ - Table Schema documentation with join patterns and naming conventions
45
+ - Analyst Notes — freeform knowledge about metrics, caveats, and patterns
46
+ - Delete queries (with ChromaDB sync) and delete entire vaults (full cascade)
47
+
48
+ ### Chat Interface
49
+ - Grounded AI chat — every answer is retrieved from your knowledge base; the LLM never invents tables or metrics
50
+ - Multi-vault context — query across multiple vaults in a single conversation
51
+ - Dialect-aware SQL generation — Snowflake, BigQuery, PostgreSQL, Trino, Redshift
52
+ - Tag filtering — narrow retrieval to specific topic tags
53
+ - Markdown-rendered responses with bold, italic, lists, and SQL code blocks with one-click copy
54
+ - Auto-named persistent chat history
55
+ - Onboarding guard — if your knowledge base is empty, SlothQuery guides you to add content first
56
+
57
+ ### LLM Provider Management
58
+ - Supports OpenAI, Anthropic, Google Gemini, Groq, OpenRouter, DeepSeek
59
+ - API keys are encrypted with Fernet symmetric encryption before being written to SQLite — never logged or exposed to the frontend
60
+ - Test Connection before saving
61
+ - Dynamic provider switching without restarting the app
62
+ - Last active provider automatically restored on restart
63
+
64
+ ### Knowledge Portability
65
+ - Export your entire knowledge base or individual vaults as a `.slothkb` archive
66
+ - Import and automatically re-index embeddings
67
+ - Re-index — rebuild the entire ChromaDB vector store from SQLite at any time
68
+
69
+ ---
70
+
71
+ ## Architecture
72
+
73
+ ```
74
+ UI (React)
75
+
76
+ API (FastAPI)
77
+
78
+ Services (chat · extraction · retrieval · provider · vector_store)
79
+
80
+ Repositories (SQLAlchemy)
81
+
82
+ Storage (SQLite + ChromaDB)
83
+ ```
84
+
85
+ - **Local-first** — all data lives in `~/Documents/SlothQuery/` on your machine
86
+ - **SQLite** is the source of truth for all structured data
87
+ - **ChromaDB** is derived state — always rebuildable from SQLite via Re-index
88
+ - **No cloud dependency** — works fully offline once the embedding model is cached
89
+
90
+ ---
91
+
92
+ ## Getting Started
93
+
94
+ ### Option 1: Quick Install (Recommended)
95
+ You can install and run SlothQuery directly from PyPI as a global CLI tool. No cloning or Node.js compilation required:
96
+
97
+ ```bash
98
+ # Install the package
99
+ pip install slothquery
100
+
101
+ # Start the application from any directory
102
+ slothquery
103
+ ```
104
+ *This starts the local FastAPI server and automatically opens your default web browser to the dashboard at `http://127.0.0.1:8000`.*
105
+
106
+ ---
107
+
108
+ ### Option 2: Local Developer Setup (Clone & Run)
109
+ If you want to modify the source code, run integration tests, or contribute to the frontend layout:
110
+
111
+ #### 1. Clone the repository
112
+ ```bash
113
+ git clone https://github.com/ayush01thakur/slothquery.git
114
+ cd slothquery
115
+ ```
116
+
117
+ #### 2. Set up the Backend
118
+ ```bash
119
+ cd backend
120
+
121
+ # Create and activate a virtual environment
122
+ python -m venv venv
123
+
124
+ # Windows
125
+ .\venv\Scripts\activate
126
+
127
+ # macOS / Linux
128
+ source venv/bin/activate
129
+
130
+ # Install dependencies
131
+ pip install -r requirements.txt
132
+
133
+ # Start the backend server
134
+ uvicorn app.main:app --reload --port 8000
135
+ ```
136
+ > Note: First run automatically downloads the local BGE-small-en-v1.5 embedding model weights (~130MB).
137
+
138
+ API documentation is interactive at: `http://127.0.0.1:8000/docs`
139
+
140
+ #### 3. Set up the Frontend
141
+ ```bash
142
+ cd ../frontend
143
+ npm install
144
+ npm run dev
145
+ ```
146
+ App developer server available at: `http://localhost:3000`
147
+
148
+ ---
149
+
150
+ ## How to Use SlothQuery
151
+
152
+ ### Step 1Configure an LLM Provider
153
+ 1. Open `http://localhost:3000`
154
+ 2. Click the **Settings** icon or click **Configure** on the amber banner
155
+ 3. Select your provider, enter model name and API key
156
+ 4. Click **Test & Save** — your key is encrypted and stored locally
157
+
158
+ ### Step 2 Build Your Knowledge Base
159
+
160
+ Go to **Knowledge Studio** in the left sidebar.
161
+
162
+ **Adding a Query:**
163
+ 1. Click `+ Add Asset → Add Query`
164
+ 2. Fill in title, vault, dialect, description, and tags
165
+ 3. Paste your SQL and analyst comments
166
+ 4. Click **Generate & Review Intelligence** — AI extracts context
167
+ 5. Review the draft, edit anything incorrect, then **Approve & Save**
168
+
169
+ **Adding Playbooks, Schemas, Notes:**
170
+ 1. Click `+ Add Asset` and choose the asset type
171
+ 2. Name it, select a vault, write the content, and save
172
+
173
+ ### Step 3 Chat
174
+
175
+ 1. Go to the **Chat** view
176
+ 2. Ask questions or request SQL — e.g.:
177
+ - *"Show me the ARR calculation query"*
178
+ - *"Write a Snowflake query for weekly active users"*
179
+ - *"What business rules apply to revenue metrics?"*
180
+ 3. SlothQuery retrieves matching context and generates a grounded response
181
+ 4. SQL appears in a code block with a **Copy** button
182
+
183
+ > Tip: Use the **+** button in the chat input to filter by vault or tags.
184
+
185
+ ---
186
+
187
+ ## Data Storage
188
+
189
+ All data is stored locally at:
190
+
191
+ ```
192
+ ~/Documents/SlothQuery/
193
+ ├── slothquery.db # SQLite — queries, chats, providers (encrypted keys)
194
+ ├── chroma_db/ # ChromaDB — vector embeddings (rebuildable)
195
+ └── Exports/ # .slothkb export archives
196
+ ```
197
+
198
+ > The SQLite database contains encrypted API keys. Never commit it to version control — it is excluded by `.gitignore`.
199
+
200
+ ---
201
+
202
+ ## Keyboard Shortcuts
203
+
204
+ | Action | Shortcut |
205
+ |---|---|
206
+ | Send chat message | `Enter` |
207
+ | New line in input | `Shift + Enter` |
208
+
209
+ ---
210
+
211
+ ## Roadmap
212
+
213
+ - [ ] Schema Explorer with live table preview
214
+ - [ ] Query versioning and diff view
215
+ - [ ] Team shared knowledge base sync
216
+ - [ ] Slack / Teams bot integration
217
+ - [ ] Desktop wrapper (Tauri)
218
+ - [ ] MCP server support for AI coding agents
219
+
220
+ ---
221
+
222
+ ## Contributing
223
+
224
+ Branch naming:
225
+ ```
226
+ feat/add-schema-versioning
227
+ fix/resolve-chromadb-sync
228
+ refactor/move-embedding-service
229
+ ```
230
+
231
+ ---
232
+
233
+ ## License
234
+
229
235
  MIT — use freely, build on top, keep it local-first.
@@ -1 +1 @@
1
- # SlothQuery app package
1
+ # SlothQuery app package
@@ -1,26 +1,26 @@
1
- import uvicorn
2
- import webbrowser
3
- import threading
4
- import time
5
- from .main import app
6
-
7
- def open_browser():
8
- # Wait 1.5 seconds for uvicorn to initialize completely
9
- time.sleep(1.5)
10
- print("[*] Opening SlothQuery in default browser...")
11
- webbrowser.open("http://127.0.0.1:8000")
12
-
13
- def main():
14
- print("===================================================")
15
- print(" SlothQuery Local Launch ")
16
- print("===================================================")
17
- print("[*] Initializing local database and indexing vector store...")
18
-
19
- # Start browser redirect in background thread
20
- threading.Thread(target=open_browser, daemon=True).start()
21
-
22
- # Launch uvicorn directly with the FastAPI app instance
23
- uvicorn.run(app, host="127.0.0.1", port=8000, log_level="info")
24
-
25
- if __name__ == "__main__":
26
- main()
1
+ import uvicorn
2
+ import webbrowser
3
+ import threading
4
+ import time
5
+ from .main import app
6
+
7
+ def open_browser():
8
+ # Wait 1.5 seconds for uvicorn to initialize completely
9
+ time.sleep(1.5)
10
+ print("[*] Opening SlothQuery in default browser...")
11
+ webbrowser.open("http://127.0.0.1:8000")
12
+
13
+ def main():
14
+ print("===================================================")
15
+ print(" SlothQuery Local Launch ")
16
+ print("===================================================")
17
+ print("[*] Initializing local database and indexing vector store...")
18
+
19
+ # Start browser redirect in background thread
20
+ threading.Thread(target=open_browser, daemon=True).start()
21
+
22
+ # Launch uvicorn directly with the FastAPI app instance
23
+ uvicorn.run(app, host="127.0.0.1", port=8000, log_level="info")
24
+
25
+ if __name__ == "__main__":
26
+ main()
@@ -0,0 +1 @@
1
+ # SlothQuery routers package