Getting Started
This guide will help you get up and running with the Perseus client.
Installation
You can install the SDK using pip:
pip install perseus-client==1.0.0-rc.2Quick Start
To begin using the SDK, you’ll need a Lettria API key. You can generate one from the Perseus application here.
Configuration
The SDK can be configured via environment variables. The PerseusClient will automatically load them. You can place them in a .env file in your project root.
For a complete list of configuration options, see the Configuration documentation..
| Variable | Description | Required |
|---|---|---|
LETTRIA_API_KEY | Your unique API key for the Lettria API. | Yes |
Example: Build a Graph
This example shows how to build a graph from a text file. More about building graphs at build_graph method documentation.
from perseus_client.client import PerseusClient
with PerseusClient() as client:
client.build_graph(
file_path="assets/pizza.txt",
)