Skip to main content
The Projects resource provides methods to retrieve and list projects.

Methods

list

List all projects with pagination support.
client.projects.list(
    limit=None,
    cursor=None
) -> CursorPage[Project]
limit
int | None
Maximum number of projects to return per page
cursor
str | None
Pagination cursor for fetching the next page of results
CursorPage[Project]
CursorPage[Project]
A paginated list of projects. Use .items to access the project list, .next_cursor for pagination, and .has_more to check if more results exist.

Example

from avala import Avala

client = Avala(api_key="your-api-key")

# List all projects
page = client.projects.list()
for project in page.items:
    print(project.name, project.status)

# List with pagination
page = client.projects.list(limit=20)
while page.has_more:
    for project in page.items:
        print(project.uid)
    page = client.projects.list(cursor=page.next_cursor)

get

Retrieve a specific project by its UID.
client.projects.get(uid: str) -> Project
uid
str
required
The unique identifier of the project
Project
Project
The project object containing uid, name, status, and timestamps.

Example

project = client.projects.get("project-uid-123")
print(f"Project: {project.name}")
print(f"Status: {project.status}")
print(f"Created: {project.created_at}")

Async Usage

All methods are available in async form via client.async_projects:
import asyncio
from avala import AsyncAvala

async def main():
    client = AsyncAvala(api_key="your-api-key")
    
    # List projects
    page = await client.projects.list(limit=10)
    for project in page.items:
        print(project.name)
    
    # Get specific project
    project = await client.projects.get("project-uid-123")
    print(project.status)

asyncio.run(main())

Response Types

Project

uid
str
Unique identifier for the project
name
str
Human-readable name of the project
status
str | None
Current status of the project (e.g., “active”, “completed”, “archived”)
created_at
datetime | None
Timestamp when the project was created
updated_at
datetime | None
Timestamp when the project was last updated

CursorPage

items
list[T]
List of items in the current page
next_cursor
str | None
Cursor for fetching the next page (None if no more pages)
previous_cursor
str | None
Cursor for fetching the previous page
has_more
bool
Property indicating if more results are available

Build docs developers (and LLMs) love