How to use 'conda list channels' in Python

Every line of 'conda list channels' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
38def channel_list(cli):
39 cli.send("LIST")
283def list_channels(package, channel_class=Channel):
284 """
285 List all channels for a given package
286
287 Args:
288 package (:obj:`str`): package name in the format "namespace/name" or "domain.com/name"
289 channel_class (:obj:`kpm.models.channel_base:ChannelBase`): the implemented Channel class to use
290
291 Returns:
292 :obj:`list of dict`: list channels:
293 * channel (str): channel name
294 * current (str): latest/default release associated to the channel
295 * releases (list): list channel's releases
296
297 Example:
298 >>> kpm.api.impl.registry.list_channels("myns/package")
299 [{'channel': u'stable', 'current': '1.10.2', 'releases': [u'1.10.2']},
300 {'channel': u'dev', 'current': 2.0.0-beta, 'releases': [1.10.2, 2.0.0-beta]}]
301
302 See Also:
303 * :obj:`kpm.api.registry.list_channels`
304 """
305 channels = channel_class.all_channels(package).values()
306 return channels

Related snippets