Projects

envless.projects.list()

Read one page of projects across products

def list(
    *,
    limit: int | None = None,
    offset: int | None = None,
    search: str | None = None,
    order: str | None = None,
    product: str | None = None,
    timeout: float | None = None,
) -> Page[ProjectResource]

Returns a single page of projects drawn from every product the key can reach, as items plus the raw pagination envelope. Nothing is fetched beyond that page, so read pagination['hasMore'] before assuming you have the whole set.

Project slugs are unique per product, not per workspace, so this flat list can legitimately hold two rows with the same slug. Key off id, or off the product.slug and slug pair. Every row carries its product dict so you never need a second call to disambiguate. Pass product= to narrow to one product.

Example

from envless import envless

page = envless.projects.list(product='billing', limit=50)

for project in page['items']:
    product = project['product']

    print(
        product['slug'] if product else None, project['slug']
    )

Parameters

ParameterTypeRequiredDescription
productstrNoProduct slug or product uniqueId to filter the list down to one product.
limitintNoRows per page, a whole number from 1 to 100.
offsetintNoRows to skip before the page starts.
searchstrNoCase insensitive substring match against project name and slug.
orderstrNoDefaults to name, which sorts A to Z. Pass asc for oldest first or desc for newest first on createdAt.
timeoutfloatNoSeconds each attempt of this call may take, the response body included, before it raises EnvlessNetworkError with is_timeout set. Overrides the client's timeout for this call, and 0 turns the limit off.

Returns

Page[ProjectResource] with items and the pagination envelope.

Reads the projects collection. list returns one page as a dict with items and pagination, list_all collects every page into a list, and iterate yields one item at a time, fetching the next page only when the loop reaches it. On AsyncEnvless, iterate is an async iterator for async for.

Worth knowing

  • An unknown or inaccessible product= fails with 404 product.not_found, it does not quietly return an empty page.
  • Projects a restricted key cannot reach are simply absent from the page rather than rejected.

Required scopes

projects:read

Underlying endpoint

GET /projects

Request and response schema, every error code, and a live playground.

In TypeScript

envless.projects.list()

The same method in @goenvless/sdk, with the same request, retries and errors.