L iaddlmZddlmZmZmZmZddlmZddl Z ddl m Z ddl m Z mZmZmZmZmZdd lmZmZmZmZmZmZmZmZmZdd lmZmZm Z m!Z!m"Z"m#Z#dd l$m%Z%dd l&m'Z'm(Z(dd l)m*Z*m+Z+ddl,m-Z-m.Z.ddl/m0Z0m1Z1ddl2m3Z3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:ddl;mZ>ddgZ?Gdde'Z@Gdde(ZAGddZBGddZCGddZDGd d!ZEy)") annotations)ListMappingOptionalcast)chainN)_legacy_response)Versions AsyncVersionsVersionsWithRawResponseAsyncVersionsWithRawResponseVersionsWithStreamingResponse"AsyncVersionsWithStreamingResponse) BodyOmitQueryHeadersNotGiven FileTypesSequenceNotStromit not_given)is_given extract_filesmaybe_transformstrip_not_givendeepcopy_minimalasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPageCursorAsyncPageCursor)skill_list_paramsskill_create_params)AsyncPaginatormake_request_options)AnthropicBetaParam)SkillListResponse)SkillCreateResponse)SkillDeleteResponse)SkillRetrieveResponseSkills AsyncSkillsc eZdZed dZed dZeddZeeeddded ddZ eddded ddZ eeeeddded  dd Z eddded dd Z y)r1c,t|jSN)r _clientselfs l/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/anthropic/resources/beta/skills/skills.pyversionszSkills.versions6s %%ct|Sa 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 )SkillsWithRawResponser7s r9with_raw_responsezSkills.with_raw_response:s%T**r;ct|Sz 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 )SkillsWithStreamingResponser7s r9with_streaming_responsezSkills.with_streaming_responseDs+400r;N display_titlefilesbetas extra_headers extra_query extra_bodytimeoutc itdt|r#djtd|Ddgnti|xsi}ddi|xsi}t ||d}t ttttf|ddgg} d |d <|jd t|tj| t|||| t S) Create Skill Args: display_title: Display title for the skill. This is a human-readable label that is not included in the prompt sent to the model. 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 anthropic-beta,c32K|]}t|ywr5str.0es r9 z Skills.create..u5Lc!f5Lskills-2025-10-02rErFrFpathsmultipart/form-data Content-Type/v1/skills?beta=truerHrIrJrKbodyrFoptionscast_to)rrjoinrrrrrrrRobject_postrr)SkillCreateParamsr+r. r8rErFrGrHrIrJrKrcextracted_filess r9createz Skills.createMsJ  $'*hhu5Le5LObNc/d&e"  "  *+>X=CVTVX !.   (WS&[-A4(HRY[dQePfg)> n%zz " ':'L'LM!(+Q[el(  r;rGrHrIrJrKc |std|itdt|r#djt d|Ddgnt i|xsi}ddi|xsi}|j d|dt||||t S)  Get Skill Args: skill_id: Unique identifier for the skill. The format and length of IDs may change over time. 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 7Expected a non-empty value for `skill_id` but received rNrOc32K|]}t|ywr5rQrSs r9rVz"Skills.retrieve..rWrXrY /v1/skills/ ?beta=truerardre ValueErrorrrrfrr_getr+r0r8skill_idrGrHrIrJrKs r9retrievezSkills.retrieves<VW_Vbcd d  $'*hhu5Le5LObNc/d&e"  "  *+>X=CVTVX yy(: .(+Q[el*   r;limitpagesourcerGrHrIrJrKc@itdt|r#djtd|Ddgnti|xsi}ddi|xsi}|j dt tt||||t|||dtjtS)  List Skills Args: limit: Number of results to return per page. Maximum value is 100. Defaults to 20. page: Pagination token for fetching a specific page of results. Pass the value from a previous response's `next_page` field to get the next page of results. source: Filter skills by source. If provided, only skills from the specified source will be returned: - `"custom"`: only return user-created skills - `"anthropic"`: only return Anthropic-created skills 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 rNrOc32K|]}t|ywr5rQrSs r9rVzSkills.list..rWrXrYr`r|r}r~rHrIrJrKqueryr}rdmodel) rrrfrr _get_api_listr&r-r+rr(SkillListParams r8r|r}r~rGrHrIrJrKs r9listz Skills.listsX  $'*hhu5Le5LObNc/d&e"  "  *+>X=CVTVX !! " 12(+'%%!& $"( &55  $#"  r;c |std|itdt|r#djt d|Ddgnt i|xsi}ddi|xsi}|j d|dt||||t S)  Delete Skill Args: skill_id: Unique identifier for the skill. The format and length of IDs may change over time. 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 rprNrOc32K|]}t|ywr5rQrSs r9rVz Skills.delete..3rWrXrYrrrsrart rvrrrfrr_deleter+r/rxs r9deletez Skills.deletes<VW_Vbcd d  $'*hhu5Le5LObNc/d&e"  "  *+>X=CVTVX ||(: .(+Q[el(   r;)returnr )rr>)rrBrEOptional[str] | OmitrFz*Optional[SequenceNotStr[FileTypes]] | OmitrGList[AnthropicBetaParam] | OmitrHHeaders | NonerI Query | NonerJ Body | NonerK'float | httpx.Timeout | None | NotGivenrr.ryrRrGrrHrrIrrJrrKrrr0)r| int | Omitr}rr~rrGrrHrrIrrJrrKrrz!SyncPageCursor[SkillListResponse]ryrRrGrrHrrIrrJrrKrrr/ __name__ __module__ __qualname__r!r:r?rCrrrlrzrrr;r9r1r15s&&++11/3<@15)-$("&;DC ,C : C / C &C "C  C 9C  C R26)-$("&;D1 1 / 1 &1 "1  1 91  1 l!%)'+15)-$("&;DI I # I % I / I &I "I  I 9I  +I ^26)-$("&;D1 1 / 1 &1 "1  1 91  1 r;c eZdZed dZed dZeddZeeeddded ddZ eddded ddZ eeeeddded  dd Z eddded dd Z y)r2c,t|jSr5)r r6r7s r9r:zAsyncSkills.versionsEsT\\**r;ct|Sr=)AsyncSkillsWithRawResponser7s r9r?zAsyncSkills.with_raw_responseIs*$//r;ct|SrA) AsyncSkillsWithStreamingResponser7s r9rCz#AsyncSkills.with_streaming_responseSs055r;NrDc Kitdt|r#djtd|Ddgnti|xsi}ddi|xsi}t ||d}t ttttf|ddgg} d |d <|jd t|tjd {| t|||| t d {S7%7w)rMrNrOc32K|]}t|ywr5rQrSs r9rVz%AsyncSkills.create..rWrXrYrZrFr[r\r^r_r`Nrarb)rrrfrrrrrrrRrgrhr r)rir+r.rjs r9rlzAsyncSkills.create\sJ  $'*hhu5Le5LObNc/d&e"  "  *+>X=CVTVX !.   (WS&[-A4(HRY[dQePfg)> n%ZZ ",T3F3X3XYY!(+Q[el(    Y s$B9C%;C! < C%C#C%#C%rmc 2K|std|itdt|r#djt d|Ddgnt i|xsi}ddi|xsi}|j d|dt||||t d {S7w) rorprNrOc32K|]}t|ywr5rQrSs r9rVz'AsyncSkills.retrieve..rWrXrYrrrsrartNrurxs r9rzzAsyncSkills.retrieves<VW_Vbcd d  $'*hhu5Le5LObNc/d&e"  "  *+>X=CVTVX YY(: .(+Q[el*     BBBBr{c@itdt|r#djtd|Ddgnti|xsi}ddi|xsi}|j dt tt||||t|||dtjtS) rrNrOc32K|]}t|ywr5rQrSs r9rVz#AsyncSkills.list..rWrXrYr`rrr) rrrfrrrr'r-r+rr(rrs r9rzAsyncSkills.listsX  $'*hhu5Le5LObNc/d&e"  "  *+>X=CVTVX !! " !23(+'%%!& $"( &55  $#"  r;c 2K|std|itdt|r#djt d|Ddgnt i|xsi}ddi|xsi}|j d|dt||||t d {S7w) rrprNrOc32K|]}t|ywr5rQrSs r9rVz%AsyncSkills.delete..BrWrXrYrrrsrartNrrxs r9rzAsyncSkills.deletes<VW_Vbcd d  $'*hhu5Le5LObNc/d&e"  "  *+>X=CVTVX \\(: .(+Q[el( "    r)rr )rr)rrrr)r|rr}rr~rrGrrHrrIrrJrrKrrzEAsyncPaginator[SkillListResponse, AsyncPageCursor[SkillListResponse]]rrrr;r9r2r2Ds++0066/3<@15)-$("&;DC ,C : C / C &C "C  C 9C  C R26)-$("&;D1 1 / 1 &1 "1  1 91  1 l!%)'+15)-$("&;DI I # I % I / I &I "I  I 9I  OI ^26)-$("&;D1 1 / 1 &1 "1  1 91  1 r;c&eZdZddZeddZy)r>c2||_tj|j|_tj|j|_tj|j |_tj|j |_yr5)_skillsr to_raw_response_wrapperrlrzrrr8skillss r9__init__zSkillsWithRawResponse.__init__Tss &>> MM  )@@ OO  %<< KK  '>> MM  r;c@t|jjSr5)rrr:r7s r9r:zSkillsWithRawResponse.versionsds&t||'<'<==r;Nrr1rNone)rrrrrrr!r:rr;r9r>r>Ss >>r;r>c&eZdZddZeddZy)rc2||_tj|j|_tj|j|_tj|j |_tj|j |_yr5)rr async_to_raw_response_wrapperrlrzrrrs r9rz#AsyncSkillsWithRawResponse.__init__jss &DD MM  )FF OO  %BB KK  'DD MM  r;c@t|jjSr5)rrr:r7s r9r:z#AsyncSkillsWithRawResponse.versionszs+DLL,A,ABBr;Nrr2rr)rrrrr;r9rris CCr;rc&eZdZddZeddZy)rBc||_t|j|_t|j|_t|j|_t|j |_yr5)rr$rlrzrrrs r9rz$SkillsWithStreamingResponse.__init__s[ 2 MM  5 OO  1 KK  3 MM  r;c@t|jjSr5)rrr:r7s r9r:z$SkillsWithStreamingResponse.versionss,T\\-B-BCCr;Nr)rrrrr;r9rBrBs DDr;rBc&eZdZddZeddZy)rc||_t|j|_t|j|_t|j|_t|j |_yr5)rr%rlrzrrrs r9rz)AsyncSkillsWithStreamingResponse.__init__s[ 8 MM  ; OO  7 KK  9 MM  r;c@t|jjSr5)rrr:r7s r9r:z)AsyncSkillsWithStreamingResponse.versionss1$,,2G2GHHr;Nr)rrrrr;r9rrs IIr;r)F __future__rtypingrrrr itertoolsrhttpxr r:r r rrrr_typesrrrrrrrrr_utilsrrrrrr _compatr! _resourcer"r# _responser$r% paginationr&r' types.betar(r) _base_clientr*r+types.anthropic_beta_paramr,types.beta.skill_list_responser- types.beta.skill_create_responser. types.beta.skill_delete_responser/"types.beta.skill_retrieve_responser0__all__r1r2r>rrBrrr;r9rs#00 !   (;Z:AA=@DDH ] #L _L ^L "L ^>>,CC,DD,IIr;