Skip to content

AboutJson#

AboutJson #

The about.json file contains metadata about the package.

channels property writable #

channels

A list of channels that where used during the build.

Examples#
>>> about = AboutJson.from_path("../test-data/dummy-about.json")
>>> about.channels
['https://conda.anaconda.org/conda-forge']
>>> about.channels = ['https://test.channel']
>>> about.channels
['https://test.channel']
>>>

description property writable #

description

Description of the package.

Examples#
>>> about = AboutJson.from_path("../test-data/dummy-about.json")
>>> about.description
'A dummy description.'
>>> about.description = 'New description'
>>> about.description
'New description'
>>>

dev_url property writable #

dev_url

A list of URLs to the development page of the package.

Examples#
>>> about = AboutJson.from_path("../test-data/dummy-about.json")
>>> about.dev_url
['https://github.com/conda/rattler']
>>> about.dev_url = ['https://test.dev']
>>> about.dev_url
['https://test.dev/']
>>>

doc_url property writable #

doc_url

A list of URLs to the documentation of the package.

Examples#
>>> about = AboutJson.from_path("../test-data/dummy-about.json")
>>> about.doc_url
['https://conda.github.io/rattler/py-rattler/']
>>> about.doc_url = ['https://test.docs']
>>> about.doc_url
['https://test.docs/']
>>>

home property writable #

home

A list URL to the homepage of the package.

Examples#
>>> about = AboutJson.from_path("../test-data/dummy-about.json")
>>> about.home
['http://github.com/conda/rattler']
>>> about.home = ['https://test.home']
>>> about.home
['https://test.home/']
>>>

license property writable #

license

The license of the package.

Examples#
>>> about = AboutJson.from_path("../test-data/dummy-about.json")
>>> about.license
'BSD-3-Clause'
>>> about.license = 'MIT'
>>> about.license
'MIT'
>>>

license_family property writable #

license_family

The license family of the package.

Examples#
>>> about = AboutJson.from_path("../test-data/dummy-about.json")
>>> about.license_family
>>> type(about.license_family)
<class 'NoneType'>
>>> about.license_family = 'BSD'
>>> about.license_family
'BSD'
>>>

source_url property writable #

source_url

The URL to the latest source code of the package.

Examples#
>>> about = AboutJson.from_path("../test-data/dummy-about.json")
>>> about.source_url
'https://github.com/conda/rattler'
>>> about.source_url = 'https://test.source'
>>> about.source_url
'https://test.source/'
>>>

summary property writable #

summary

A Short summary description.

Examples#
>>> about = AboutJson.from_path("../test-data/dummy-about.json")
>>> about.summary
'A dummy summary.'
>>> about.summary = 'New summary'
>>> about.summary
'New summary'
>>>

__repr__ #

__repr__()

Returns a representation of the AboutJson.

from_package_directory staticmethod #

from_package_directory(path)

Parses the object by looking up the appropriate file from the root of the specified Conda archive directory, using a format appropriate for the file type.

For example, if the file is in JSON format, this function reads the appropriate file from the archive, parse the JSON string and return the resulting object. If the file is not in a parsable format or if the file could not be read, this function returns an error.

from_path staticmethod #

from_path(path)

Parses the object from a file specified by a path, using a format appropriate for the file type.

For example, if the file is in JSON format, this function reads the data from the file at the specified path, parse the JSON string and return the resulting object. If the file is not in a parsable format or if the file could not read, this function returns an error.

Examples#
>>> about = AboutJson.from_path("../test-data/dummy-about.json")
>>> about
AboutJson()
>>>

from_str staticmethod #

from_str(string)

Parses the object from a string, using a format appropriate for the file type.

For example, if the file is in JSON format, this function parses the JSON string and returns the resulting object. If the file is not in a parsable format, this function returns an error.

Examples#
>>> import json
>>> with open("../test-data/dummy-about.json", 'r') as file:
...     json_str = json.dumps(json.load(file))
>>> about = AboutJson.from_str(json_str)
>>> about
AboutJson()
>>>

package_path staticmethod #

package_path()

Returns the path to the file within the Conda archive.

The path is relative to the root of the archive and includes any necessary directories.

Examples#
>>> AboutJson.package_path()
'info/about.json'
>>>