+
    ,j                    p  a  0 t $ ^ RIHt ^ RIt^ RIHt ^ RIt^ RIt^ RIH	t	H
t
HtHtHtHt ]	'       d   ]P                  R8  d   ^ RIHt M^ RIHt ^ RIHt ^ RIHtHt ] ! R R	4      4       t ! R
 R]RR7      t]]]],          3,          tR]R&   R R ltR R ltR R ltRR R lltRR R llt R# )    )annotationsN)	dataclass)TYPE_CHECKINGAnyLiteralMappingOptional	TypedDict)	TypeAlias)Platform)py_index_fspy_index_s3c                  h    ] tR t^t$ RtR]R&   R]R&   RtR]R&   RtR]R&   RtR]R	&   R
t	R]R&   Rt
R# )S3Credentialsz(Credentials for accessing an S3 backend.strendpoint_urlregionNOptional[str]access_key_idsecret_access_keysession_tokenzvirtual-hostzLiteral['path', 'virtual-host']addressing_style )__name__
__module____qualname____firstlineno____doc____annotations__r   r   r   r   __static_attributes__r       3lib/python3.14/site-packages/rattler/index/index.pyr   r      sH    2  K $(M=' (,}+ $(M=' 9G5Fr!   r   c                  :    ] tR t^*t$ RtR]R&   R]R&   R]R&   RtR# )	RepodataRevisionMetadatazMetadata for a single revision in the `vN`-keyed dictionary form of
`repodata_revisions`. The revision itself is the dictionary key.zOptional[int]
n_packageszOptional[datetime.datetime]oldestnewestr   N)r   r   r   r   r   r   r    r   r!   r"   r$   r$   *   s    H ''''r!   r$   F)totalr   RepodataRevisionsc                    V ^8  d   QhRRRR/# )   revisionr   returnintr   )formats   "r"   __annotate__r0   8   s     S S S Sr!   c                4    V R 8X  d   ^# \        RV : R24      h)v3zunsupported repodata revision z, expected 'v3')
ValueError)r,   s   &r"   _revision_to_wirer4   8   s"    4
5h\Q
RRr!   c                    V ^8  d   QhRRRR/# )r+   	timestampzdatetime.datetimer-   r.   r   )r/   s   "r"   r0   r0   >   s     4 4* 4s 4r!   c                T    \        \        V P                  4       R ,          4      4      # )i  )r.   roundr6   )r6   s   &r"   	_epoch_msr9   >   s     uY((*T1233r!   c                    V ^8  d   QhRRRR/# )r+   	revisionsOptional[RepodataRevisions]r-   zOptional[list[dict[str, Any]]]r   )r/   s   "r"   r0   r0   C   s      *#r!   c                J   V f   R # . pV P                  4        F  w  r#R\        V4      /pVe`   VP                  R4      pVe   WTR&   VP                  R4      pVe   \        V4      VR&   VP                  R4      pVe   \        V4      VR&   VP	                  V4       K  	  V# )Nr,   r%   r&   r'   )itemsr4   getr9   append)r;   resultr,   metadatarevision_dictr%   r&   r'   s   &       r"   _repodata_revisions_to_dictsrD   C   s     F'oo/)35Fx5P(Q!l3J%.8l+\\(+F!*3F*;h'\\(+F!*3F*;h'm$ 0 Mr!   c               @    V ^8  d   QhRRRRRRRRR	RR
RRRRRRRRR/
# )r+   channel_directoryzos.PathLike[str]target_platformOptional[Platform]repodata_patchr   	write_zstboolwrite_shardsrepodata_revisionsr<   package_revision_assignment$Literal['from-index-json', 'latest']forcemax_parallel
int | Noner-   Noner   )r/   s   "r"   r0   r0   Z   sm     ) )')') ") 	)
 ) 4) "F) ) ) 
)r!   c	                   "   \        T V'       d   VP                  MTVVV\        V4      VVV4	      G Rj  xL
  R#  L5i)a  
Indexes dependencies in the `channel_directory` for one or more subdirectories within said directory.
Will generate repodata.json files in each subdirectory containing metadata about each present package,
or if `target_platform` is specified will only consider the subdirectory corresponding to this platform.
Will always index the "noarch" subdirectory, and thus this subdirectory should always be present, because
conda channels at a minimum must include this subdirectory.

Arguments:
    channel_directory: A `os.PathLike[str]` that is the directory containing subdirectories
                       of dependencies to index.
    target_platform: A `Platform` to index dependencies for.
    repodata_patch: The name of the conda package (expected to be in the `noarch` subdir) that should be used for repodata patching.
    write_zst: Whether to write repodata.json.zst.
    write_shards: Whether to write sharded repodata.
    repodata_revisions: Repodata revisions to advertise, with optional `n_packages`, `oldest`, and `newest` metadata.
                        Either a sequence of revisions or a `vN`-keyed dictionary, e.g. `{"v3": {"n_packages": 1}}`.
    package_revision_assignment: Whether to assign packages to the revision required by their `index.json`, or to the latest advertised revision.
    force: Whether to forcefully re-index all subdirs.
    max_parallel: The maximum number of packages to process in-memory simultaneously.
N)r   _innerrD   )	rF   rG   rI   rJ   rL   rM   rN   rP   rQ   s	   &&&&&&&&&r"   index_fsrV   Z   sD     > "1$%78#
 
 
s   4?=?c               H    V ^8  d   QhRRRRRRRRR	R
RR
RRRRRR
RRRR
RR/# )r+   channel_urlr   credentialszOptional[S3Credentials]rG   rH   rI   r   rJ   rK   rL   rM   r<   rN   rO   rP   rQ   rR   precondition_checksr-   rS   r   )r/   s   "r"   r0   r0      s     0 00(0 (0 "	0
 0 0 40 "F0 0 0 0 
0r!   c                   "   \        T TV'       d   VP                  MTVVV\        V4      VVV	V
4      G Rj  xL
  R#  L5i)a  
Indexes dependencies in the `channel_url` for one or more subdirectories in the S3 directory.
Will generate repodata.json files in each subdirectory containing metadata about each present package,
or if `target_platform` is specified will only consider the subdirectory corresponding to this platform.
Will always index the "noarch" subdirectory, and thus this subdirectory should always be present, because
conda channels at a minimum must include this subdirectory.

Arguments:
    channel_url: An S3 URL (e.g., s3://my-bucket/my-channel that containins the subdirectories
                 of dependencies to index.
    credentials: The credentials to use for accessing the S3 bucket. If not provided, will use the default
                 credentials from the environment.
    target_platform: A `Platform` to index dependencies for.
    repodata_patch: The name of the conda package (expected to be in the `noarch` subdir) that should be used for repodata patching.
    write_zst: Whether to write repodata.json.zst.
    write_shards: Whether to write sharded repodata.
    repodata_revisions: Repodata revisions to advertise, with optional `n_packages`, `oldest`, and `newest` metadata.
                        Either a sequence of revisions or a `vN`-keyed dictionary, e.g. `{"v3": {"n_packages": 1}}`.
    package_revision_assignment: Whether to assign packages to the revision required by their `index.json`, or to the latest advertised revision.
    force: Whether to forcefully re-index all subdirs.
    max_parallel: The maximum number of packages to process in-memory simultaneously.
    precondition_checks: Whether to perform precondition checks before indexing on S3 buckets which helps to prevent data corruption when indexing with multiple processes at the same time.  Defaults to True.
N)r   rU   rD   )rX   rY   rG   rI   rJ   rL   rM   rN   rP   rQ   rZ   s   &&&&&&&&&&&r"   index_s3r\      sK     H "1$%78#  s   6A?A)   
   )NNTTNfrom-index-jsonFN)
NNNTTNr_   FNT)!__conditional_annotations__
__future__r   datetimedataclassesr   ossystypingr   r   r   r   r	   r
   version_infor   typing_extensionsrattler.platformr   rattler.rattlerr   r   r   r$   r   r)   r   r4   r9   rD   rV   r\   )r`   s   @r"   <module>rk      s    " "  ! 	 
 L L
7"$/ % 4 G G G,(y (  'sH5M,N'NO 9 OS4
.)X0 0r!   