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.2.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.2.1-py3-none-any.whl (5.0 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: st_file_uploader-0.2.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.2.1.tar.gz
Algorithm Hash digest
SHA256 8339ed1b679f582254570a3d300e9a2b09df3e2ef6e749f147079de62c8a91fd
MD5 cb90ca010bea4613763c1dba65ba20ca
BLAKE2b-256 e98d1f10ba1366f8af76cbdcaaa8725ca57c871b8b5ac5b8de54d95d76f62984

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for st_file_uploader-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0dc9c32f1abf003486164bd4c02d5474222ad863c172b073a8698560f20418bc
MD5 2f1315b03d0d25b069b0d21c8ca17ca4
BLAKE2b-256 09cdd8d36cf7fcf7bedc0aee762b83844033694671c381f9f8cee7a718095c3b

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