Skip to content

RepoDataRecord#

RepoDataRecord #

Bases: PackageRecord

channel: str property #

String representation of the channel where the package comes from. This could be a URL but it could also be a channel name.

Examples#
>>> from rattler import PrefixRecord
>>> record = PrefixRecord.from_path(
...     "../test-data/conda-meta/libsqlite-3.40.0-hcfcfb64_0.json"
... )
>>> record.channel
'https://conda.anaconda.org/conda-forge/win-64'
>>>

file_name: str property #

The filename of the package.

Examples#
>>> from rattler import PrefixRecord
>>> record = PrefixRecord.from_path(
...     "../test-data/conda-meta/libsqlite-3.40.0-hcfcfb64_0.json"
... )
>>> record.file_name
'libsqlite-3.40.0-hcfcfb64_0.tar.bz2'
>>>

url: str property #

The canonical URL from where to get this package.

Examples#
>>> from rattler import PrefixRecord
>>> record = PrefixRecord.from_path(
...     "../test-data/conda-meta/libsqlite-3.40.0-hcfcfb64_0.json"
... )
>>> record.url
'https://conda.anaconda.org/conda-forge/win-64/libsqlite-3.40.0-hcfcfb64_0.tar.bz2'
>>>

__repr__() #

Returns a representation of the RepoDataRecord.

Examples#
>>> from rattler import RepoData, Channel
>>> repo_data = RepoData(
...     "../test-data/test-server/repo/noarch/repodata.json"
... )
>>> repo_data.into_repo_data(Channel("test"))[0]
RepoDataRecord(url="https://conda.anaconda.org/test/noarch/test-package-0.1-0.tar.bz2")
>>>