project
Bases: BaseProject
Source code in airia/client/project/async_project.py
get_project(project_id, correlation_id=None)
async
Retrieve detailed information for a specific project.
This method fetches comprehensive information about a single project, including all associated resources, metadata, and configuration details.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_id
|
str
|
The unique identifier (GUID) of the project to retrieve. |
required |
correlation_id
|
str
|
A unique identifier for request tracing and logging. If not provided, one will be automatically generated. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ProjectItem |
ProjectItem
|
A ProjectItem object containing complete project information including pipelines, models, data sources, and metadata. |
Raises:
| Type | Description |
|---|---|
AiriaAPIError
|
If the API request fails, including cases where: - Project not found (404) - Authentication fails (401) - Access is forbidden (403) - Server errors (5xx) |
Example
from airia import AiriaAsyncClient
client = AiriaAsyncClient(api_key="your_api_key")
# Get a specific project by ID
project = await client.project.get_project("12345678-1234-1234-1234-123456789abc")
print(f"Project: {project.name}")
print(f"Description: {project.description}")
print(f"Pipelines: {len(project.pipelines)}")
print(f"Created: {project.created_at}")
Note
The project must be accessible to the authenticated user. Users will only be able to retrieve projects they have been granted access to.
Source code in airia/client/project/async_project.py
get_projects(correlation_id=None)
async
Retrieve a list of all projects accessible to the authenticated user.
This method fetches comprehensive information about all projects that the current user has access to, including project metadata, creation details, and status information.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
correlation_id
|
str
|
A unique identifier for request tracing and logging. If not provided, one will be automatically generated. |
None
|
Returns:
| Type | Description |
|---|---|
List[ProjectItem]
|
List[ProjectItem]: A list of ProjectItem objects containing project information. Returns an empty list if no projects are accessible or found. |
Raises:
| Type | Description |
|---|---|
AiriaAPIError
|
If the API request fails, including cases where: - Authentication fails (401) - Access is forbidden (403) - Server errors (5xx) |
Example
from airia import AiriaAsyncClient
client = AiriaAsyncClient(api_key="your_api_key")
# Get all accessible projects
projects = await client.project.get_projects()
for project in projects:
print(f"Project: {project.name}")
print(f"ID: {project.id}")
print(f"Description: {project.description}")
print(f"Created: {project.created_at}")
print("---")
Note
The returned projects are filtered based on the authenticated user's permissions. Users will only see projects they have been granted access to.