🔍 GL Smart Search SDK 🐍
Python SDK for GL Smart Search v2: web search and connector integrations (GitHub, Google Drive, Gmail, Google Calendar).
v1 clients (
search,deep_research, authentication email modules) are not included in this package. Use the legacysmart-search-sdkPyPI artifact if you still depend on v1.
Requirements
- Python 3.11+ (tested on 3.11–3.13)
Installation
pip install gl-smart-search-sdk
GDP Labs internal registry:
pip install gl-smart-search-sdk --index-url https://glsdk.gdplabs.id/gen-ai-internal/simple/
Quick start — Web Search
import asyncio
import os
from gl_smart_search_sdk.web.client import WebSearchClient
from gl_smart_search_sdk.web.models import GetWebSearchResultsRequest
async def main() -> None:
client = WebSearchClient(base_url=os.environ["GL_SMARTSEARCH_BASE_URL"])
await client.authenticate(token=os.environ["GL_SMARTSEARCH_TOKEN"])
request = GetWebSearchResultsRequest(
query="What is retrieval-augmented generation?",
result_type="snippets",
size=5,
)
response = await client.search_web(request)
print(response)
asyncio.run(main())
Quick start — Connectors
import asyncio
import os
from gl_smart_search_sdk.connector.client import ConnectorClient
from gl_smart_search_sdk.connector.models import AppName, ConnectorRequest
async def main() -> None:
client = ConnectorClient(base_url=os.environ["GL_SMARTSEARCH_BASE_URL"])
await client.authenticate(token=os.environ["GL_SMARTSEARCH_TOKEN"])
request = ConnectorRequest(query="meetings next week")
response = await client.search_connector(
app_name=AppName.GOOGLE_CALENDAR,
gl_token=os.environ["GL_CONNECTORS_USER_TOKEN"],
request=request,
)
print(response)
asyncio.run(main())
Environment variables
| Variable | Required | Description |
|---|---|---|
GL_SMARTSEARCH_BASE_URL |
Yes | API base URL |
GL_SMARTSEARCH_TOKEN |
Yes* | Bearer token for API calls |
GL_SMARTSEARCH_USER_IDENTIFIER |
CLI | User id (CLI / credential flows) |
GL_SMARTSEARCH_USER_SECRET |
CLI | User secret (CLI / credential flows) |
GL_CONNECTORS_USER_TOKEN |
Connectors | GL Connectors user token |
GL_CONNECTORS_DEFAULT_CALLBACK_URL |
Connectors | OAuth callback URL (optional) |
* Required for SDK clients unless passed explicitly to authenticate().
Load variables with python-dotenv or your platform’s secret manager before creating clients.
CLI
The package includes the gl-smart-search CLI (web and connector subcommands).
poetry run gl-smart-search --help
poetry run gl-smart-search status
See gl_smart_search_sdk/cli/README.md for full command reference.
Examples
Non-interactive scripts live in the repository under python/examples/:
web_search.py— web search, URLs, fetch, snippets, keypointsconnector_search.py— connector search and management
API overview (v2)
WebSearchClient
search_web— search with snippets, keypoints, or summarysearch_web_urls— return relevant URLssearch_web_map— site map for a base URLfetch_web_page— fetch page contentget_web_page_snippets— snippets from a URLget_web_page_keypoints— key points from a URL
ConnectorClient
search_connector— search a connected appconnect_connector— start connector OAuth flowdisconnect_connector— remove connector integration
All clients extend BaseGLSmartSearchClient (authentication, HTTP, streaming helpers).
Documentation
- GL Smart Search Gitbook
- HTTP API docs
- Repository root README and CHANGELOG
Development
cd python/gl-smart-search-sdk
poetry install
poetry run pytest
poetry run gl-smart-search --version
Metadata
Release files for gl-smart-search-sdk 0.0.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gl_smart_search_sdk-0.0.15-py3-none-any.whl | Python 3 | none | any | Details for gl_smart_search_sdk-0.0.15-py3-none-any.whl |
Release files / gl_smart_search_sdk-0.0.15-py3-none-any.whl
| Download URL | gl_smart_search_sdk-0.0.15-py3-none-any.whl |
|---|---|
| Size | 50.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0dde9e8ef831f1edc8594cbbbcdf23ae7e39279ae3454294a828a09047b3d9a
|
|
BLAKE2b-256 checksum How to use checksums |
cb2b20c24c0f0fcb69aa9e0f99a5984a5258e92515b7d25ca56ec251bdc009d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
poetry/2.1.1 CPython/3.12.0 Linux/5.10.0-32-cloud-amd64
|
Security for gl-smart-search-sdk 0.0.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.