Skip to main content

Tiny single-line status updater for CLI

Project description

statusline

A tiny, dependency-free status logger for CLI scripts.
Made because I got tired of spamming print() in brute-force / crawling / long loops.

What it does

emit() routes your message automatically:

  • If the message starts with [CHECKING] (or your custom prefix), it updates in-place on a single line (loading-bar vibe).
  • Otherwise, it prints a persistent result line (won’t be overwritten).

Install (editable / dev)

pip install -e .

Tip: If you're using a specific interpreter/venv, always install with that same Python:

python -m pip install -e .

Usage

from statusline import StatusLine

st = StatusLine()  # or: StatusLine(checking_prefix="[PROGRESS]")

st.emit("[CHECKING] probing...")     # updates the same line
st.emit("[CHECKING] still probing...")

st.emit("do not erase this line!")   # printed as a normal line (kept on screen)

Notes

  • Prefix matching is simple string logic: msg.startswith(checking_prefix).
  • If your editor (e.g., VSCode/Pylance) shows missing-import warnings while it still runs, your language server is probably using a different interpreter. Select the same interpreter you used to install this package and restart the language server.

statusline (한국어)

CLI에서 로그 찍는 게 귀찮아서 만든 초경량(의존성 없음) 상태 출력 유틸. 브루트포스/크롤링/긴 반복문 돌릴 때 print() 난사하기 싫어서 만들었음.

기능

emit() 하나로 자동 분기됨:

  • 메시지가 [CHECKING](또는 커스텀 prefix)로 시작하면 한 줄에서 계속 갱신됨(로딩바 느낌)
  • 그 외 메시지는 결과 로그로 확정 출력되어 절대 안 지워짐

설치 (editable / 개발용)

pip install -e .

팁: 인터프리터/venv를 쓰고 있다면, 항상 같은 파이썬으로 설치해야 함:

python -m pip install -e .

사용법

from statusline import StatusLine

st = StatusLine()  # StatusLine(checking_prefix="[PROGRESS]") 처럼 prefix 변경도 가능

st.emit("[CHECKING] 뭐시기...")     # 같은 줄에서 계속 갱신됨
st.emit("[CHECKING] 더 뭐시기...")

st.emit("지워지지 말거라!")         # 결과는 개행으로 확정 출력(안 사라짐)

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

statusline-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

statusline-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for statusline-0.1.0.tar.gz
Algorithm Hash digest
SHA256 991f8bf0c494df9ab3f46f799349c876de8025f99ee6285d577b25253ece045b
MD5 3570658b2fc331a5fe467bca154bff35
BLAKE2b-256 d3ec261227c0d8cd9c9be1bacf166ae2c7e47f4fee7658c5b378a4b5b938af1a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: statusline-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for statusline-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd6d639071a8873f703b51805c51fda34febdfabe1fe1ff8fed333c5d635edb9
MD5 924d55dc08941c87766b70f7e05fceed
BLAKE2b-256 752665102e8f466f2fcba231d6ab23e2a7f09af708bb89b097d990c1c162f211

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