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

Uploaded Python 3

File details

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

File metadata

  • Download URL: st_file_uploader-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ad62d049d346fcf88d0f6ae9cf031baa06a4a17e08339a68d0a44173c0283980
MD5 2d1dff492d224009bb3ca0ff8c2438c8
BLAKE2b-256 07b17aef2dab24ebc62d3a019040c1249266aaaef555daa430e6d43d4bbb7b92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for st_file_uploader-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e8099fdff2ce1a3de3d06dbd82f0896b53455a9f2f2a706decc6178236ff8a93
MD5 5a6c1060a18364e390695ab939ef4d7f
BLAKE2b-256 e294910d91c6ba275e9b2ae6a255a1a015fdb66caf7be3ca4d54aa2847576577

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