Skip to main content

cjm-fasthtml-step-progress

Install

pip install cjm_fasthtml_step_progress

Project Structure

nbs/
├── components/ (1)
│   └── progress_bar.ipynb  # Compact segmented progress bar for multi-step workflows.
└── core/ (2)
    ├── config.ipynb  # Configuration dataclass for the step progress bar component.
    └── models.ipynb  # Data models for the step progress bar component.

Total: 3 notebooks across 2 directories

Module Dependencies

graph LR
    components_progress_bar[components.progress_bar<br/>Progress Bar]
    core_config[core.config<br/>Config]
    core_models[core.models<br/>Models]

    components_progress_bar --> core_models
    components_progress_bar --> core_config

2 cross-module dependencies detected

CLI Reference

No CLI commands found in this project.

Module Overview

Detailed documentation for each module in the project:

Config (config.ipynb)

Configuration dataclass for the step progress bar component.

Import

from cjm_fasthtml_step_progress.core.config import (
    StepProgressConfig
)

Classes

@dataclass
class StepProgressConfig:
    "Rendering configuration for the step progress bar."
    
    height: int = 3  # Tailwind h-{value} scale (h-3 = 12px)
    track_bg: str = 'base_300'  # bg_dui attribute for unfilled track
    fill_bg: str = 'primary'  # bg_dui attribute for completed segments
    current_opacity: int = 60  # opacity % for current step segment
    border_radius: str = 'field'  # border_radius attribute (field/box/selector)
    separator_color: str = 'base_100'  # border_dui attribute for segment dividers
    show_tooltips: bool = True  # show step name tooltips on hover
    tooltip_position: str = 'top'  # tooltip_placement attribute (top/bottom/left/right)
    id: str = 'step-progress'  # HTML id for the progress bar container

Models (models.ipynb)

Data models for the step progress bar component.

Import

from cjm_fasthtml_step_progress.core.models import (
    StepInfo
)

Classes

@dataclass
class StepInfo:
    "Describes a single step in a multi-step workflow."
    
    title: str  # step name shown in tooltip on hover

Progress Bar (progress_bar.ipynb)

Compact segmented progress bar for multi-step workflows.

Import

from cjm_fasthtml_step_progress.components.progress_bar import (
    render_step_progress,
    create_step_progress_renderer
)

Functions

def _build_segment_fill_cls(
    idx: int,          # segment index
    current: int,      # current step index
    config: StepProgressConfig,  # rendering config
) -> str:              # combined CSS class string for the fill div
    "Build CSS classes for a segment's inner fill div."
def _build_segment(
    step: StepInfo,    # step descriptor
    idx: int,          # segment index
    current: int,      # current step index
    config: StepProgressConfig,  # rendering config
) -> FT:               # FastHTML element for one segment
    "Build a single progress bar segment."
def render_step_progress(
    steps: Sequence[StepInfo],              # ordered step definitions
    current_index: int,                     # 0-based index of the current step
    config: Optional[StepProgressConfig] = None,  # rendering config (defaults used if None)
) -> FT:                                    # the progress bar element
    "Render a compact segmented progress bar showing position in a multi-step workflow."
def create_step_progress_renderer(
    config: Optional[StepProgressConfig] = None,  # rendering config
) -> Callable:  # callable with signature (steps, current_index) -> FT
    "Create a progress renderer callback for StepFlow integration."

Metadata

Release files for cjm-fasthtml-step-progress 0.0.5

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

Source distribution (sdist)

Source distribution for cjm-fasthtml-step-progress 0.0.5
File Size Uploaded
cjm_fasthtml_step_progress-0.0.5.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cjm-fasthtml-step-progress 0.0.5
File Interpreter ABI Platform
cjm_fasthtml_step_progress-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 21.4 kB

Release files / cjm_fasthtml_step_progress-0.0.5.tar.gz

Download URL cjm_fasthtml_step_progress-0.0.5.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a89df3d9a037f9498f7dded3f63af4afcebcc6f696fe60d0682ce79d65dab76c
BLAKE2b-256 checksum
How to use checksums
9b080b4a2ac2295cf8d677a745509be5c4948d5ba544f08594a3a5ea97da9143
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / cjm_fasthtml_step_progress-0.0.5-py3-none-any.whl

Download URL cjm_fasthtml_step_progress-0.0.5-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95befaf01ca3a2100105b1feb5db1809cd56c2dc8566bcfee21ab613841a4482
BLAKE2b-256 checksum
How to use checksums
b12eedcbb6175794503df864e4e678327229a211b7b12e8de8e28388401595e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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