Xontribs (xonsh.xontribs_meta)

This modules is the place where one would define the xontribs.

class xonsh.xontribs_meta.Xontrib(url: str = '', description: Union[str, xonsh.lazyasd.LazyObject] = '', package: Optional[xonsh.xontribs_meta._XontribPkg] = None, tags: Tuple[str, ] = ())[source]

Meta class that is used to describe xontribs.

Attributes
url

url to the home page of the xontrib.

description

short description about the xontrib.

package

pkg information for installing the xontrib

tags

category.

Create new instance of Xontrib(url, description, package, tags)

_asdict()

Return a new dict which maps field names to their values.

classmethod _make(iterable)

Make a new Xontrib object from a sequence or iterable

_replace(**kwds)

Return a new Xontrib object replacing specified fields with new values

_field_defaults = {'description': '', 'package': None, 'tags': (), 'url': ''}
_field_types = {'description': typing.Union[str, xonsh.lazyasd.LazyObject], 'package': typing.Union[xonsh.xontribs_meta._XontribPkg, NoneType], 'tags': typing.Tuple[str, ...], 'url': <class 'str'>}
_fields = ('url', 'description', 'package', 'tags')
_fields_defaults = {}
description: Union[str, xonsh.lazyasd.LazyObject]

Alias for field number 1

package: Optional[xonsh.xontribs_meta._XontribPkg]

Alias for field number 2

tags: Tuple[str, ]

Alias for field number 3

url: str

Alias for field number 0

class xonsh.xontribs_meta._XontribPkg(install: Dict[str, str], license: str = '', name: str = '', url: Optional[str] = None)[source]

Class to define package information of a xontrib.

Attributes
install

a mapping of tools with respective install commands. e.g. {“pip”: “pip install xontrib”}

license

license type of the xontrib package

name

full name of the package. e.g. “xontrib-argcomplete”

url

URL to the homepage of the xontrib package.

Create new instance of _XontribPkg(install, license, name, url)

_asdict()

Return a new dict which maps field names to their values.

classmethod _make(iterable)

Make a new _XontribPkg object from a sequence or iterable

_replace(**kwds)

Return a new _XontribPkg object replacing specified fields with new values

_field_defaults = {'license': '', 'name': '', 'url': None}
_field_types = {'install': typing.Dict[str, str], 'license': <class 'str'>, 'name': <class 'str'>, 'url': typing.Union[str, NoneType]}
_fields = ('install', 'license', 'name', 'url')
_fields_defaults = {}
install: Dict[str, str]

Alias for field number 0

license: str

Alias for field number 1

name: str

Alias for field number 2

url: Optional[str]

Alias for field number 3

xonsh.xontribs_meta.define_xontribs()[source]

Xontrib registry.

xonsh.xontribs_meta.get_module_docstring(module: str)str[source]

Find the module and return its docstring without actual import

xonsh.xontribs_meta.get_xontribs()Dict[str, xonsh.xontribs_meta.Xontrib][source]

Return xontrib definitions lazily.