Client

Configuration

The main client for interacting with the T2G API.

The PerseusClient utilizes Pydantic's BaseSettings for its configuration, allowing for flexible parameter management. Settings are loaded in a specific order of precedence:

  1. Variables: Values set directly in the environment take the highest precedence (e.g., export LETTRIA_API_KEY="your_key").
  2. File: A .env file located in the project root (where the SDK is run) will be loaded. This is a convenient way to manage local development settings without committing them to version control.
  3. Default values: If a setting is not found in environment variables or a .env file, the SDK will use its predefined default values.

Here are the available configuration parameters:

ParameterTypeDefault ValueDescription
LETTRIA_API_KEYstr(required)Your Lettria API key for authentication.
NEO4J_URIstrbolt://localhost:7687The URI for your Neo4j database connection.
NEO4J_USERstrneo4jThe username for authenticating with Neo4j.
NEO4J_PASSWORDstrpasswordThe password for authenticating with Neo4j.
LOGLEVELstrWARNINGThe logging level for the SDK (e.g., DEBUG, INFO, WARNING, ERROR).