Skip to main content

Tools for the python system output, or stdout.

Project description

stdoutools

A lightweight Python module to enhance terminal I/O: animated printing, spinners, dynamic effects, and full terminal logging (with input + timestamps).

✨ Features

  • typer: Print or prompt with typing animation
  • animate: Spinners and frame-based terminal animation
  • flashtext: Show temporary messages that auto-clear
  • terminal: Clear screen, get terminal size (cross-platform)
  • Logger: Log terminal output and input to a file with timestamps

🔧 Installation

No external dependencies. Pure Python 3.

Install from PyPI:

pip install stdoutools

🚀 Usage Examples

Typing Output and Input

from stdoutools import typer

typer.print("Hello world!", rate=10)
name = typer.input("What's your name? ", rate=20)
print("Hi", name)

Spinner and Frame Animation

from stdoutools import animate

animate.spinner(duration=3, message="Loading...")
animate.animate(5, "🌑", "🌓", "🌕", rate=2)

Flashing Temporary Text

from stdoutools import flashtext

flashtext("Processing...", delay=2)

Logging Everything (Output + Input)

from stdoutools import logger

logger.start("log-@timestamp.txt", timestamp=True, timestamp_format="%Y-%m-%d_%H-%M-%S")

print("Program started")
name = input("Enter your name: ")
print("Hi,", name)

logger.end()

🗒️ Features of Logger

  • Log stdout (e.g. print())
  • Log input prompts and responses
  • Add timestamps to each line
  • Auto-format filename using @timestamp
    • Escape with @@timestamp@timestamp literal

Filename examples

Assuming the time is 7/08/2025 at 16:05:

Filename Template Example Output Filename
log-@timestamp.txt log-2025-08-07_16-05-00.txt
session-@@timestamp.txt session-@timestamp.txt

📄 License

MIT License


🧠 Author

Created by [Juno Wu] with ♥️.

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

stdoutools-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

stdoutools-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stdoutools-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for stdoutools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 561e21b2fb1db7205c0744e8a8b7513d000976c54f10e515160d0731bcd36e3b
MD5 6ff495fd635bf7bc535105c3ad5ae76b
BLAKE2b-256 0921f9ea0de51380d5cc0e43210925fddadd8fc6eb660ebe8a5abfff644070c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stdoutools-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for stdoutools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f222aa343ca8b178bfff3299d9f66b0b32883a8a4048d5d4e602c9bc83471fe9
MD5 cd5f10ed9e5632d0d5d15fa492a885ef
BLAKE2b-256 01009d8779c3636d32d456931d21ba7f6cfbd68b8eebb37a0737149e2242787c

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