Metadata-Version: 2.4
Name: jupyterlab-bucket-explorer
Version: 0.1.0
Summary: Universal object storage browser for JupyterLab (S3, GCS, Azure, HDFS) by ilum
Project-URL: Homepage, https://github.com/ilum-cloud/jupyterlab-bucket-explorer
Project-URL: Repository, https://github.com/ilum-cloud/jupyterlab-bucket-explorer.git
Project-URL: Issues, https://github.com/ilum-cloud/jupyterlab-bucket-explorer/issues
Author-email: Ilum Labs LLC <support@ilum.cloud>
License:                                  Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (an example is provided in the Appendix below).
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is conspicuously marked or otherwise
              designated in writing by the copyright owner as "Not a Contribution."
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or
                  Derivative Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work,
                  excluding those notices that do not pertain to any part of
                  the Derivative Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and
                  do not modify the License. You may add Your own attribution
                  notices within Derivative Works that You distribute, alongside
                  or as an addendum to the NOTICE text from the Work, provided
                  that such additional attribution notices cannot be construed
                  as modifying the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
           APPENDIX: How to apply the Apache License to your work.
        
              To apply the Apache License to your work, attach the following
              boilerplate notice, with the fields enclosed by brackets "[]"
              replaced with your own identifying information. (Don't include
              the brackets!)  The text should be enclosed in the appropriate
              comment syntax for the file format. We also recommend that a
              file or class name and description of purpose be included on the
              same "printed page" as the copyright notice for easier
              identification within third-party archives.
        
           Copyright 2024-2026 Ilum Labs LLC
        
           Licensed under the Apache License, Version 2.0 (the "License");
           you may not use this file except in compliance with the License.
           You may obtain a copy of the License at
        
               http://www.apache.org/licenses/LICENSE-2.0
        
           Unless required by applicable law or agreed to in writing, software
           distributed under the License is distributed on an "AS IS" BASIS,
           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
           See the License for the specific language governing permissions and
           limitations under the License.
License-File: LICENSE
Keywords: AWS,Azure,Azure Blob Storage,Bucket Explorer,Cloud Storage,File Browser,GCS,Google Cloud Storage,HDFS,Hadoop,Jupyter,JupyterLab,JupyterLab4,MinIO,Multi Cloud,Object Storage,S3,jupyterlab-extension
Classifier: Framework :: Jupyter
Classifier: Framework :: Jupyter :: JupyterLab
Classifier: Framework :: Jupyter :: JupyterLab :: 4
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Requires-Dist: boto3
Requires-Dist: colorlog
Requires-Dist: jupyter-server>=2.0.0
Requires-Dist: jupyterlab<5,>=4.0.0
Requires-Dist: s3fs>=2021.10.1
Requires-Dist: singleton-decorator
Provides-Extra: dev
Requires-Dist: coverage; extra == 'dev'
Requires-Dist: moto[s3]; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest-jupyter; extra == 'dev'
Requires-Dist: pytest-tornasync; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: test
Requires-Dist: coverage; extra == 'test'
Requires-Dist: moto[s3]; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-asyncio; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-jupyter; extra == 'test'
Requires-Dist: pytest-tornasync; extra == 'test'
Requires-Dist: ruff; extra == 'test'
Description-Content-Type: text/markdown

# JupyterLab Bucket Explorer - Universal Storage Browser for JupyterLab

<div align="center">

![Bucket Explorer Demo](bucket-browser.gif)

**A modern, multi-cloud object storage browser for JupyterLab 4**

Unified interface to browse, manage, and edit files across **AWS S3**, **MinIO**, **Google Cloud Storage**, **Azure Blob Storage**, and **HDFS**.

> **Note**: Currently, **S3** and **MinIO** are fully supported. Initial support for GCS, Azure, and HDFS is in active development.

[![Build Status](https://github.com/ilum-cloud/jupyterlab-bucket-explorer/actions/workflows/build.yml/badge.svg)](https://github.com/ilum-cloud/jupyterlab-bucket-explorer/actions/workflows/build.yml)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
[![JupyterLab](https://img.shields.io/badge/JupyterLab-4.4-orange.svg)](https://jupyterlab.readthedocs.io/)
[![MinIO](https://img.shields.io/badge/MinIO-Compatible-red.svg)](https://min.io/)

</div>

---

## Features

- **Unified Storage Management** - Manage multiple connections (S3, GCS, Azure, HDFS) from a single Explorer View
- **Multi-Cloud Ready** - Designed for AWS S3, Google Cloud Storage, Azure Blob Storage, and MinIO (S3/Minio available now)
- **Explorer View** - Central hub to view, add, edit, and delete your storage connections
- **JupyterLab 4 Native** - Built specifically for JupyterLab 4.4+ with modern UI components and TypeScript
- **MinIO Optimized** - First-class support for MinIO object storage with region-free configuration
- **Seamless Integration** - Browse buckets and objects using a familiar file-system interface
- **File Upload & Management** - Drag and drop or browse to upload files, create folders, and delete objects
- **Direct File Editing** - Open and edit compatible files (CSV, JSON, Text, etc.) directly in JupyterLab
- **Smart File Filtering** - Toggle filter view to quickly find specific files
- **Flexible Authentication** - Interactive connection manager or environment variable configuration
- **Clean Interface** - Minimalist design that integrates seamlessly with JupyterLab's native UI

---

## Why Bucket Explorer?

### 🚀 High Performance for Large Files

Unlike standard file browsers that download/upload files to move them, Bucket Explorer performs **server-side Copy and Move operations**. This means moving a **100GB** file from one folder to another is **instant** and consumes **zero network bandwidth**.

### 🔌 Native MinIO Integration

Built with **MinIO** as a first-class citizen. It detects your MinIO configuration automatically and handles path styles correctly, so you don't need to fight with generic S3 settings.

### ⚡ Smart Download Strategy

Downloads are handled intelligently to prevent browser crashes using `Blob` URLs and client-side memory management, ensuring smooth handling of larger files that often choke built-in browser viewers.

### 🗑️ Efficient Resource Management

Includes **recursive directory deletion** and batch operations handled on the backend, making cleanup tasks fast and reliable.

---

## Installation

### Prerequisites

- **JupyterLab 4.4 or higher** (required for this extension)
- Python 3.8+

### Using pip

```bash
pip install jupyterlab-bucket-explorer
```

After installation, restart JupyterLab. The extension should be automatically enabled.

> **Note for MinIO users**: This extension works out-of-the-box with MinIO. No additional configuration needed!

### From source (development)

```bash
git clone https://github.com/ilum-cloud/jupyter-bucket-explorer.git
cd jupyter-bucket-explorer
pip install -e ".[dev]"
```

If you install from source (or use `pip install --no-binary`), you need Node.js to build the JupyterLab frontend assets. The build uses `jlpm` (JupyterLab's bundled package manager) automatically. The PyPI wheel already bundles these assets, so a plain `pip install jupyterlab-bucket-explorer` does not require Node.

---

## Configuration

### Interactive Configuration

The extension now features a **Connection Manager** interface:

1. Click **"+ ADD"** to create a new connection.
2. Select **Storage Type** (S3, GCS, WASBS, HDFS).
3. Enter **Name** (alias for the connection).
4. Enter **Endpoint URL** (e.g., `http://localhost:9000` for MinIO) and credentials.
5. Click **"Test Connection"** to verify, then **"Create Connection"**.

> **Note**: Currently, only **S3** (and S3-compatible services) is fully supported. Other storage types are coming soon.

You can manage multiple connections and switch between them easily.

### Environment Variables

You can also configure S3 credentials via environment variables:

```bash
export S3_CONNECTION_NAME="My Env Connection"
export S3_ENDPOINT="https://s3.amazonaws.com"
export S3_ACCESS_KEY="your-access-key"
export S3_SECRET_KEY="your-secret-key"
export S3_REGION="us-east-1"
```

Then restart JupyterLab.

### Provider-Specific Examples

#### AWS S3

```
Endpoint URL: (leave empty or https://s3.amazonaws.com)
Access Key ID: AKIA...
Secret Access Key: wJalr...
Region: us-east-1
```

#### MinIO

```
Endpoint URL: http://localhost:9000
Access Key ID: minioadmin
Secret Access Key: minioadmin
Region: (leave empty)
```


---

## Usage

1. **Open the Bucket Explorer**: Click the bucket explorer icon (bucket icon) in the left sidebar
2. **Explorer View**: You will see a list of your configured connections (or an empty state).
3. **Add Connection**: Click the **"+ ADD"** button to configure a new connection (S3, GCS, etc.).
4. **Connect**: Click on a connection card to open the file browser for that storage.
5. **Browse & Manage**: Navigate buckets, upload files, filter, and delete items.
6. **Switch Connections**: Click the **"<" (Back)** button in the toolbar to return to the Connection List.

---

## Development

See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development instructions.

### Quick Start

```bash
# Clone the repository
git clone https://github.com/ilum-cloud/jupyter-bucket-explorer.git
cd jupyter-bucket-explorer

# Create a virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -e ".[dev]"
jlpm install

# Build the extension
jlpm run build

# Start JupyterLab in watch mode
jupyter lab --watch
```

---

## Tests

Below are the exact commands to run the tests (assuming you are in the repository root).

### 1) Backend tests (pytest + moto)

```bash
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e ".[test]"
pytest -q
```

### 2) Frontend unit tests (Jest)

```bash
jlpm install
jlpm test
```

### 3) E2E / UI tests (Playwright + Galata)

```bash
# First build the extension
jlpm install
jlpm run build:prod

# Install test dependencies and run UI tests
cd ui-tests
jlpm install
jlpm playwright install
jlpm playwright test
```

Full end-to-end coverage (including MinIO integration for listing buckets and files) runs on GitHub Actions runners in CI; locally, the MinIO E2E test is skipped unless you explicitly set the required MinIO environment variables.

---

## Troubleshooting

### Extension not showing up

- Ensure the server extension is enabled: `jupyter server extension list`
- Check that JupyterLab can find the extension: `jupyter labextension list`
- Try rebuilding: `jupyter lab build`

### Connection issues

- Verify your endpoint URL is correct (include `http://` or `https://`)
- Check that your access credentials are valid
- For MinIO, ensure the server is running and accessible

### CORS errors

- If using MinIO locally, you may need to configure CORS settings

---

### Development and Formatting

To ensure code quality and consistency, we use **Ruff** for Python and **Prettier** for TypeScript/CSS.

#### Formatting Code Manually

**Python:**

```bash
# Format and lint Python code
ruff check . --fix
ruff format .
```

**TypeScript / CSS / JSON / Markdown:**

```bash
# Format frontend assets
jlpm prettier
```

#### Automating with pre-commit

We recommend using `pre-commit` to automate these checks:

1. Install pre-commit: `pip install pre-commit`
2. Install hooks: `pre-commit install`

Now, every time you commit, the code will be automatically checked and formatted.

## License

This project is licensed under the **Apache License 2.0**. See [LICENSE](LICENSE) for details.

---

## Acknowledgments

Developed with ❤️ by **[Ilum Labs LLC](https://ilum.cloud)**

---

## Related Projects

- [Sparkmagic (Ilum fork)](https://github.com/ilum-cloud/sparkmagic/tree/ilum) - Internal developed version integrated with **Ilum API** for enhanced session management and specialized features


---

## Roadmap & Feature Support

### Current Feature Support

| Feature                    | Status             | Notes                          |
| -------------------------- | ------------------ | ------------------------------ |
| **Platform Compatibility** |                    |                                |
| JupyterLab 4.4+            | ✅ Fully Supported | Native integration             |
| **Storage Providers**      |                    |                                |
| AWS S3                     | ✅ Fully Supported | Production-ready               |
| MinIO                      | ✅ Fully Supported | Optimized, first-class support |
| S3-Compatible APIs         | ✅ Supported       | Google Cloud Storage, etc.     |
| Google Cloud Storage       | 🔜 Planned         | Direct GCS API integration     |
| Azure Blob Storage         | 🔜 Planned         | Native Azure support           |
| HDFS                       | 🔜 Planned         | Native Hadoop support          |
| **Core Operations**        |                    |                                |
| Browse buckets & folders   | ✅ Supported       |                                |
| Upload files               | ✅ Supported       | Single & batch upload          |
| Download files             | ✅ Supported       | Smart memory management        |
| Delete files/folders       | ✅ Supported       | Recursive deletion             |
| Create folders             | ✅ Supported       |                                |
| Move/Copy files            | ✅ Supported       | Server-side operations         |
| File filtering/search      | ✅ Supported       | Toggle filter view             |
| **Advanced Features**      |                    |                                |
| Direct file editing        | ✅ Supported       | CSV, JSON, text files          |
| Drag & drop upload         | ⚠️ Partial         | Browser-click upload works     |
| Multipart upload           | 🔜 Planned         | For files >5GB                 |
| Versioning support         | 🔜 Planned         | Object version history         |
| Metadata editing           | 🔜 Planned         | Custom object metadata         |
| ACL/Permissions            | 🔜 Planned         | Manage object permissions      |
| **Authentication**         |                    |                                |
| Access Key/Secret          | ✅ Supported       |                                |
| Environment variables      | ✅ Supported       |                                |
| IAM roles                  | ⚠️ Partial         | Works with instance profiles   |
| STS temporary credentials  | 🔜 Planned         |                                |
| OAuth/OIDC                 | 🔜 Planned         |                                |

**Legend:**

- ✅ **Fully Supported** - Production-ready and tested
- ⚠️ **Partial** - Works with limitations
- 🔜 **Planned** - Coming in future releases
- 🚧 **In Progress** - Currently under development

---

### Contributing to the Roadmap

Have ideas or want to prioritize a feature? We'd love to hear from you!

- 💡 **Suggest features**: Open an issue with the `enhancement` label
- 🗳️ **Vote on features**: React with 👍 on existing feature requests
- 🤝 **Contribute**: Check out [CONTRIBUTING.md](CONTRIBUTING.md) to get started

---

<div align="center">

**[Report Bug](https://github.com/ilum-cloud/jupyter-bucket-explorer/issues)** · **[Request Feature](https://github.com/ilum-cloud/jupyter-bucket-explorer/issues)**

</div>

## Releasing

To release a new version of the extension and make it visible in the JupyterLab Extension Manager, follow these steps:

### 1. Update Version Numbers

Ensure the version numbers are consistent across the following files:

- `package.json`: `"version": "X.Y.Z"`
- `pyproject.toml`: `version = "X.Y.Z"`

### 2. Clean and Build

Clean previous builds and create the distribution packages (source tarball and wheel).

```bash
# Clean artifacts
rm -rf dist build lib jupyterlab_bucket_explorer/labextension

# Install build dependencies
pip install build twine

# Build the package (this triggers the npm build automatically)
python -m build
```

### 3. Publish to PyPI

The JupyterLab Extension Manager discovers extensions published to PyPI with the specific classifiers (which are already configured in `pyproject.toml`).

```bash
# Upload to PyPI
twine upload dist/*
```

Once published:

1. The extension will appear in the **JupyterLab Extension Manager**.
2. Users can install it via `pip install jupyterlab-bucket-explorer`.

### 4. Step-by-step publishing guide

See `RELEASE.md`.
