+
    ,j                        R t ^ RIHt ^ RIHtHtHtHt ]'       d   ^ RIH	t	 ^ RI
Ht ^ RIHt ] ! R R]4      4       tR# )	z0Protocol definition for custom repodata sources.)annotations)TYPE_CHECKINGListProtocolruntime_checkable)Platform)PackageName)RepoDataRecordc                  2    ] tR t^tRtR R ltR R ltRtR# )RepoDataSourcea^  Protocol for custom repodata sources.

Implement this protocol to provide repodata records from custom sources
(databases, APIs, in-memory caches, etc.) that can be used alongside
traditional conda channels.

Note
----
Unlike channels, custom sources are **not cached** by the gateway. The gateway's
internal caching mechanisms only apply to channel data. If caching is needed for
your custom source, you must implement it yourself within your source implementation.

**Performance:** Custom sources are slower than channels because data must be
marshalled between Python and Rust for each request. For performance-critical
applications with large amounts of repodata, consider using channels when possible.

Example
-------
```python
from rattler import Platform, PackageName, RepoDataRecord

class MyCustomSource:
    async def fetch_package_records(
        self, platform: Platform, name: PackageName
    ) -> List[RepoDataRecord]:
        # Fetch records from your custom source
        return [...]

    def package_names(self, platform: Platform) -> List[str]:
        # Return all available package names for the platform
        return ["numpy", "pandas", ...]

# Usage with Gateway
gateway = Gateway()
records = await gateway.query(
    sources=[channel, MyCustomSource()],  # Mix channels and custom sources
    platforms=["linux-64"],
    specs=["numpy"],
)
```
c               $    V ^8  d   QhRRRRRR/# )   platformr   namer   returnzList[RepoDataRecord] )formats   "8lib/python3.14/site-packages/rattler/repo_data/source.py__annotate__RepoDataSource.__annotate__9   s"      H K Th     c                   "   R# 5i)a  Fetch records for a specific package name and platform.

This method is called by the gateway when it needs repodata records
for a particular package. The platform parameter indicates which
subdirectory the gateway is querying for.

Args:
    platform: The platform to fetch records for (e.g., linux-64, noarch)
    name: The package name to fetch records for

Returns:
    List of RepoDataRecord objects for the package
Nr   )selfr   r   s   &&&r   fetch_package_records$RepoDataSource.fetch_package_records9   s
      	s   c                    V ^8  d   QhRRRR/# )r   r   r   r   z	List[str]r   )r   s   "r   r   r   I   s      h 9 r   c                    R# )a  Return all available package names for the given platform.

This is used by the gateway to know which packages are available
in this source for a given platform/subdirectory.

Args:
    platform: The platform to list packages for

Returns:
    List of package name strings
Nr   )r   r   s   &&r   package_namesRepoDataSource.package_namesI   s     	r   r   N)__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes__r   r   r   r   r      s    (T  r   r   N)r#   
__future__r   typingr   r   r   r   rattler.platform.platformr   rattler.package.package_namer   rattler.repo_data.recordr	   r   r   r   r   <module>r*      s;    6 " C C287 GX G Gr   