Skip to main content

Installation

Graphora is available as a Python package with two installation options: the client library for programmatic use, and the CLI for command-line extraction.

Requirements

  • Python 3.7 or higher
  • pip (Python package installer)

Install Options

Installing from source

If you prefer to install from source, you can clone the repository and install it using pip:

Dependencies

The Graphora client library has the following dependencies:
  • requests>=2.25.0 - For making HTTP requests to the Graphora API
  • pydantic>=1.8.0 - For data validation and settings management
  • pyyaml>=5.4.0 - For parsing YAML ontology files
The cli extra adds additional dependencies for the command-line interface.

Verifying the installation

You can verify that the library is installed correctly by importing it in Python:
If you installed the CLI, verify it works:

Environment setup

The Graphora client library uses environment variables for configuration. You can set these variables in your environment or provide them directly when initializing the client.

Required: Bearer token

All API calls require a Clerk-issued bearer token. Export it before making requests:
Or provide it directly when initializing the client:
Passing user_id is optional and only used for local context; the backend derives identity from the JWT sub claim.

Pipelines / server-to-server workflows

Need to call Graphora from a CI job or data pipeline? Mint short-lived Clerk JWTs on demand—no extra Graphora code is required:
  1. Create a Clerk user that represents the automation job and add a JWT template (e.g. graphora_pipeline) whose aud matches the Graphora API configuration.
  2. When the job starts, request a token with your Clerk API key:
  3. Export the returned token as GRAPHORA_AUTH_TOKEN (or pass it directly to GraphoraClient). Rotate both the JWT and the Clerk API key regularly.

API URL

By default, the client will connect to GRAPHORA_API_URL (or https://api.graphora.io if the variable is unset). Override it when targeting staging or a local docker stack:
Or provide it directly when initializing the client:

Complete Environment Setup

Here’s a complete example of setting up your environment:
With these environment variables set, you can initialize the client with minimal parameters:

Next steps

Now that you have installed the Graphora client library, you can: