Projects¶
You do not construct these classes yourself. The client owns a
ProjectManager and exposes it as
client.project. Its operations return
AiProjectHandle instances, each bound to one project
and sharing the client’s connection. The handle wraps the raw
AiProject record, documented in Models.
- class arango_ai_sdk.projects.ProjectManager(communication, db_name)¶
Manage projects through the communication layer.
- Parameters:
communication (
Communication) – Shared transport. This namespace callssend_requestand nothing else.db_name (
str) – Database the created project is stored in. Taken from the client, not from the user ofcreate.
- create(project_name, project_type, *, description=None)¶
Create a project and return it as
AiProjectHandle.- Parameters:
project_name (
str) – Project name.project_type (
str) – Project type, e.g."autograph".description (
str, optional) – Optional description. Omitted from the body when not given.
- Returns:
A handle for the created project.
- Return type:
- Raises:
InvalidProjectNameError – The endpoint rejected the project name.
- get(project_name)¶
Get a project and return it as
AiProjectHandle.- Parameters:
project_name (
str) – Project name.- Returns:
A handle for the requested project.
- Return type:
- Raises:
ProjectNotFoundError – The endpoint did not find the requested project.
ServiceError – Any other service-related error.
- class arango_ai_sdk.projects.AiProjectHandle(ai_project, communication)¶
Stores all project-scoped objects.
The handle holds the AiProject, the communication object and the service objects of the project:
autographandautorag.- Parameters:
ai_project (AiProject)
communication (Communication)
- refresh()¶
Reload this project from the platform and return the new
AiProject.Every property on this handle reads from that snapshot afterwards, so
metadataandmodel_settingsreflect changes made since the handle was created, such as a service being deployed or removed.- Raises:
ProjectNotFoundError – The project no longer exists on the platform.
ServiceError – Any other service-related error.
- Return type:
AiProject
- property name: str¶
Return project name stored in this handle.
- property project_type: str¶
Return project type, e.g.
"autograph".
- property db_name: str¶
Return database name to which this project belongs.
- property description: str | None¶
Return project description, or
Noneif none was given.
- property metadata: GraphRagProjectMetaData | None¶
Return project metadata describing the project’s services state.
- property file_names: list[str]¶
Return names of the files uploaded to this project.
- property model_settings: AutoGraphModelSettings | None¶
Return durable AutoGraph model and provider configuration.
- property project: AiProject¶
Return raw AiProject object of this handle.
- property autorag: AutoRagManager¶
Manager of the retriever services in this project.