Skip to main content

A customizable file uploader component for Streamlit

Project description

st_file_uploader

image Open in Streamlit

This is a custom component that allows you to split files and send them from your browser to Streamlit.

Installation instructions

pip install st_file_uploader

Usage instructions

import streamlit as st
import st_file_uploader as stf

# Set page title and description
st.title("Custom File Uploader Demo")
st.write("This demo shows different ways to customize the file uploader component.")

# Using fully custom version
st.subheader("Fully Custom Version")
custom = stf.create_custom_uploader(
    uploader_msg="Drop your amazing file here!",
    limit_msg="Maximum size is 200MB",
    button_msg="Select File",
    icon="MdFileUpload"
)

file_custom = custom.file_uploader(
    "Upload with custom text",
    type=["xlsx", "csv"],
    accept_multiple_files=True,
)

# Basic usage (English default)
st.subheader("Basic Usage (Default English)")
file = stf.file_uploader(
    "Upload a CSV file",
    type="csv",
)

# Using Spanish version
st.subheader("Spanish Version")
file_es = stf.es.file_uploader(
    "Sube un archivo CSV",
    type="csv",
)

# Mix of language with custom overrides
st.subheader("French with overrides")
file_fr = stf.file_uploader(
    "Télécharger un fichier",
    type=["jpg", "png", "gif"],
    accept_multiple_files=True,
    button_msg="Sélectionner une image",
)
    
# Show multiple types
st.subheader("Multiple file types demo")
file_types = stf.file_uploader(
    "Upload documents",
    type="csv",
    accept_multiple_files=True,
)

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

st_file_uploader-0.1.1.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

st_file_uploader-0.1.1-py3-none-any.whl (2.6 MB view details)

Uploaded Python 3

File details

Details for the file st_file_uploader-0.1.1.tar.gz.

File metadata

  • Download URL: st_file_uploader-0.1.1.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for st_file_uploader-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8c9127f73311bea34a2bbf9c66ae242a8228336ba5dcf253acdcc1f31f2c6900
MD5 b1f6775c1a39af60bb2f074e5428e90b
BLAKE2b-256 42209c9110866985fbac2fb985116ac5b5e8ec0ed825f44fbbed43a644556d8e

See more details on using hashes here.

File details

Details for the file st_file_uploader-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for st_file_uploader-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 429c72da28c8b125f84ef9bca29fc442550ea62f85a6db5f78808ee4c9dad9e2
MD5 824962be7c28e1435828eb4aacfc4663
BLAKE2b-256 1f0deb23e0206bc419f87472c1133d8ed26d0f4d19fdeee34f11a2e512a8c01d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page