Skip to main content

Software Development Kit to interact with Globant Enterprise AI.

Project description

PyGEAI - SDK for Globant Enterprise AI

PyGEAI is a Software Development Kit (SDK) for interacting with Globant Enterprise AI. It comprises libraries, tools, code samples, and documentation to simplify your experience with the platform.

Terms and conditions

By using the Python SDK to interact with Globant Enterprise AI, you agree with the following Terms and Conditions:

Terms and Conditions

Compatibility

This package is compatible with the Globant Enterprise AI release from January 2026.

Configuration

The SDK supports two authentication methods: API Key authentication and OAuth 2.0 authentication.

API Key Authentication

Before using the SDK with API Key authentication, you need to define GEAI_API_KEY and GEAI_API_BASE_URL. You can achieve this in three ways:

  • Environment variables: Set GEAI_API_KEY and GEAI_API_BASE_URL as environment variables in your operating system.
  • Credentials file: Create a file named credentials in the .geai directory within your user home directory ($USER_HOME/.geai/credentials) and define GEAI_API_KEY and GEAI_API_BASE_URL within this file.
  • Client instantiation: Specify the api_key and base_url parameters directly when creating an instance of a client class.

OAuth 2.0 Authentication

For OAuth 2.0 authentication, you need to define:

  • GEAI_OAUTH_ACCESS_TOKEN - Your OAuth 2.0 access token
  • GEAI_PROJECT_ID - Your project ID (required with OAuth)
  • GEAI_API_BASE_URL - Base URL for the API
  • GEAI_ORGANIZATION_ID - (Optional) Your organization ID

These can be configured via environment variables, credentials file, or client instantiation.

Note: If you plan to use the Evaluation Module, you must also define GEAI_API_EVAL_URL

Credentials file

The credentials file is organized via profiles (aliases), so one can interact with different instances of Globant Enterprise AI by just referencing which profile one wishes to use. This also applies to different levels of permissions.

The structure of the credentials file is as follows:

API Key Authentication:

[default]
geai_api_key = <API_TOKEN>
geai_api_base_url = <GEAI_BASE_URL>
geai_api_eval_url = <GEAI_EVALUATION_MODULE_URL>

[production]
geai_api_key = <API_TOKEN>
geai_api_base_url = <GEAI_BASE_URL>

OAuth 2.0 Authentication:

[oauth-profile]
geai_oauth_access_token = <OAUTH_ACCESS_TOKEN>
geai_project_id = <PROJECT_ID>
geai_api_base_url = <GEAI_BASE_URL>
geai_organization_id = <ORGANIZATION_ID>  # Optional

After setting the profiles, one can use them with the --alias option, for example:

geai --alias test llm list-providers

Modules

The SDK consists of several modules, all accessible through a single package pygeai:

Usage

Install PyGEAI

Use pip to install the package from PyPI:

(venv) ~$ pip install pygeai

To install pre-release versions, you can run:

(venv) ~$ pip install --pre pygeai

Verify installation

To check the installed PyGEAI version, run:

(venv) ~$ geai v

View help

To access the general help menu:

(venv) ~$ geai h

To view help for a specific command:

(venv) ~$ geai <command> h

Debugger

The pygeai-dbg package provides a command-line debugger (geai-dbg) for troubleshooting and inspecting the geai CLI. It pauses execution at breakpoints, allowing you to inspect variables, execute Python code, and control program flow interactively.

To debug a geai command, replace geai with geai-dbg. For example:

(venv) ~$ geai-dbg ail lrs

This pauses at the main function in pygeai.cli.geai, displaying an interactive prompt (geai-dbg). You can then use commands like continue (resume), run (run without pauses), quit (exit), or help (list commands).

Man Pages Documentation

The package includes Unix manual pages (man pages) for detailed command-line documentation.

To install man pages locally:

geai-install-man

To install man pages system-wide:

sudo geai-install-man --system

To access the man pages:

man geai

Setting up Man Pages Access

If you're using a virtual environment, you'll need to configure your system to find the man pages. Add the following to your shell configuration file (.bashrc, .zshrc, etc.):

# For macOS
if [ -n "$VIRTUAL_ENV" ]; then
    export MANPATH="$VIRTUAL_ENV/share/man:$MANPATH"
fi

# For Linux
if [ -n "$VIRTUAL_ENV" ]; then
    export MANPATH="$VIRTUAL_ENV/man:$MANPATH"
fi

After adding this configuration:

  1. Reload your shell configuration: source ~/.bashrc or source ~/.zshrc
  2. The man pages will be available when your virtual environment is active

Bugs and suggestions

To report any bug, request features or make any suggestions, the following email is available:

geai-sdk@globant.com

Authors

Copyright 2025, Globant. All rights reserved

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygeai-0.7.0b6.tar.gz (688.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygeai-0.7.0b6-py3-none-any.whl (779.5 kB view details)

Uploaded Python 3

File details

Details for the file pygeai-0.7.0b6.tar.gz.

File metadata

  • Download URL: pygeai-0.7.0b6.tar.gz
  • Upload date:
  • Size: 688.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pygeai-0.7.0b6.tar.gz
Algorithm Hash digest
SHA256 ab17c9d7e23884673b6891b7c328fdc1fa151e4e17351e3e7dfd054b05e638b3
MD5 e1ebc5aa49d045d8875929dc69d36a6e
BLAKE2b-256 6285e13c610a41f28ab65e2fd1fffa5e80f6b0bc4bcea68ada5dde14a2399aec

See more details on using hashes here.

File details

Details for the file pygeai-0.7.0b6-py3-none-any.whl.

File metadata

  • Download URL: pygeai-0.7.0b6-py3-none-any.whl
  • Upload date:
  • Size: 779.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pygeai-0.7.0b6-py3-none-any.whl
Algorithm Hash digest
SHA256 06d1ef608f7cc3eee914259b2ac446aa125689699766d2e0a3024b6f6f5acc73
MD5 391226210c675070d4138195e9bba491
BLAKE2b-256 1c4c34dada5de62c787acc177c2822ee099b818c35ee0f18d0fbd1b1be9cd420

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page