A Jupyter file widget with chunked upload capabilities
Project description
ipyuploads
ipyuploads is a Jupyter file widget with a variety of improvements over the FileUpload
component that comes in 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
pip install ipyuploads
Development
git clone https://github.com/g2nb/ipyuploads.git
pip install -e ipyuploads
Usage
In a Jupyter notebook, run the following:
import ipyuploads
ipyuploads.Upload()
Various options can also be set, including:
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
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ipyuploads-0.2.0.tar.gz
(238.8 kB
view hashes)
Built Distribution
ipyuploads-0.2.0-py2.py3-none-any.whl
(135.3 kB
view hashes)
Close
Hashes for ipyuploads-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 010917de40ddd0c0634ff30486bd825885013215cf68401f59710a14ac44d199 |
|
MD5 | 83d68a1c94d809dc9c789fd4b51b4d85 |
|
BLAKE2b-256 | 145c284057dc8f6b0935da2f8d5dab2f225d1bfcaf063b5122cca3c0d02cc2b5 |