Installation
How to install the Graphora client library
Installation
The Graphora client library is designed to be easy to install and has minimal dependencies. This guide will walk you through the installation process and help you get set up quickly.
Requirements
- Python 3.7 or higher
- pip (Python package installer)
Installing with pip
The recommended way to install the Graphora client library is using pip:
This will install the library and all its dependencies.
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
These dependencies will be automatically installed when you install the library using pip.
Verifying the installation
You can verify that the library is installed correctly by importing it in Python:
This should print the version number of the installed library.
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: User ID
All API calls require a user ID to scope the operations to your account. You can set it as an environment variable:
Or provide it directly when initializing the client:
API key
You’ll need an API key to authenticate with the Graphora API. You can set it as an environment variable:
Or provide it directly when initializing the client:
API URL
By default, the client will connect to the production API URL. You can override this by setting the GRAPHORA_API_URL
environment variable:
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:
- 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