Glean offers several Software Development Kits (SDKs) to help developers integrate Glean’s powerful search and knowledge capabilities into their applications. These SDKs provide language-specific interfaces to Glean’s APIs, making it easier to build custom solutions without having to handle the low-level HTTP requests.

This page provides information about our official SDKs and instructions for generating custom SDKs for your preferred programming language.

Indexing API

The Glean Python SDK provides a simple interface to the Glean Indexing API. This is a convenient way to index documents into Glean from your Python application.

1

Install the indexing API python sdk locally

pip install https://app.glean.com/meta/indexing_api_client.zip
2

Set up the API client

import glean_indexing_api_client as indexing_api
# Configure host and Bearer authorization: BearerAuth
configuration = indexing_api.Configuration(
  host="http://customer-be.glean.com/api/index/v1", access_token="<YOUR_API_TOKEN>"
)
api_client = indexing_api.ApiClient(configuration)

Generating SDK

Glean SDKs can be generated for most popular languages (Python, Java, NodeJS, etc) using openapi-generator-cli.

1

Install openapi-generator-cli

shell
npm install -g @openapitools/openapi-generator-cli
2

List available languages

shell
npx @openapitools/openapi-generator-cli@latest list
3

Generate SDK

npx @openapitools/openapi-generator-cli generate -g go -i "https://api.redocly.com/registry/bundle/glean/Glean%20Client%20API%20SDK%20source/v1/openapi.yaml?branch=main"