Xontribs (xonsh.xontribs_meta
)¶
This modules is the place where one would define the xontribs.
-
class
xonsh.xontribs_meta.
Xontrib
(url: str = '', description: str = '', 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': ''}¶
-
_fields
= ('url', 'description', 'package', 'tags')¶
-
description
: str¶ Alias for field number 1
-
package
: Optional[xonsh.xontribs_meta._XontribPkg]¶ Alias for field number 2
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}¶
-
_fields
= ('install', 'license', 'name', 'url')¶
-
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.
get_xontribs
() → Dict[str, xonsh.xontribs_meta.Xontrib][source]¶ Return xontrib definitions lazily.