Skip to main content

No project description provided

Project description

specta 🌟

Github Actions Status Documentation Status Try on lite

A JupyterLite app to present your Jupyter documents in different ways

Specta is a custom JupyterLite app for rendering notebooks and Jupyter‑supported files in multiple modes: dashboards, blog‑style articles, fullscreen viewers, and more. It is built on top of JupyterLite, which allows you to share your documents through alternative interfaces to the IDE-like JupyterLab.

Features

Multi-mode Notebook Rendering

Render notebooks in:

  • Dashboard mode – structured panels for interactive widgets and outputs.
  • Article mode – a minimal, blog-like reading experience.
  • Slides mode – a fullscreen presentation mode.

Clean Viewer for all Jupyter-supported file types

View any Jupyter-supported file using Specta's clean viewer with all Jupyter UI elements removed.

Preview from JupyterLab

A specta preview can be launched directly from JupyterLab, letting users verify how their documents will look when published.

Try it online!

You can try it online by clicking on this badge:

Try on lite

Installation and Usage

You can install specta using pip or conda

# Install using pip
pip install specta

# Install using conda
conda install -c conda-forge specta

Once installed, you can build your JupyterLite app, a specta app will be included automatically in the output directory of jupyterlite:

jupyter lite build

Then serve the contents of the output directory (by default ./_output) using any static file server. You can access the Specta app at the /specta/ path.

Specta Configuration

Available layouts

Specta comes with three built-in layouts:

  • default: The default layout, which renders the notebook as a dashboard.
  • article: A minimal, blog-like reading experience.
  • slides: A fullscreen presentation mode using reveal.js.

Top-level configuration

Specta can be configured using the typicall JupyterLite configuration file: jupyter-lite.json. You can add a spectaConfig key to the jupyter-config-data section of this file to customize the Specta app.

The following options are available:

  • defaultLayout: The default layout when opening a file.
  • executionDelay: Delay (in miliseconds) before executing cells.
  • hideTopbar: Boolean flag to show or hide the top bar.
  • topBar: Configuration for the top bar.
  • slidesTheme: The theme for the slides layout. The list of available themes can be found here.
  • loadingName: The string shown during the loading of specta (default to Loading Specta) only available globally not per file.
      "topBar": {
        "icon": "url to the icon file, it's shown on the left of the top bar",
        "title": "Title on the left of the top bar",
        "themeToggle": "Boolean flag to show/hide the theme selector",
        "textColor": "Color of the text on the top bar",
        "background": "Background color of the top bar"
      },
  • perFileConfig: an object with key is the file path and value is the above configuration, it's used to have different layout/top bar config for each files, for example:
      "perFileConfig": {
        "blog.ipynb": {
          "hideTopbar": false,
          "defaultLayout": "article",
          "topBar": {
            "title": "My blog",
            "themeToggle": false
          }
        },
        "slides.ipynb": {
          "hideTopbar": true,
          "slidesTheme": "sky"
        }
      }

Notebook metadata configuration

In addition to the global configuration, you can also configure the layout and top bar for each notebook by using the notebook metadata. You can use the Specta App Config of the Property Inspector panel of JupyterLab to edit the notebook metadata.

Metadata

Notebook cell configuration

By default, when you open a notebook in Specta, all code cells are hidden, and placeholder skeletons are shown instead at the position of the cell. You can configure the visibility of each cell by using the Specta cell metadata toolbar.

Cell toolbar

By opening the Property Inspector panel of JupyterLab and selecting the Specta Cell Config section, you can change the display of each cell as follows:

  • Show cell source: use this toggle to show or hide the cell source code. Default to false
  • Show output placeholder: use this toggle to show or hide the output skeleton. Default to true
  • Output size: use this dropdown to select the size of the cell output. Default to Small

Slides layout configuration

For the slides layout, you can set the cells as a sub-slide for vertical slide or a fragment using the Slide Type field in the Common Tools section of the Property Inspector panel.

Slide tool

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

specta-0.3.3.tar.gz (8.0 MB view details)

Uploaded Source

Built Distribution

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

specta-0.3.3-py3-none-any.whl (7.8 MB view details)

Uploaded Python 3

File details

Details for the file specta-0.3.3.tar.gz.

File metadata

  • Download URL: specta-0.3.3.tar.gz
  • Upload date:
  • Size: 8.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for specta-0.3.3.tar.gz
Algorithm Hash digest
SHA256 d3e647621e358dbf517b7d84de592ae1f79570b83a185ba90a6416f3ab4542e2
MD5 7f0acf99bafac125fd97cd3fe3681db0
BLAKE2b-256 82d082dc5d6091f91acf374256efd9265a5652744251a75758a663090445f165

See more details on using hashes here.

File details

Details for the file specta-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: specta-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 7.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for specta-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 11ea67a2f8c77b07e0b0c37a43e6cb7f317f157520e04a3cbd4568ed63e170b1
MD5 4363c3f973f38ef5f2105c2dd8b9063f
BLAKE2b-256 b64737e8a7eea131f6e8ab0b457d065285c056461cc40d5a109e8a8cb6b430cf

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