Skip to main content

Visual components for notebook-style documents.

Project description

notebookux

CI Docs PyPI

notebookux is a small visual layer for Python notebooks.

It provides reusable presentation helpers for academic and technical notebooks:

  • themes
  • cover and section pages
  • badges, cards, grids and code panels
  • styled tables and figures
  • simple multi-screen modules with previous/next navigation

The package is UI-only. It does not depend on Colab and does not implement data processing, machine learning pipelines or project-specific logic.

Docs

Documentation is published with MkDocs Material:

Install for development

cd "C:\Users\Yngrid Kalinne\Documents\cq-novo\notebookux"
python -m pip install -e ".[dev,docs,examples]"

Basic use

from notebookux import UX

UX.use_theme("blueprint")

UX.cover(
    title="Resolucao de Computacao Quantica",
    subtitle="Deutsch-Jozsa e Bernstein-Vazirani",
    meta=[
        ("Disciplina", "Computacao Quantica"),
        ("Formato", "Notebook"),
    ],
    bullets=[
        "Execucoes com evidencias",
        "Tabelas de contagens",
        "Comparacao entre simuladores",
    ],
)

Uso rapido

Para notebooks academicos, voce pode importar com um nome curto e usar os componentes prontos sem escrever HTML manualmente.

from notebookux import UX as CQ

CQ.setup("blueprint", compact=True)

CQ.section(
    "Diagnostico inicial",
    subtitle="Resumo visual da base antes da modelagem.",
    kicker="Etapa 1",
)

CQ.badges([
    ("Dataset", "blue"),
    ("Classificacao", "green"),
    ("Reprodutivel", "amber"),
])

CQ.metrics([
    ("Linhas", "53.940", "Registros carregados"),
    {"label": "Classes", "value": "5", "note": "Variavel alvo", "color": "purple"},
])

CQ.checklist([
    ("Dataset carregado", True),
    {"label": "Modelos configurados", "done": False, "note": "Executar na proxima celula"},
])

CQ.steps([
    ("Carregamento", "Obter a base e conferir as colunas.", "done"),
    ("Pre-processamento", "Preparar dados para os modelos.", "active"),
    ("Resultados", "Comparar metricas e discutir.", "pending"),
])

CQ.compare(
    "Antes",
    "Dados brutos e sem organizacao visual.",
    "Depois",
    "Notebook com secoes, metricas e fluxo documentado.",
    title="Comparacao do notebook",
)

HTML-first API

Every main visual component has a method that returns HTML and a matching method that displays it in a notebook.

card = UX.card_html("Dataset", "Resumo da base carregada.", variant="info")
table = UX.table_html(df.head(), title="Amostra")

UX.module(
    "Diagnostico",
    [
        UX.screen("Contexto", card),
        UX.screen("Tabela", table),
    ],
)

Use from notebookux import UX as CQ when migrating notebooks that already use a short CQ helper name.

Checks

python -m ruff check .
python -m pyright
python -m pytest --cov=notebookux --cov-report=term-missing
python -m build
python -m mkdocs build --strict

Release

Releases are published by GitHub Actions when a v* tag is pushed. The PyPI project must be configured with Trusted Publishing for repository jyrikes/notebookux, workflow release.yml and environment pypi.

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

notebookux-0.1.0.tar.gz (50.7 kB view details)

Uploaded Source

Built Distribution

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

notebookux-0.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for notebookux-0.1.0.tar.gz
Algorithm Hash digest
SHA256 708dd15fbfa120085f0447d29ed45f47c425f5ae5a421f64429d6b1e8ce26651
MD5 29e65b261dca4f83d3810d1437a63552
BLAKE2b-256 32b08985d9aec2a45fa198077468fef63cc15222983805ab79d69d90be262805

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for notebookux-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57fd440737970108012c4f13f08d897f1633de60fcf871b4ce22f97d6d2642d3
MD5 daa1b99ccfb479e84b0aa78802c9f050
BLAKE2b-256 4656d2e6d90f2cea31be18ccc8d4671d604c99970f59a319bd36d990a2252ef8

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