Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Openai Openai python Container List Params

From Leeroopedia
Knowledge Sources
Domains API_Types, Python
Last Updated 2026-02-15 00:00 GMT

Overview

Concrete type for container listing query parameters provided by the openai-python SDK.

Description

The ContainerListParams TypedDict defines optional query parameters for paginating and filtering containers via client.containers.list(). It supports cursor-based pagination with after (an object ID), limit (1-100, default 20), name for filtering by container name, and order ("asc" or "desc") for sorting by creation timestamp.

Usage

Import this type when constructing or type-hinting pagination and filter parameters for container listing requests.

Code Reference

Source Location

Signature

class ContainerListParams(TypedDict, total=False):
    after: str
    limit: int
    name: str
    order: Literal["asc", "desc"]

Import

from openai.types import ContainerListParams

I/O Contract

Fields

Name Type Required Description
after str No Cursor for pagination; object ID defining position in the list
limit int No Number of objects to return (1-100, default 20)
name str No Filter results by container name
order Literal["asc", "desc"] No Sort order by created_at timestamp

Usage Examples

from openai import OpenAI

client = OpenAI()

# List containers with filtering and pagination
containers = client.containers.list(
    name="sandbox",
    limit=10,
    order="desc",
)
for container in containers:
    print(f"{container.id}: {container.name} ({container.status})")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment