Metadata-Version: 2.4
Name: pyxel-config-lab-jupyter
Version: 0.3.1
Summary: Open the Pyxel Config Lab UI directly inside a Jupyter notebook as an embedded iframe.
Author: Doby Baxter
License-Expression: MIT
Project-URL: Homepage, https://gitlab.com/dobybaxter127/pyxel-config-lab/-/tree/main/pyxel-config-lab-jupyter
Project-URL: Source, https://gitlab.com/dobybaxter127/pyxel-config-lab
Project-URL: Issues, https://gitlab.com/dobybaxter127/pyxel-config-lab/-/issues
Keywords: jupyter,jupyterlab,notebook,pyxel,iframe
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Framework :: Jupyter
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ipython
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# Pyxel Config Lab for Jupyter 🪐

**Pyxel Config Lab for Jupyter** opens the **Pyxel Config Lab** interface
directly inside a Jupyter notebook as an embedded iframe — no JavaScript,
no labextension build, no extra setup.

---

## ✨ Features

- Launches the Pyxel Config Lab UI straight from a notebook cell
- Pure Python — uses `IPython.display` to embed the live app
- Works in JupyterLab and the classic Notebook

---

## 🧩 Installation

```bash
pip install pyxel-config-lab-jupyter
```

PyPI: https://pypi.org/project/pyxel-config-lab-jupyter/

> The embedded Lab is the hosted site, so a notebook needs network access to
> show it, and always shows the latest deploy.

---

## 🚀 Usage

In any notebook cell:

```python
from pyxel_config_lab_jupyter import open_pyxel_config_lab

open_pyxel_config_lab()
```

The Pyxel Config Lab UI appears in the cell output. You can pass a custom
height in pixels:

```python
open_pyxel_config_lab(height=800)
```

---

The HTML itself is available without a kernel, which is handy for testing or
for embedding the Lab somewhere other than a notebook:

```python
from pyxel_config_lab_jupyter import iframe_html

print(iframe_html(height=800))
```

---

## 🛠️ Troubleshooting

If the output area is blank:

- Make sure the notebook is **trusted** (File > Trust Notebook), then re-run
  the cell. Untrusted notebooks strip iframes from cell output.
- The live site at https://pyxel-config-lab-ede25c.gitlab.io/ permits
  embedding, so a blank frame is not a framing restriction on its side. If you
  are pointing the iframe at a self-hosted copy instead, that copy must not
  send a restrictive `X-Frame-Options` or CSP `frame-ancestors` header.

---

## 🧪 Tests

```bash
pip install -e ".[test]"
pytest
```

The tests check the emitted HTML: the iframe points at the live site, the
requested height is respected, and the sandbox grants only what the Lab
needs.

---

## 📜 License

MIT © 2025 Doby Baxter
