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:
-
Run the cookiecutter script to generate a new project:
uvx --from cookiecutter cookiecutter gh:streamlit/component-template --directory cookiecutter/v2
-
Follow the instructions to generate a new project
-
Navigate into the newly generated project:
cd streamlit-dateinput-intl
-
Create a virtual environment using UV:
uv venv .venv
-
Activate the virtual environment:
- On macOS/Linux:
source .venv/bin/activate
- On Windows:
.venv\Scripts\activate
- On macOS/Linux:
-
Build the frontend:
cd streamlit_dateinput_intl/frontend npm i npm run build cd ../..
-
Install the component and dependencies:
uv pip install -e .
-
Run the Streamlit app to test:
streamlit run ./example.py
Ongoing Development
To continue developing after the initial setup:
-
Prerequisites: Ensure you have the following installed:
- Python >= 3.10
- Node.js >= 24 (LTS)
- UV package manager
-
Activate the virtual environment (if not already active):
- On macOS/Linux:
source .venv/bin/activate
- On Windows:
.venv\Scripts\activate
- On macOS/Linux:
-
Install frontend dependencies (if needed):
cd streamlit_dateinput_intl/frontend npm install cd ../..
-
Install the package in editable mode:
uv pip install -e . --force-reinstall
-
Install development dependencies (optional, for testing):
uv pip install -e ".[devel]"
-
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:
-
Build the frontend assets (from
streamlit_dateinput_intl/frontend):npm i npm run build
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
019bbf20e5eb34d2fb1d9d4aef3a667c180d0a73572ca3319f6f2a89883d343d
|
|
| MD5 |
9d35a6231cbd437043aede48112a95b4
|
|
| BLAKE2b-256 |
5cc4c1f6bd5769491fced25ef3dac8794ef70a3b61dba8f3c151160c09cf040d
|
File details
Details for the file streamlit_dateinput_intl-0.0.1-py3-none-any.whl.
File metadata
- Download URL: streamlit_dateinput_intl-0.0.1-py3-none-any.whl
- Upload date:
- Size: 341.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
579a96de577b879e2c9b31b7ead5b446a72a3a227647c112925338914085732c
|
|
| MD5 |
3b6195d99db365b127271ade8393dc46
|
|
| BLAKE2b-256 |
896a11c4f69c6e9120895e52036d502b2e897fdea39fff155cc617f76a7809c0
|