GitHub

Installation

Install the Functor SDK and get started building intelligent applications with DRIP/KG-RAG in minutes.

Requirements

  • Python 3.9 or higher
  • pip or uv package manager

Install from PyPI

The recommended way to install Functor SDK is via pip or uv:

# Using pip
pip install functor-sdk
# Using uv (faster)
uv pip install functor-sdk

Install from Source

For development or the latest features, install from source:

# Clone the repository
git clone https://github.com/functor-ai/functor-sdk.git
cd functor-sdk
# Install in development mode
pip install -e .
# Or with development dependencies
pip install -e ".[dev]"

Verify Installation

Verify that the SDK is installed correctly:

from functor_sdk import FunctorClient
print("Functor SDK installed successfully!")

Installation Complete

If the import works without errors, you're ready to go!

Dependencies

The SDK automatically installs the following dependencies:

  • httpx - Modern async HTTP client
  • pydantic - Data validation and settings management
  • python-dotenv - Environment variable management
  • nest-asyncio - Nested event loop support

Configuration

Set up your environment variables for easier development:

.env
# API Configuration
FUNCTOR_API_KEY=your-api-key-here
FUNCTOR_BASE_URL=http://localhost:8000
# Optional: Bearer token (alternative to API key)
# FUNCTOR_TOKEN=your-bearer-token

With environment variables set, you can initialize the client without parameters:

from functor_sdk import FunctorClient
# Automatically uses FUNCTOR_API_KEY from environment
client = FunctorClient()

Docker Setup (Optional)

If you're running the DRIP/KG-RAG system locally, you'll need Docker:

# Pull and start the DRIP/KG-RAG system
docker-compose up -d
# Verify the system is running
curl http://localhost:8000/health

API Key Required

You'll need an API key to use the SDK. Contact your system administrator or check the deployment documentation for API key generation.

Troubleshooting

Import Errors

If you encounter import errors:

# Verify installation
pip show functor-sdk
# Reinstall if needed
pip uninstall functor-sdk
pip install functor-sdk

Version Conflicts

If you have dependency conflicts:

# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in clean environment
pip install functor-sdk

Connection Errors

If you can't connect to the API:

  • Verify the FUNCTOR_BASE_URL is correct
  • Check that the DRIP/KG-RAG system is running
  • Verify your API key is valid
  • Check network/firewall settings

Next Steps

Now that you have the SDK installed, you're ready to start building: