AsyncVersions Class — anthropic-sdk-python Architecture
Architecture documentation for the AsyncVersions class in versions.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 715606f2_538f_39fc_0a99_548199c6e67a["AsyncVersions"] f98629a5_73f4_23f2_1f7f_c8db837848d1["AsyncAPIResource"] 715606f2_538f_39fc_0a99_548199c6e67a -->|extends| f98629a5_73f4_23f2_1f7f_c8db837848d1 8f4235f7_1068_d73a_ef9a_a3e53fdce1e0["versions.py"] 715606f2_538f_39fc_0a99_548199c6e67a -->|defined in| 8f4235f7_1068_d73a_ef9a_a3e53fdce1e0 fd6bd949_bc28_c603_a734_2bd0f0215c52["with_raw_response()"] 715606f2_538f_39fc_0a99_548199c6e67a -->|method| fd6bd949_bc28_c603_a734_2bd0f0215c52 c110c4b3_f0af_f6b8_ca60_514db8e13109["with_streaming_response()"] 715606f2_538f_39fc_0a99_548199c6e67a -->|method| c110c4b3_f0af_f6b8_ca60_514db8e13109 c96026fe_4aeb_3988_3dd6_9fcdde695ff9["create()"] 715606f2_538f_39fc_0a99_548199c6e67a -->|method| c96026fe_4aeb_3988_3dd6_9fcdde695ff9 cf852d8b_8d59_c42d_5ab5_43331b4619a7["retrieve()"] 715606f2_538f_39fc_0a99_548199c6e67a -->|method| cf852d8b_8d59_c42d_5ab5_43331b4619a7 51067b03_6f2f_cc86_7af1_bedec082948b["list()"] 715606f2_538f_39fc_0a99_548199c6e67a -->|method| 51067b03_6f2f_cc86_7af1_bedec082948b 5af5679c_7434_ec61_32a7_36bb51298ced["delete()"] 715606f2_538f_39fc_0a99_548199c6e67a -->|method| 5af5679c_7434_ec61_32a7_36bb51298ced
Relationship Graph
Source Code
src/anthropic/resources/beta/skills/versions.py lines 317–586
class AsyncVersions(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncVersionsWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
"""
return AsyncVersionsWithRawResponse(self)
@cached_property
def with_streaming_response(self) -> AsyncVersionsWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
For more information, see https://www.github.com/anthropics/anthropic-sdk-python#with_streaming_response
"""
return AsyncVersionsWithStreamingResponse(self)
async def create(
self,
skill_id: str,
*,
files: Optional[SequenceNotStr[FileTypes]] | 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,
) -> VersionCreateResponse:
"""
Create Skill Version
Args:
skill_id: Unique identifier for the skill.
The format and length of IDs may change over time.
files: Files to upload for the skill.
All files must be in the same top-level directory and must include a SKILL.md
file at the root of that directory.
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 {})}
body = deepcopy_minimal({"files": files})
extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", "<array>"]])
# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers["Content-Type"] = "multipart/form-data"
return await self._post(
f"/v1/skills/{skill_id}/versions?beta=true",
body=await async_maybe_transform(body, version_create_params.VersionCreateParams),
files=extracted_files,
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
Domain
Extends
Source
Frequently Asked Questions
What is the AsyncVersions class?
AsyncVersions is a class in the anthropic-sdk-python codebase, defined in src/anthropic/resources/beta/skills/versions.py.
Where is AsyncVersions defined?
AsyncVersions is defined in src/anthropic/resources/beta/skills/versions.py at line 317.
What does AsyncVersions extend?
AsyncVersions extends AsyncAPIResource.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free