Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
.. image:: https://img.shields.io/pypi/v/fileupload.svg :target: https://pypi.python.org/pypi/fileupload/ :alt: Latest Version
.. image:: https://img.shields.io/pypi/dm/fileupload.svg :target: https://pypi.python.org/pypi/fileupload/ :alt: Downloads
An IPython notebook widget to upload files, using FileReader_.
Install using pip::
pip install fileupload
Install JavaScript::
jupyter nbextension install [--user] --py fileupload
Enable the extension::
jupyter nbextension enable [--user] --py fileupload
.. code-block:: python
import io
from IPython.display import display
import fileupload
def _upload():
_upload_widget = fileupload.FileUploadWidget()
def _cb(change):
decoded = io.StringIO(change['owner'].data.decode('utf-8'))
filename = change['owner'].filename
print('Uploaded `{}` ({:.2f} kB)'.format(
filename, len(decoded.read()) / 2 **10))
_upload_widget.observe(_cb, names='data')
display(_upload_widget)
_upload()
Base64 data is synced to the data_base64
member, decoded data can be
obtained from data
.
The name of the uploaded file is stored in filename
.
Refer to Changelog_.
.. _FileReader: https://developer.mozilla.org/en-US/docs/Web/API/FileReader .. _Changelog: ./ChangeLog
FAQs
IPython file upload widget
We found that fileupload demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.