conda_tui package#
Subpackages#
- conda_tui.widgets package
- Submodules
- conda_tui.widgets.logo module
- conda_tui.widgets.progress module
- Module contents
Logo
Logo.auto_links
Logo.can_focus
Logo.can_focus_children
Logo.disabled
Logo.expand
Logo.get_logo()
Logo.has_focus
Logo.highlight_link_id
Logo.highlight_style
Logo.hover_style
Logo.mouse_over
Logo.scroll_x
Logo.scroll_y
Logo.show_horizontal_scrollbar
Logo.show_vertical_scrollbar
Logo.shrink
Logo.styles
Logo.virtual_size
PackageUpdateProgress
PackageUpdateProgress.auto_links
PackageUpdateProgress.can_focus
PackageUpdateProgress.can_focus_children
PackageUpdateProgress.disabled
PackageUpdateProgress.expand
PackageUpdateProgress.has_focus
PackageUpdateProgress.highlight_link_id
PackageUpdateProgress.highlight_style
PackageUpdateProgress.hover_style
PackageUpdateProgress.mouse_over
PackageUpdateProgress.on_mount()
PackageUpdateProgress.scroll_x
PackageUpdateProgress.scroll_y
PackageUpdateProgress.show_horizontal_scrollbar
PackageUpdateProgress.show_vertical_scrollbar
PackageUpdateProgress.shrink
PackageUpdateProgress.styles
PackageUpdateProgress.update_package()
PackageUpdateProgress.virtual_size
Submodules#
conda_tui.app module#
- class conda_tui.app.CondaTUI(driver_class=None, css_path=None, watch_css=False)[source]#
Bases:
App
A hacked-together Conda Text User Interface (TUI).
- BINDINGS: ClassVar[list[BindingType]] = [('h', "switch_screen('home')", 'Home'), ('e', "switch_screen('environments')", 'Environments'), ('i', "run_command(['conda', 'info'])", 'Info'), ('q', 'quit', 'Quit'), ('?', "run_command(['conda', '-h'])", 'Help')]#
- CSS_PATH: ClassVar[CSSPathType | None] = PosixPath('styles.css')#
File paths to load CSS from.
- SCREENS: ClassVar[dict[str, Screen | Callable[[], Screen]]] = {'environments': EnvironmentScreen(), 'home': HomeScreen(), 'package_list': PackageListScreen()}#
Screens associated with the app for the lifetime of the app.
- TITLE: str | None = 'conda-tui'#
A class variable to set the default title for the application.
To update the title while the app is running, you can set the [title][textual.app.App.title] attribute
conda_tui.environment module#
- class conda_tui.environment.Environment(prefix)[source]#
Bases:
object
- property name: str#
The name of the conda environment, if it is named. Otherwise, an empty string.
-
prefix:
Path
#
- property relative_path: Path#
- conda_tui.environment.list_environments(sort=True)[source]#
Get a list of conda environments installed on local machine.
- Parameters:
sort (
bool
) – If True, the list will be sorted alphabetically, with named environments appearing first, followed by path-based environments.- Return type:
list
[Environment
]
conda_tui.package module#
- class conda_tui.package.Package(record)[source]#
Bases:
object
Wrap a conda PrefixRecord, and supplement with custom attributes.
- property description: str#
Attempt to load the package description.
- property status: Text#
- property update_available: bool | None#
True if update is available. If None, update status is unknown.
conda_tui.screens module#
- class conda_tui.screens.EnvironmentScreen(name=None, id=None, classes=None)[source]#
Bases:
Screen
A screen displaying a list of all conda environments on the system.
- can_focus: bool = False#
Widget may receive focus.
- can_focus_children: bool = True#
Widget’s children may receive focus.
- compose()[source]#
Called by Textual to create child widgets.
Extend this to build a UI.
- Return type:
Iterable
[Widget
]
Example
```python def compose(self) -> ComposeResult:
yield Header() yield Container(
Tree(), Viewer()
) yield Footer()
-
environments:
list
[Environment
]#
- class conda_tui.screens.HomeScreen(name=None, id=None, classes=None)[source]#
Bases:
Screen
The home screen, displaying some helpful welcome text and the conda logo.
- can_focus: bool = False#
Widget may receive focus.
- can_focus_children: bool = True#
Widget’s children may receive focus.
- class conda_tui.screens.PackageDetailScreen(*args, package, **kwargs)[source]#
Bases:
Screen
A screen to display the details of a package.
- BINDINGS: ClassVar[list[BindingType]] = [('escape', 'go_back', 'Back')]#
- can_focus: bool = False#
Widget may receive focus.
- can_focus_children: bool = True#
Widget’s children may receive focus.
- class conda_tui.screens.PackageListScreen(name=None, id=None, classes=None)[source]#
Bases:
Screen
A screen to display the packages installed into a specific environment.
- BINDINGS: ClassVar[list[BindingType]] = [('escape', 'go_back', 'Back'), ('u', 'update_package', 'Update'), ('s', 'show_available_updates', 'Show Available Updates')]#
- can_focus: bool = False#
Widget may receive focus.
- can_focus_children: bool = True#
Widget’s children may receive focus.
- compose()[source]#
Called by Textual to create child widgets.
Extend this to build a UI.
- Return type:
Iterable
[Widget
]
Example
```python def compose(self) -> ComposeResult:
yield Header() yield Container(
Tree(), Viewer()
) yield Footer()
- environment#
Create a reactive attribute.
- Parameters:
default – A default value or callable that returns a default.
layout – Perform a layout on change.
repaint – Perform a repaint on change.
init – Call watchers on initialize (post mount).
always_update – Call watchers even when the new value equals the old value.
- class conda_tui.screens.PackageUpdateScreen(*args, package, **kwargs)[source]#
Bases:
Screen
- BINDINGS: ClassVar[list[BindingType]] = [('escape', 'go_back', 'Back')]#
- can_focus: bool = False#
Widget may receive focus.
- can_focus_children: bool = True#
Widget’s children may receive focus.
- class conda_tui.screens.Screen(name=None, id=None, classes=None)[source]#
Bases:
Screen
A base screen class, used for wrapping a subclass with a header and footer.
- can_focus: bool = False#
Widget may receive focus.
- can_focus_children: bool = True#
Widget’s children may receive focus.
- compose()[source]#
Called by Textual to create child widgets.
Extend this to build a UI.
- Return type:
Iterable
[Widget
]
Example
```python def compose(self) -> ComposeResult:
yield Header() yield Container(
Tree(), Viewer()
) yield Footer()
-
header_text:
str
# Create a reactive attribute.
- Parameters:
default – A default value or callable that returns a default.
layout – Perform a layout on change.
repaint – Perform a repaint on change.
init – Call watchers on initialize (post mount).
always_update – Call watchers even when the new value equals the old value.
- class conda_tui.screens.ShellCommandScreen(command, **kwargs)[source]#
Bases:
Screen
- BINDINGS: ClassVar[list[BindingType]] = [('escape', 'go_back', 'Back')]#
- can_focus: bool = False#
Widget may receive focus.
- can_focus_children: bool = True#
Widget’s children may receive focus.