Skip to content

A simple, lightweight file explorer widget for Jupyter Notebooks, allowing you to browse directories, select files, and retrieve file paths without leaving the notebook environment.

Notifications You must be signed in to change notification settings

X4ndri/ipybrowser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jupyter File Explorer Widget

A lightweight file explorer widget for Jupyter Notebooks, designed to simplify the process of navigating your file system, browsing files, and selecting them directly from within a notebook.

Features

  • Interactive File Navigation: Easily browse through your directories and files without leaving the notebook environment.
  • Path Selection: Select files and automatically retrieve their full paths for easy access.
  • Lightweight and Simple: Works as a Jupyter Widget, easy to install and use in any Jupyter environment.

Installation

To install the widget, simply clone the repository and install the package:

git clone https://github.com/X4ndri/ipybrowser.git
cd ipybrowser
pip install .

Usage

After installation, you can start using the file explorer widget in your Jupyter Notebook as follows:

from ipybrowser import Browser

browser = Browser(parent_path='path/to/your/parent/directory')
# OR don't specify a directory
# browser = Browser() # Parent path defaults to home directory
browser.show()

Demo normal

Once displayed, the widget will allow you to browse your directories and select files. The selected file's path will be accessible as:

selected = browser.current_path()
print(f'Selected file path: {selected}')

If you use Jupyter Lab as opposed to Jupyter Notebook, ipybrowser also supports sidecar, meaning that you can expand or minimize the browser widget wherever you are in your code, never having to scroll to the widget:

browser.show(sidecar=True)

Demo normal

About

A simple, lightweight file explorer widget for Jupyter Notebooks, allowing you to browse directories, select files, and retrieve file paths without leaving the notebook environment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages