
    b\j1                       S SK Jr  S SKJrJrJr  S SKJr  S SKJ	r	  S SK
r
SSKJr  SS	KJrJrJrJrJrJr  SS
KJrJrJrJrJrJrJr  SSKJrJrJrJ r J!r!  SSK"J#r#  SSK$J%r%J&r&  SSK'J(r(J)r)  SSK*J+r+J,r,  SSK-J.r.J/r/J0r0  SSK1J2r2J3r3  SSK4J5r5  SSK6J7r7  SSK8J9r9  SS/r: " S S\%5      r; " S S\&5      r< " S S5      r= " S S5      r> " S S5      r? " S S 5      r@g)!    )annotations)DictListOptional)chain)LiteralN   )_legacy_response   )Work	AsyncWorkWorkWithRawResponseAsyncWorkWithRawResponseWorkWithStreamingResponseAsyncWorkWithStreamingResponse)BodyOmitQueryHeadersNotGivenomit	not_given)is_givenpath_templatemaybe_transformstrip_not_givenasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPageCursorAsyncPageCursor)environment_list_paramsenvironment_create_paramsenvironment_update_params)AsyncPaginatormake_request_options)AnthropicBetaParam)BetaEnvironment)BetaEnvironmentDeleteResponseEnvironmentsAsyncEnvironmentsc                     \ rS rSr\SS j5       r\SS j5       r\SS j5       r\\\\\SSS\	S.	                     SS jjr
\SSS\	S.             SS	 jjr\\\\\\SSS\	S
.
                       SS jjr\\\\SSS\	S.                 SS jjr\SSS\	S.             SS jjr\SSS\	S.             SS jjrSrg)r-   #   c                ,    [        U R                  5      $ N)r   _clientselfs    h/var/www/website/venv/lib/python3.13/site-packages/anthropic/resources/beta/environments/environments.pyworkEnvironments.work$   s    DLL!!    c                    [        U 5      $ z
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
)EnvironmentsWithRawResponser4   s    r6   with_raw_responseEnvironments.with_raw_response(   s     +400r9   c                    [        U 5      $ z
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
)!EnvironmentsWithStreamingResponser4   s    r6   with_streaming_response$Environments.with_streaming_response2   s     166r9   N	configdescriptionmetadatascopebetasextra_headersextra_query
extra_bodytimeoutc       
        :   0 [        S[        U5      (       a#  SR                  [        S U 5       S/5      5      O[        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  S[        UUUUUS.[        R                  5      [        XxXS9[        S9$ )	g  
Create a new environment with the specified configuration.

Args:
  name: Human-readable name for the environment

  config: Environment configuration

  description: Optional description of the environment

  metadata: User-provided metadata key-value pairs

  scope: The visibility scope for this environment. 'organization' makes the environment
      visible to all accounts. 'account' restricts visibility to the owning account
      only. Only applicable for self-hosted environments. If not specified, defaults
      based on organization type.

  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,c              3  8   #    U  H  n[        U5      v   M     g 7fr2   str.0es     r6   	<genexpr>&Environments.create.<locals>.<genexpr>i        5Lec!ffe   managed-agents-2026-04-01/v1/environments?beta=truenamerE   rF   rG   rH   rJ   rK   rL   rM   bodyoptionscast_to)r   r   joinr   r   _postr   r&   EnvironmentCreateParamsr)   r+   r5   r_   rE   rF   rG   rH   rI   rJ   rK   rL   rM   s              r6   createEnvironments.create;   s    V	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`zz(  $#. (" *AA	 )+Q[ $  
 	
r9   rI   rJ   rK   rL   rM   c          
     8   U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9$ )
l  
Retrieve a specific environment by ID.

Args:
  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
=Expected a non-empty value for `environment_id` but received rP   rQ   c              3  8   #    U  H  n[        U5      v   M     g 7fr2   rS   rU   s     r6   rX   (Environments.retrieve.<locals>.<genexpr>   rZ   r[   r\   +/v1/environments/{environment_id}?beta=trueenvironment_idr`   rc   rd   

ValueErrorr   r   re   r   r   _getr   r)   r+   r5   rs   rI   rJ   rK   rL   rM   s          r6   retrieveEnvironments.retrieve   s    4 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`yyGXfg(+Q[ $  
 	
r9   
rE   rF   rG   r_   rH   rI   rJ   rK   rL   rM   c       
        v   U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        UUUUUS.[        R                  5      [        XXS	9[        S
9$ )/  
Update an existing environment's configuration.

Args:
  config: Updated environment configuration

  description: Updated description of the environment

  metadata: User-provided metadata key-value pairs. Set a value to null or empty string to
      delete the key.

  name: Updated name for the environment

  scope: The visibility scope for this environment. 'organization' makes the environment
      visible to all accounts. 'account' restricts visibility to the owning account
      only.

  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
rn   rP   rQ   c              3  8   #    U  H  n[        U5      v   M     g 7fr2   rS   rU   s     r6   rX   &Environments.update.<locals>.<genexpr>   rZ   r[   r\   rq   rr   rE   rF   rG   r_   rH   r`   ra   )rv   r   r   re   r   r   rf   r   r   r'   EnvironmentUpdateParamsr)   r+   r5   rs   rE   rF   rG   r_   rH   rI   rJ   rK   rL   rM   s               r6   updateEnvironments.update   s    X \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`zzGXfg $#. ( " *AA	 )+Q[ $  
 	
r9   include_archivedlimitpagerI   rJ   rK   rL   rM   c               R   0 [        S[        U5      (       a#  SR                  [        S U 5       S/5      5      O[        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  S[        [           [        UUUU[        UUUS.[        R                  5      S9[        S9$ )	a  
List environments with pagination support.

Args:
  include_archived: Include archived environments in the response

  limit: Maximum number of environments to return

  page: Opaque cursor from previous response for pagination. Pass the `next_page` value
      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
rP   rQ   c              3  8   #    U  H  n[        U5      v   M     g 7fr2   rS   rU   s     r6   rX   $Environments.list.<locals>.<genexpr>#  rZ   r[   r\   r]   r   r   r   rJ   rK   rL   rM   queryr   rc   model)r   r   re   r   r   _get_api_listr#   r+   r)   r   r%   EnvironmentListParams	r5   r   r   r   rI   rJ   rK   rL   rM   s	            r6   listEnvironments.list   s    F	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`!!(0(+'%%,<!& $
 ,AA "# " 
 	
r9   c          
     8   U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9$ )
  Delete an environment by ID.

Returns a confirmation of the deletion.

Args:
  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
rn   rP   rQ   c              3  8   #    U  H  n[        U5      v   M     g 7fr2   rS   rU   s     r6   rX   &Environments.delete.<locals>.<genexpr>_  rZ   r[   r\   rq   rr   r`   rt   
rv   r   r   re   r   r   _deleter   r)   r,   rx   s          r6   deleteEnvironments.delete?  s    6 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`||GXfg(+Q[ 2  
 	
r9   c          
     8   U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9$ )
  Archive an environment by ID.

Archived environments cannot be used to create new
sessions.

Args:
  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
rn   rP   rQ   c              3  8   #    U  H  n[        U5      v   M     g 7fr2   rS   rU   s     r6   rX   'Environments.archive.<locals>.<genexpr>  rZ   r[   r\   3/v1/environments/{environment_id}/archive?beta=truerr   r`   rt   
rv   r   r   re   r   r   rf   r   r)   r+   rx   s          r6   archiveEnvironments.archiveo  s    8 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`zzO`no(+Q[ $  
 	
r9    )returnr   )r   r<   )r   rA   r_   rT   rE   z1Optional[environment_create_params.Config] | OmitrF   Optional[str] | OmitrG   zDict[str, str] | OmitrH   3Optional[Literal['organization', 'account']] | OmitrI   List[AnthropicBetaParam] | OmitrJ   Headers | NonerK   Query | NonerL   Body | NonerM   'float | httpx.Timeout | None | NotGivenr   r+   rs   rT   rI   r   rJ   r   rK   r   rL   r   rM   r   r   r+   rs   rT   rE   z1Optional[environment_update_params.Config] | OmitrF   r   rG   zDict[str, Optional[str]] | Omitr_   r   rH   r   rI   r   rJ   r   rK   r   rL   r   rM   r   r   r+   )r   bool | Omitr   
int | Omitr   r   rI   r   rJ   r   rK   r   rL   r   rM   r   r   zSyncPageCursor[BetaEnvironment]rs   rT   rI   r   rJ   r   rK   r   rL   r   rM   r   r   r,   __name__
__module____qualname____firstlineno__r   r7   r=   rB   r   r   ri   ry   r   r   r   r   __static_attributes__r   r9   r6   r-   r-   #   s/   " " 1 1 7 7 EI,0*.EI15 )-$("&;DF
 F
 B	F

 *F
 (F
 CF
 /F
 &F
 "F
  F
 9F
 
F
X 26 )-$("&;D-
-
 /	-
 &-
 "-
  -
 9-
 
-
f EI,048%)EI15 )-$("&;DI
I
 B	I

 *I
 2I
 #I
 CI
 /I
 &I
 "I
  I
 9I
  
!I
\ )- %)15 )-$("&;D@
 &@
 	@

 #@
 /@
 &@
 "@
  @
 9@
 
)@
L 26 )-$("&;D.
.
 /	.
 &.
 ".
  .
 9.
 
'.
h 26 )-$("&;D/
/
 /	/
 &/
 "/
  /
 9/
 
/
 /
r9   c                     \ rS rSr\SS j5       r\SS j5       r\SS j5       r\\\\\SSS\	S.	                     SS jjr
\SSS\	S.             SS	 jjr\\\\\\SSS\	S
.
                       SS jjr\\\\SSS\	S.                 SS jjr\SSS\	S.             SS jjr\SSS\	S.             SS jjrSrg)r.   i  c                ,    [        U R                  5      $ r2   )r   r3   r4   s    r6   r7   AsyncEnvironments.work  s    &&r9   c                    [        U 5      $ r;   ) AsyncEnvironmentsWithRawResponser4   s    r6   r=   #AsyncEnvironments.with_raw_response  s     055r9   c                    [        U 5      $ r@   )&AsyncEnvironmentsWithStreamingResponser4   s    r6   rB   )AsyncEnvironments.with_streaming_response  s     6d;;r9   NrD   c       
        j  #    0 [        S[        U5      (       a#  SR                  [        S U 5       S/5      5      O[        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  S[        UUUUUS.[        R                  5      I Sh  vN [        XxXS9[        S	9I Sh  vN $  N N7f)
rO   rP   rQ   c              3  8   #    U  H  n[        U5      v   M     g 7fr2   rS   rU   s     r6   rX   +AsyncEnvironments.create.<locals>.<genexpr>  rZ   r[   r\   r]   r^   Nr`   ra   )r   r   re   r   r   rf   r   r&   rg   r)   r+   rh   s              r6   ri   AsyncEnvironments.create  s     V	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`ZZ(, $#. (" *AA	 	 )+Q[ $   
 
 	
	
s$   BB3B/
B3*B1+B31B3rk   c          
     T  #    U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9I S
h  vN $  N7f)rm   rn   rP   rQ   c              3  8   #    U  H  n[        U5      v   M     g 7fr2   rS   rU   s     r6   rX   -AsyncEnvironments.retrieve.<locals>.<genexpr>   rZ   r[   r\   rq   rr   r`   rt   Nru   rx   s          r6   ry   AsyncEnvironments.retrieve  s     4 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`YYGXfg(+Q[ $  
 
 	
 
   BB(!B&"B(r{   c       
          #    U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        UUUUUS.[        R                  5      I S	h  vN [        XXS
9[        S9I S	h  vN $  N N7f)r}   rn   rP   rQ   c              3  8   #    U  H  n[        U5      v   M     g 7fr2   rS   rU   s     r6   rX   +AsyncEnvironments.update.<locals>.<genexpr>a  rZ   r[   r\   rq   rr   r   Nr`   ra   )rv   r   r   re   r   r   rf   r   r   r'   r   r)   r+   r   s               r6   r   AsyncEnvironments.update0  s     X \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`ZZGXfg,$#. ( " *AA	 	 )+Q[ $   
 
 	
	
s$   B.C0C
1CC	CCr   c               R   0 [        S[        U5      (       a#  SR                  [        S U 5       S/5      5      O[        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  S[        [           [        UUUU[        UUUS.[        R                  5      S9[        S9$ )	r   rP   rQ   c              3  8   #    U  H  n[        U5      v   M     g 7fr2   rS   rU   s     r6   rX   )AsyncEnvironments.list.<locals>.<genexpr>  rZ   r[   r\   r]   r   r   r   )r   r   re   r   r   r   r$   r+   r)   r   r%   r   r   s	            r6   r   AsyncEnvironments.list{  s    F	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`!!( 1(+'%%,<!& $
 ,AA "# " 
 	
r9   c          
     T  #    U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9I S
h  vN $  N7f)r   rn   rP   rQ   c              3  8   #    U  H  n[        U5      v   M     g 7fr2   rS   rU   s     r6   rX   +AsyncEnvironments.delete.<locals>.<genexpr>  rZ   r[   r\   rq   rr   r`   rt   Nr   rx   s          r6   r   AsyncEnvironments.delete  s     6 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`\\GXfg(+Q[ 2 " 
 
 	
 
r   c          
     T  #    U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        X4XVS9[        S	9I S
h  vN $  N7f)r   rn   rP   rQ   c              3  8   #    U  H  n[        U5      v   M     g 7fr2   rS   rU   s     r6   rX   ,AsyncEnvironments.archive.<locals>.<genexpr>  rZ   r[   r\   r   rr   r`   rt   Nr   rx   s          r6   r   AsyncEnvironments.archive  s     8 \]k\nopp	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`ZZO`no(+Q[ $   
 
 	
 
r   r   )r   r   )r   r   )r   r   r   r   r   )r   r   r   r   r   r   rI   r   rJ   r   rK   r   rL   r   rM   r   r   zAAsyncPaginator[BetaEnvironment, AsyncPageCursor[BetaEnvironment]]r   r   r   r9   r6   r.   r.     s0   ' ' 6 6 < < EI,0*.EI15 )-$("&;DF
 F
 B	F

 *F
 (F
 CF
 /F
 &F
 "F
  F
 9F
 
F
X 26 )-$("&;D-
-
 /	-
 &-
 "-
  -
 9-
 
-
f EI,048%)EI15 )-$("&;DI
I
 B	I

 *I
 2I
 #I
 CI
 /I
 &I
 "I
  I
 9I
  
!I
\ )- %)15 )-$("&;D@
 &@
 	@

 #@
 /@
 &@
 "@
  @
 9@
 
K@
L 26 )-$("&;D.
.
 /	.
 &.
 ".
  .
 9.
 
'.
h 26 )-$("&;D/
/
 /	/
 &/
 "/
  /
 9/
 
/
 /
r9   c                  2    \ rS rSrSS jr\SS j5       rSrg)r<   i  c                   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        g r2   )	_environmentsr
   to_raw_response_wrapperri   ry   r   r   r   r   r5   environmentss     r6   __init__$EnvironmentsWithRawResponse.__init__   s    )&>>
 )@@!!
 '>>
 %<<
	 '>>
 (??  
r9   c                @    [        U R                  R                  5      $ r2   )r   r   r7   r4   s    r6   r7    EnvironmentsWithRawResponse.work6  s    "4#5#5#:#:;;r9   r   r   ri   r   r   ry   r   Nr   r-   r   None)r   r   r   r   r   r   r   r   r7   r   r   r9   r6   r<   r<     s    
, < <r9   r<   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   i;  c                   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        g r2   )	r   r
   async_to_raw_response_wrapperri   ry   r   r   r   r   r   s     r6   r   )AsyncEnvironmentsWithRawResponse.__init__<  s    )&DD
 )FF!!
 'DD
 %BB
	 'DD
 (EE  
r9   c                @    [        U R                  R                  5      $ r2   )r   r   r7   r4   s    r6   r7   %AsyncEnvironmentsWithRawResponse.workR  s    '(:(:(?(?@@r9   r   Nr   r.   r   r   )r   r   r   r   r9   r6   r   r   ;  s    
, A Ar9   r   c                  2    \ rS rSrSS jr\SS j5       rSrg)rA   iW  c                H   Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        [        UR                  5      U l        [        UR                  5      U l        g r2   )r   r!   ri   ry   r   r   r   r   r   s     r6   r   *EnvironmentsWithStreamingResponse.__init__X  s    )2
 5!!
 3
 1
	 3
 4  
r9   c                @    [        U R                  R                  5      $ r2   )r   r   r7   r4   s    r6   r7   &EnvironmentsWithStreamingResponse.workn  s    (););)@)@AAr9   r   Nr   )r   r   r   r   r9   r6   rA   rA   W  s    
, B Br9   rA   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   is  c                H   Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        [        UR                  5      U l        [        UR                  5      U l        g r2   )r   r"   ri   ry   r   r   r   r   r   s     r6   r   /AsyncEnvironmentsWithStreamingResponse.__init__t  s    )8
 ;!!
 9
 7
	 9
 :  
r9   c                @    [        U R                  R                  5      $ r2   )r   r   r7   r4   s    r6   r7   +AsyncEnvironmentsWithStreamingResponse.work  s    -d.@.@.E.EFFr9   r   Nr   )r   r   r   r   r9   r6   r   r   s  s    
, G Gr9   r   )A
__future__r   typingr   r   r   	itertoolsr   typing_extensionsr   httpx r
   r7   r   r   r   r   r   r   _typesr   r   r   r   r   r   r   _utilsr   r   r   r   r   _compatr   	_resourcer   r    	_responser!   r"   
paginationr#   r$   
types.betar%   r&   r'   _base_clientr(   r)   types.anthropic_beta_paramr*   types.beta.beta_environmentr+   +types.beta.beta_environment_delete_responser,   __all__r-   r.   r<   r   rA   r   r   r9   r6   <module>r     s    # ' '  %  !  M L L g g ' ; Z : h h A = ; Y.
/{
? {
|{
( {
|< <8A A8B B8G Gr9   