glean-api-client
Python Client SDK Generated by Speakeasy.
Decision gist · record as of 2026-08-14
Yes, if you are already using Glean and need Python integration. The package is actively maintained, has low install friction, and provides a well-typed interface to both major Glean API namespaces. However, verify the license terms first—the package metadata does not declare a license, which is a notable gap for production adoption. No known vulnerabilities are recorded.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- A valid Glean API token and server URL must be provided; different token types are required for Client vs.
- Indexing API namespaces.
License · maintenance · safety
(unclear) — License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before adopting this package in proprietary or copyleft-sensitive projects.
last release 2026-08-07 (7 days) · last repo commit 2026-08-14 · 20 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 105,405 downloads/mo, #12,702 on PyPI
Alternatives
Verify before relying
from glean.api_client import Glean, models
import os
with Glean(api_token=os.getenv("GLEAN_API_TOKEN", "")) as glean:
res = glean.client.chat.create(messages=[
{"fragments": [models.ChatMessageFragment(text="query")]}
])
print(res)- Whether the package is open-source or proprietary, and under what license terms it is distributed.
- Whether the Glean service itself (backend) is self-hosted, SaaS-only, or both.
- Rate limits, retry behavior, and timeout defaults beyond what the description mentions.
What it is and what it does
glean-api-client is a Python SDK generated by Speakeasy that wraps Glean's REST API, offering type-safe access to both the Client API (for search and retrieval) and the Indexing API (for content and permission management). It is built on httpx for HTTP transport and pydantic for request/response validation, and supports both blocking and async workflows via the same client instance.
Developers use it to integrate Glean search and indexing into Python applications without manually constructing HTTP requests. The SDK includes full type hints for all parameters and responses, making it suitable for IDEs with Pydantic support (especially PyCharm with the Pydantic plugin). It handles authentication via API tokens, supports streaming responses, and provides retry and error-handling mechanisms.
Use it for
- Build a Python web app that searches Glean content and displays results to end users via the Client API.
- Index documents and manage permissions in Glean programmatically from a Python backend service.
- Stream chat or search responses asynchronously in a FastAPI or async Python application.
- Automate bulk document indexing or permission updates using the Indexing API in a scheduled job.
- Integrate Glean search into a Python CLI tool or data pipeline for internal knowledge retrieval.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are already using Glean and need Python integration.
The package is actively maintained, has low install friction, and provides a well-typed interface to both major Glean API namespaces. However, verify the license terms first—the package metadata does not declare a license, which is a notable gap for production adoption. No known vulnerabilities are recorded.
Install
glean-api-client on PyPI
Before you install
Low friction installation via pip or poetry. The package is actively maintained with a recent release (7 days old) and depends on three well-established libraries: httpx, httpcore, and pydantic. Supports Python 3.10 through 3.14.
Requires Python 3.10 or later. A valid Glean API token and server URL must be provided; different token types are required for Client vs. Indexing API namespaces.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before adopting this package in proprietary or copyleft-sensitive projects.
Quickstart
from glean.api_client import Glean, models
import os
with Glean(api_token=os.getenv("GLEAN_API_TOKEN", "")) as glean:
res = glean.client.chat.create(messages=[
{"fragments": [models.ChatMessageFragment(text="query")]}
])
print(res)
Verify before relying
- Whether the package is open-source or proprietary, and under what license terms it is distributed.
- Whether the Glean service itself (backend) is self-hosted, SaaS-only, or both.
- Rate limits, retry behavior, and timeout defaults beyond what the description mentions.
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packageshttpcorehttpxpydantic |
| Maintenance | Actively maintained 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 105,405 / month, #12,702 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: glean_api_client-0.15.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “glean api client python”
- glean-api-clientA Python SDK for accessing Glean's REST API, providing type-hinted…
- glean-parserParses and validates Glean telemetry configuration files…
- glean-sdkGlean SDK is Mozilla's telemetry collection library that lets…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also glean-sdk · cloudflare · typesense · prelude-python-sdk · linkup-sdk · algoliasearch · glean-parser · orq-ai-sdk · openrouter · dt