Skip to main content

Streamlit 유틸리티 모음 라이브러리: 스타일링, 레이아웃, 커스텀 컴포넌트

Project description

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)

저장소

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

helper_streamlit_utils-0.1.0.tar.gz (7.0 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.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for helper_streamlit_utils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 209156a1ab1ae4a1e3670ce05cf5925bbbcbacd90d6189f8a9d88153ef4fb12f
MD5 09cd870026be5cf1d118ce53b88bc381
BLAKE2b-256 add0b32fd307c64a36935b1406472d207485290344c62f3196c7ae9a586225bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for helper_streamlit_utils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ae5af89adbf3ad22646746afef489bd635321031281848e3cf48598f5d6c76b
MD5 cd41814cc830b3ed3e3fbbadf7023c89
BLAKE2b-256 a0c1fab557689d465a50ca37c57b399a1a9e75d9a6139fa0da1d81545cf4e935

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