Home / Function/ list() — anthropic-sdk-python Function Reference

list() — anthropic-sdk-python Function Reference

Architecture documentation for the list() function in versions.py from the anthropic-sdk-python codebase.

Function python AnthropicClient SyncAPI calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  8e40861b_6b03_ab1f_731a_c040b337742c["list()"]
  843974dc_2b09_9927_fd27_81ed9766a677["Versions"]
  8e40861b_6b03_ab1f_731a_c040b337742c -->|defined in| 843974dc_2b09_9927_fd27_81ed9766a677
  51067b03_6f2f_cc86_7af1_bedec082948b["list()"]
  51067b03_6f2f_cc86_7af1_bedec082948b -->|calls| 8e40861b_6b03_ab1f_731a_c040b337742c
  51067b03_6f2f_cc86_7af1_bedec082948b["list()"]
  8e40861b_6b03_ab1f_731a_c040b337742c -->|calls| 51067b03_6f2f_cc86_7af1_bedec082948b
  style 8e40861b_6b03_ab1f_731a_c040b337742c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/resources/beta/skills/versions.py lines 188–256

    def list(
        self,
        skill_id: str,
        *,
        limit: Optional[int] | Omit = omit,
        page: Optional[str] | Omit = omit,
        betas: List[AnthropicBetaParam] | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> SyncPageCursor[VersionListResponse]:
        """
        List Skill Versions

        Args:
          skill_id: Unique identifier for the skill.

              The format and length of IDs may change over time.

          limit: Number of items to return per page.

              Defaults to `20`. Ranges from `1` to `1000`.

          page: Optionally set to the `next_page` token from the previous response.

          betas: Optional header to specify the beta version(s) you want to use.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not skill_id:
            raise ValueError(f"Expected a non-empty value for `skill_id` but received {skill_id!r}")
        extra_headers = {
            **strip_not_given(
                {
                    "anthropic-beta": ",".join(chain((str(e) for e in betas), ["skills-2025-10-02"]))
                    if is_given(betas)
                    else not_given
                }
            ),
            **(extra_headers or {}),
        }
        extra_headers = {"anthropic-beta": "skills-2025-10-02", **(extra_headers or {})}
        return self._get_api_list(
            f"/v1/skills/{skill_id}/versions?beta=true",
            page=SyncPageCursor[VersionListResponse],
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {
                        "limit": limit,
                        "page": page,
                    },
                    version_list_params.VersionListParams,
                ),
            ),
            model=VersionListResponse,
        )

Subdomains

Calls

Called By

Frequently Asked Questions

What does list() do?
list() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/resources/beta/skills/versions.py.
Where is list() defined?
list() is defined in src/anthropic/resources/beta/skills/versions.py at line 188.
What does list() call?
list() calls 1 function(s): list.
What calls list()?
list() is called by 1 function(s): list.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free