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
| Package | What you get |
|---|---|
graphora | Python client library (GraphoraClient class) for API integration |
graphora[cli] | Everything above plus the graphora CLI command for command-line extraction |
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 APIpydantic>=1.8.0- For data validation and settings managementpyyaml>=5.4.0- For parsing YAML ontology files
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: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: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:- Create a Clerk user that represents the automation job and add a JWT template (e.g.
graphora_pipeline) whoseaudmatches the Graphora API configuration. - When the job starts, request a token with your Clerk API key:
- Export the returned
tokenasGRAPHORA_AUTH_TOKEN(or pass it directly toGraphoraClient). Rotate both the JWT and the Clerk API key regularly.
API URL
By default, the client will connect toGRAPHORA_API_URL (or https://api.graphora.io if the variable is unset). Override it when targeting staging or a local docker stack:
Complete Environment Setup
Here’s a complete example of setting up your environment:Next steps
Now that you have installed the Graphora client library, you can:- Read the quickstart guide to learn how to use the library
- Explore the core concepts to understand how Graphora works
- Check out the examples to see the library in action
