Skip to main content
TypyTypy logo

TypyTypy (typytypy)

— A Bespoke Character-by-Character Text Printer.

[click-clack-clack...]

A utility Python library which provides for a realistic, "real-time typing" simulation with highly configurable implementations. It features a flexible API for both simple and advanced use, quick-use "character personality" presets, and granular timing control for creating custom text presentations with authentic temporal dynamics.

Born of the KitschCode philosophy of applying meticulous craftsmanship to humble functionality.

PyPI - Version PyPI - Python Version GitHub License PyPI - Status

PyPI - Implementation PyPI - Types Docs

PyPI - Downloads (pepy) PyPI - Downloads

Linting: Ruff Code style: black Types: mypy

GitHub Actions - Python CodeQL


Features

> Developer-Focused API

  • 🎯 Simple Direct Usage: Get started with a single function call: typytypy.type_out("Hello, World!").
  • 📊 Layered Design: A flexible API offers both module-level convenience functions and advanced, object-oriented instance management.

> Expressive Typing Engine

  • 🎭 Character Personalities: Simulate distinct typing styles with built-in presets like NERVOUS, CONFIDENT, and ROBOTIC.
  • ⏱️ Granular Timing Control: Define custom timing profiles to precisely control typing rhythm for specific keywords.
  • 👁️‍🗨️ High-Fidelity Output: Renders text as "real-time typing" simulation, perfectly preserving all original formatting, spacing, and line breaks.

> Professional-Grade Foundation

  • ⚡ Zero Dependencies: Pure Python implementation for a lightweight and hassle-free integration.
  • 🔒 Robust & Type-Safe: Comprehensive validation and full type safety ensure predictable, error-free behavior.
  • 📦 Modern Packaging: Built and packaged using contemporary Python standards for seamless installation and use.

Quick Start

Installation

pip install typytypy

Basic Usage

import typytypy

# Basic typewriter effect
typytypy.type_out("Hello, World!")

# ... with custom timing
typytypy.type_out("How are we doing today?",
                  base_delay=0.25, delay_range=0.5)

Using "Character Personality" Presets

import typytypy

# Discover available presets
available_presets = typytypy.get_available_presets()
print(available_presets)

# Instantiate desired preset printer(s)
nervous = typytypy.use_preset("nervous")
confident = typytypy.use_preset("confident")

# Use instantiated preset printer(s)
nervous.type_out("Um, hello there...")
confident.type_out("Good morning, team!")

Available Presets

Preset Base Delay (base_delay) Delay Range (delay_range) Description
default 0.015s 0.042s Standard typing speed
emphasis ~0.031s ~0.099s Moderate typing speed
slow 0.300s 0.300s Deliberate, careful
contemplative 0.150s 0.300s Thoughtful, reflective
nervous 0.100s 0.400s Anxious, hesitant
average 0.120s 0.240s Researched human average typing speed
confident 0.080s 0.160s Steady, professional
robotic 0.100s 0.050s Mechanical, consistent
chaotic 0.007s 0.993s Distracted, erratic

API Reference

Module-Level Functions

typytypy.type_out(text, base_delay=None, delay_range=None)

  • Print text character-by-character using the default printer instance with optional timing overrides.

typytypy.get_available_presets()

  • List all predefined timing presets (Character Presets) with their timing configuration details.

typytypy.use_preset(preset_name)

  • Create a limited printer instance using a predefined timing preset.
    • only the type_out() method is available

Advanced Class

typytypy.PrintingPress(base_delay=None, delay_range=None)

Advanced printer with full profile management capabilities.

Core Methods:

  • type_out(text, base_delay=None, delay_range=None): Print text character-by-character, applying profile timings for recognized words and fallback timings for others.
  • set_timing(base_delay, delay_range): Update the instance's default timing parameters.

Profile Management:

  • create_profile(profile_name, base_delay, delay_range, words=None): Create a new timing profile with optional initial words.
  • add_words_to_profile(profile_name, words): Add words to an existing profile. Accepts a single string or list of strings.
  • remove_words_from_profile(profile_name, words): Remove words from a profile. Accepts a single string or list of strings.
  • list_profiles(): Return list of all profile names in insertion order.
  • get_profile_info(profile_name): Return dictionary with profile details: base_delay, delay_range, word_count, and words list.
  • update_profile_timing(profile_name, base_delay, delay_range): Update timing parameters for an existing profile.
  • delete_profile(profile_name): Delete an entire profile and clean up all mappings.

Configuration:

  • set_profile_case_sensitivity(sensitive): Configure case-sensitivity for word matching.

Documentation

Full documentation: https://VDundDB.github.io/typytypy-py


License

Apache License 2.0. See LICENSE for details.


Contributing


"In the careful spacing of characters lies the true poetry of a message."

[...clack-click-clack...ting!]

Metadata

Release files for typytypy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for typytypy 0.1.0
File Size Uploaded
typytypy-0.1.0.tar.gz 521.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for typytypy 0.1.0
File Interpreter ABI Platform
typytypy-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 548.3 kB

Release files / typytypy-0.1.0.tar.gz

Download URL typytypy-0.1.0.tar.gz
Size 521.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5c066ce8bd339c5a059ee1622531fd7a41ee7fc474b8be8abb6816ad505a662f
BLAKE2b-256 checksum
How to use checksums
5db60c5288c18f28eede5e9f4212fde4d82f6addc5af1918b5af55f8f18651b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / typytypy-0.1.0-py3-none-any.whl

Download URL typytypy-0.1.0-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e58290064965828585be6d59a34e72bf8a8ee663254dbd76123876791fef57c
BLAKE2b-256 checksum
How to use checksums
92b7847dcb9b9a5fd56dd6481b3f15ca13a7a48176f8f0e7ea8a06894f603d2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page