Skip to main content

DateInput internationalization

Project description

streamlit-dateinput-intl

DateInput internationalization

Installation instructions

uv pip install streamlit-dateinput-intl

Development install (editable)

When developing this component locally, install it in editable mode so Streamlit picks up code changes without rebuilding a wheel. Run this from the directory that contains pyproject.toml:

uv pip install -e . --force-reinstall

Development environment

Initial Project Setup

If you're setting up a new project from scratch using the Streamlit component template:

  1. Run the cookiecutter script to generate a new project:

    uvx --from cookiecutter cookiecutter gh:streamlit/component-template --directory cookiecutter/v2
    
  2. Follow the instructions to generate a new project

  3. Navigate into the newly generated project:

    cd streamlit-dateinput-intl
    
  4. Create a virtual environment using UV:

    uv venv .venv
    
  5. Activate the virtual environment:

    • On macOS/Linux:
      source .venv/bin/activate
      
    • On Windows:
      .venv\Scripts\activate
      
  6. Build the frontend:

    cd streamlit_dateinput_intl/frontend
    npm i
    npm run build
    cd ../..
    
  7. Install the component and dependencies:

    uv pip install -e .
    
  8. Run the Streamlit app to test:

    streamlit run ./example.py
    

Ongoing Development

To continue developing after the initial setup:

  1. Prerequisites: Ensure you have the following installed:

    • Python >= 3.10
    • Node.js >= 24 (LTS)
    • UV package manager
  2. Activate the virtual environment (if not already active):

    • On macOS/Linux:
      source .venv/bin/activate
      
    • On Windows:
      .venv\Scripts\activate
      
  3. Install frontend dependencies (if needed):

    cd streamlit_dateinput_intl/frontend
    npm install
    cd ../..
    
  4. Install the package in editable mode:

    uv pip install -e . --force-reinstall
    
  5. Install development dependencies (optional, for testing):

    uv pip install -e ".[devel]"
    
  6. For frontend development, run the watch mode to automatically rebuild on changes:

    cd streamlit_dateinput_intl/frontend
    npm run dev
    

Now you're ready to develop! The package is installed in editable mode, so Python changes will be picked up automatically. For frontend changes, either run npm run dev in watch mode or manually rebuild with npm run build when needed.

Usage instructions

import streamlit as st

from streamlit_dateinput_intl import streamlit_dateinput_intl

value = streamlit_dateinput_intl()

st.write(value)

Build a wheel

To package this component for distribution:

  1. Build the frontend assets (from streamlit_dateinput_intl/frontend):

    npm i
    npm run build
    
  2. Build the Python wheel using UV (from the project root):

    uv build
    

This will create a dist/ directory containing your wheel. The wheel includes the compiled frontend from streamlit_dateinput_intl/frontend/build.

Requirements

  • Python >= 3.10
  • Node.js >= 24 (LTS)

Expected output

  • dist/streamlit_dateinput_intl-0.0.1-py3-none-any.whl
  • If you run uv run --with build python -m build (without --wheel), you’ll also get an sdist: dist/streamlit-dateinput-intl-0.0.1.tar.gz

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

streamlit_dateinput_intl-0.0.1.tar.gz (338.0 kB view details)

Uploaded Source

Built Distribution

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

streamlit_dateinput_intl-0.0.1-py3-none-any.whl (341.8 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_dateinput_intl-0.0.1.tar.gz.

File metadata

  • Download URL: streamlit_dateinput_intl-0.0.1.tar.gz
  • Upload date:
  • Size: 338.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for streamlit_dateinput_intl-0.0.1.tar.gz
Algorithm Hash digest
SHA256 019bbf20e5eb34d2fb1d9d4aef3a667c180d0a73572ca3319f6f2a89883d343d
MD5 9d35a6231cbd437043aede48112a95b4
BLAKE2b-256 5cc4c1f6bd5769491fced25ef3dac8794ef70a3b61dba8f3c151160c09cf040d

See more details on using hashes here.

File details

Details for the file streamlit_dateinput_intl-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_dateinput_intl-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 579a96de577b879e2c9b31b7ead5b446a72a3a227647c112925338914085732c
MD5 3b6195d99db365b127271ade8393dc46
BLAKE2b-256 896a11c4f69c6e9120895e52036d502b2e897fdea39fff155cc617f76a7809c0

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