Metadata-Version: 2.4
Name: agi-pages
Version: 2026.5.22
Summary: AGILAB public analysis page umbrella and provider package
Author: Jean-Pierre Morard
Maintainer: Jean-Pierre Morard
License-Expression: BSD-3-Clause
Project-URL: Documentation, https://thalesgroup.github.io/agilab
Project-URL: Source, https://github.com/ThalesGroup/agilab/tree/main/src/agilab/lib/agi-pages
Project-URL: Issues, https://github.com/ThalesGroup/agilab/issues
Project-URL: Homepage, https://github.com/ThalesGroup/agilab
Project-URL: Repository, https://github.com/ThalesGroup/agilab
Project-URL: Discussions, https://github.com/ThalesGroup/agilab/discussions
Project-URL: Changelog, https://github.com/ThalesGroup/agilab/releases
Keywords: agilab,analysis,charts,streamlit,notebooks,evidence,dashboards,page-bundles
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: agi-gui==2026.05.22
Dynamic: license-file

# AGI Pages

[![PyPI version](https://img.shields.io/pypi/v/agi-pages.svg?cacheSeconds=300)](https://pypi.org/project/agi-pages/)
[![Python versions](https://img.shields.io/pypi/pyversions/agi-pages.svg)](https://pypi.org/project/agi-pages/)
[![License: BSD 3-Clause](https://img.shields.io/pypi/l/agi-pages)](https://opensource.org/licenses/BSD-3-Clause)

`agi-pages` is the umbrella/provider package for AGILAB public analysis views.
It exposes a small discovery API so the AGILAB ANALYSIS page and exported
notebooks can resolve installed view bundles without embedding the page source
in the root `agilab` wheel.

## Quick Install

```bash
pip install agi-pages
```

Most users should install it through the AGILAB UI profile:

```bash
pip install "agilab[ui]"
```

## Runtime Contract

The package exposes a small provider API:

```python
import agi_pages

print(agi_pages.bundles_root())
```

`agi-env` uses this provider only when `agi-pages` is installed. A base
`agilab` install remains CLI/core-only and does not require this package.

The default umbrella covers the shared AGILAB UI runtime. Specialized views
with narrower runtime constraints are published independently as `agi-page-*`
wheel/sdist payload packages. Install the page package you need alongside
`agi-pages` when a notebook or app depends on that view.

## Portable Chart Specs

`agi-pages` also exposes a lightweight chart contract for page bundles that need
the same dataframe-driven visualization to work in Streamlit, exported
notebooks, and static proof artifacts.

```python
import agi_pages

spec = agi_pages.build_chart_spec(
    [{"step": "train", "accuracy": 0.84}, {"step": "test", "accuracy": 0.82}],
    chart_type="line",
    title="Model metrics",
    x="step",
    y="accuracy",
)

agi_pages.render_streamlit(spec)
```

The spec stores an ECharts-compatible `option`, normalized table records, and a
small evidence block with deterministic hashes for the data, chart option, and
combined chart contract. Page bundles can write `spec.as_dict()` into a proof
artifact, render `agi_pages.render_notebook(spec)` from an exported notebook, or
embed `agi_pages.chart_spec_to_static_html(spec)` in a standalone HTML report.
