Skip to main content

OntoBDC View

License: Apache 2.0

ontobdc-view is the distributable browser presentation package for OntoBDC-generated views.

It ships Web Components and other browser assets as Python package data so the OntoBDC CLI can resolve them locally and embed them into standalone offline HTML artifacts.

Install

pip install ontobdc-view

Python API

from ontobdc_view import component_path, read_component

path = component_path("onto-theme-tile.js")
source = read_component("onto-theme-tile.js")

read_component() is intended for generators that need to inline the JavaScript into a final HTML artifact.

Integrated Presentation Surface preview

This preview builds and opens a complete onto-presentation-surface containing all current demonstration Tiles at the same time:

  • Logo
  • Theme
  • Language
  • Photo

Light:

python test/surface_preview.py --preview light

Dark:

python test/surface_preview.py --preview dark

The Surface computes its own grid from the available browser width. Resize the browser window to force a new allocation. The Logo and Photo Tiles receive their allocated columns and rows from the Surface and adapt their representation. Theme and Language remain 1x1. Presentation events are printed in the browser console and the latest event is shown in the system log at the bottom of the page.

Component preview

The development preview script builds the selected component, generates a temporary standalone HTML file and opens it in the default browser.

General form:

python test/preview.py <component-path> --preview light|dark --columns N --rows N

Theme Tile

Light preview:

python test/preview.py src/ontobdc_view/assets/components/onto-theme-tile.js --preview light

Dark preview:

python test/preview.py src/ontobdc_view/assets/components/onto-theme-tile.js --preview dark

Language Tile

python test/preview.py src/ontobdc_view/assets/components/onto-language-tile.js --preview light
python test/preview.py src/ontobdc_view/assets/components/onto-language-tile.js --preview dark

Logo Tile

Mark only (1x1):

python test/preview.py src/ontobdc_view/assets/components/onto-logo-tile.js --preview light --columns 1 --rows 1

Logotype (3x1):

python test/preview.py src/ontobdc_view/assets/components/onto-logo-tile.js --preview light --columns 3 --rows 1

Logotype and slogan (3x2):

python test/preview.py src/ontobdc_view/assets/components/onto-logo-tile.js --preview dark --columns 3 --rows 2

Photo Tile

Image only (1x1):

python test/preview.py src/ontobdc_view/assets/components/onto-photo-tile.js --preview light --columns 1 --rows 1

Image with additional presentation space (2x2):

python test/preview.py src/ontobdc_view/assets/components/onto-photo-tile.js --preview light --columns 2 --rows 2

Large photo representation with caption and metadata (2x3):

python test/preview.py src/ontobdc_view/assets/components/onto-photo-tile.js --preview dark --columns 2 --rows 3

The --preview option controls the host surface only: light opens the component over a white surface and dark over a black surface. --columns and --rows emulate the logical area allocated to the Tile by a Presentation Surface.

Browser usage during development

<script type="module" src="./onto-theme-tile.js"></script>

<onto-theme-tile style="width:72px;height:72px"></onto-theme-tile>

The component uses a closed Shadow DOM and emits a composed theme-changed event:

document.addEventListener("theme-changed", event => {
  console.log(event.detail.theme);
});

Packaging model

The Python package is only the distribution mechanism. The browser assets remain plain JavaScript/Web Components.

Expected OntoBDC flow:

pip install ontobdc-view
        ↓
OntoBDC resolves installed assets
        ↓
OntoBDC reads the required component source
        ↓
OntoBDC embeds it in generated HTML
        ↓
standalone/offline artifact

ontobdc-view has its own version and release cycle, independent from the OntoBDC core runtime.

Metadata

Release files for ontobdc-view 0.4.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 ontobdc-view 0.4.0
File Size Uploaded
ontobdc_view-0.4.0.tar.gz 73.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ontobdc-view 0.4.0
File Interpreter ABI Platform
ontobdc_view-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 180.6 kB

Release files / ontobdc_view-0.4.0.tar.gz

Download URL ontobdc_view-0.4.0.tar.gz
Size 73.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f43209c5288da49b0d70b473d25c6f36ae31ab5de9fd51b59b658495d8d3e2a7
BLAKE2b-256 checksum
How to use checksums
cd963809e25482c44b2b3a6c8397a69ce1dd38c3843aacde3a245273ab0d65cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.

Transparency log

Release files / ontobdc_view-0.4.0-py3-none-any.whl

Download URL ontobdc_view-0.4.0-py3-none-any.whl
Size 107.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
418f40d3b4380b1303a8a9b1d47b246c02cd9dbe566c21ee3196e6a3e38fefdd
BLAKE2b-256 checksum
How to use checksums
25d3e8f52617cb03ae3c34d46944ac687bdfd0f63efac0d027fa52d2acf14faf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.

Transparency log

Release history Release notifications | RSS feed

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

This release

0.4.0 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

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