Metadata-Version: 2.1
Name: ipyuploads
Version: 0.2.0
Summary: A Jupyter file widget with chunked upload capabilities
Home-page: https://github.com/g2nb/ipyuploads
Author: Thorin Tabor
Author-email: tmtabor@cloud.ucsd.edu
License: BSD-3-Clause
Keywords: ipython,jupyter,widgets
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: IPython
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Multimedia :: Graphics
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ipywidgets (<9,>=7)

# ipyuploads

**ipyuploads** is a Jupyter file widget with a variety of improvements over the `FileUpload` component that comes in [ipywidgets](https://github.com/jupyter-widgets/ipywidgets). It is designed to serve as a drop-in replacement for the aforementioned component. Features include:

* Progress indicator on uploads over 1 mb
* "Chunked" file upload supports larger files than `FileUpload` allows
* The ability to write chunks to disk reduces the memory requirement for large file uploads
* Callback hooks on file upload completion, chunk upload completion and all-files completion

## Requirements

* ipywidgets >= 7.5.0

## Installation

```bash
pip install ipyuploads
```

### Development

```bash
git clone https://github.com/g2nb/ipyuploads.git
pip install -e ipyuploads
```

## Usage

In a Jupyter notebook, run the following:

```python
import ipyuploads

ipyuploads.Upload()
```

Various options can also be set, including:

```python
import ipyuploads

ipyuploads.Upload(accept='txt',           # Accept only text files
                  multiple=True,          # Upload multiple files at once
                  disabled=True,          # Disable the widget
                  icon='cloud-upload',    # Change the upload icon
                  button_stye='primary',  # Change the button style
                  error='Bad Error',      # Set the error message
                  busy=False,             # Whether an upload is in progress
                  chunk_complete=foo,     # Callback when a chunk upload completes
                  file_complete=bar,      # Callback when a file upload completes
                  all_files_complete=fo2, # Callback when all files complete
                  )
```
