Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Colight Site

Static site generator for Colight visualizations.

Converts .colight.py files into markdown/HTML documents where:

  • Comments become narrative markdown
  • Code blocks are executed to generate Colight visualizations
  • Output is embedded as interactive .colight files

Usage

# Build a single file
colight-site build src/post.colight.py --output build/post.md

# Watch for changes
colight-site watch src/ --output build/

# Initialize new project
colight-site init my-blog/

File Format

.colight.py files mix comments (markdown) with executable Python code:

# My Data Visualization
# This creates an interactive plot...

import numpy as np
x = np.linspace(0, 10, 100)

# The sine wave
np.sin(x)  # This expression generates a colight visualization

Pragma Directives

Control the output format and visibility of content using pragma comments:

File-level pragmas

Place at the beginning of the file, followed by a blank line:

# %% hide-code

# Your content here...

Form-level pragmas

Place directly before a code block:

# | show-code
x = np.array([1, 2, 3])

Available pragmas

  • hide-code / show-code - Hide or show all code blocks
  • hide-statements / show-statements - Hide or show Python statements (imports, assignments)
  • hide-visuals / show-visuals - Hide or show Colight visualizations
  • hide-prose / show-prose - Hide or show markdown prose (comments)
  • format-html - Output in HTML format
  • format-markdown - Output in Markdown format

Pragma formats

# %% hide-code          # Double percent format
# | show-visuals        # Pipe format
#| colight: hide-prose  # Legacy format (still supported)

Precedence

  1. Form-level pragmas (highest priority)
  2. CLI options
  3. File-level pragmas
  4. Defaults (lowest priority)

show-* pragmas always override corresponding hide-* pragmas.

Metadata

Release files for colight-site 2025.4.1.dev202506261550

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

Source distribution (sdist)

Source distribution for colight-site 2025.4.1.dev202506261550
File Size Uploaded
colight_site-2025.4.1.dev202506261550.tar.gz 46.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for colight-site 2025.4.1.dev202506261550
File Interpreter ABI Platform
colight_site-2025.4.1.dev202506261550-py3-none-any.whl Python 3 none any Details

Total release size: 77.9 kB

Release files / colight_site-2025.4.1.dev202506261550.tar.gz

Download URL colight_site-2025.4.1.dev202506261550.tar.gz
Size 46.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5cf44aaaba14a879516bf64ff5c95b07687aa006ba69f569d3099b35d4e14196
BLAKE2b-256 checksum
How to use checksums
a61095ad44f92511e8de85577f21052285cee2a787493e75b933e0cd454001c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.15

Release files / colight_site-2025.4.1.dev202506261550-py3-none-any.whl

Download URL colight_site-2025.4.1.dev202506261550-py3-none-any.whl
Size 31.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb1d45fbb1bd0ae8be9f4ac9fbb9ca67f090155bfbd0f828cbc7e84ac6a2b0c0
BLAKE2b-256 checksum
How to use checksums
73784855ad41b7291c376f414b75d74ffb51446a43284814d90cb0debdacd59d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.15
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