Skip to main content

helper-streamlit-utils

Streamlit 애플리케이션을 위한 유틸리티 모음 라이브러리

설치

pip install helper-streamlit-utils

주요 기능

1. 커스텀 라벨 (st_label)

Streamlit의 text_input과 동일한 스타일의 커스텀 라벨을 생성합니다.

from helper_streamlit_utils import st_label

# 기본 스타일 사용
st_label("Hello World")

# 커스텀 스타일링
st_label("Custom Label",
         color="#ff0000",
         background_color="#f0f0f0",
         font_size="16px",
         font_weight="bold")

2. 페이지 스타일링

페이지 여백 및 헤더 숨김 (st_style_page_margin_hidden)

from helper_streamlit_utils import st_style_page_margin_hidden

# 상단/하단 여백 제거, 좌우 10px 유지
st_style_page_margin_hidden(top=0, left=10, right=10, bottom=0)

툴바만 숨김 (st_style_toolbar_hidden)

from helper_streamlit_utils import st_style_toolbar_hidden

st_style_toolbar_hidden()

페이지 여백 커스터마이징 (st_style_page_margin)

from helper_streamlit_utils import st_style_page_margin

# 상단 20px, 좌우 15px 여백 설정
st_style_page_margin(top=20, left=15, right=15, bottom=10)

3. 구분선 (st_div_divider)

여백 없는 구분선을 생성합니다.

from helper_streamlit_utils import st_div_divider

# 기본 1px 회색 구분선
st_div_divider()

# 커스텀 구분선
st_div_divider(height=2, color="#ff0000")

4. 설정 패널 표시 (st_settings_panel_show)

Streamlit 설정 패널을 프로그래밍 방식으로 표시합니다.

from helper_streamlit_utils import st_settings_panel_show

st_settings_panel_show()

전체 사용 예제

import streamlit as st
from helper_streamlit_utils import (
    st_style_page_margin_hidden,
    st_label,
    st_div_divider
)

# 페이지 여백 제거
st_style_page_margin_hidden(top=0, left=10, right=10, bottom=0)

# 커스텀 라벨
st_label("Welcome to My App",
         font_size="24px",
         font_weight="bold",
         color="#1f77b4")

# 구분선
st_div_divider(height=2, color="#ddd")

# 일반 Streamlit 위젯들
st.write("This is a Streamlit app with custom styling!")

의존성

  • streamlit>=1.20.0
  • helper-dev-utils>=0.5.0

라이선스

MIT License

작성자

c0z0c (c0z0c.dev@gmail.com)

저장소

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

helper_streamlit_utils-0.2.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

helper_streamlit_utils-0.2.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: helper_streamlit_utils-0.2.1.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for helper_streamlit_utils-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f61911040e568e57dca3c9b0498f6fd899ad8fc2bd870245454a2c46b3f26ead
MD5 91b5c458bfaba670c063c9983da4d83f
BLAKE2b-256 f13662c10b5fb3a4a883ce5fcf0fcc84107a4129e43f64603e2218e2684010a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for helper_streamlit_utils-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89553d19c187df5b7f9a00c663f6a76a89438f9eb42a6804df53b10bdc9bfc36
MD5 dee5b0343024f57d24eb9418a7e62ac4
BLAKE2b-256 be08af204b49bbd8bd47e9366781809427a9a391189f63198bf6e2221abde6c6

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