Metadata-Version: 2.1
Name: llm-jupyter
Version: 0.0.2
Summary: Run a IPython interpreter in the LLM virtual environment
Author: Simon Willison
Author-email: Lucas Rangel Cezimbra <lucas@cezimbra.tec.br>
License: Apache-2.0
Project-URL: Homepage, https://github.com/lucasrcezimbra/llm-jupyter
Project-URL: Changelog, https://github.com/lucasrcezimbra/llm-jupyter/releases
Project-URL: Issues, https://github.com/lucasrcezimbra/llm-jupyter/issues
Project-URL: CI, https://github.com/lucasrcezimbra/llm-jupyter/actions
Classifier: License :: OSI Approved :: Apache Software License
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ipython
Requires-Dist: llm
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

# llm-jupyter

[![PyPI](https://img.shields.io/pypi/v/llm-jupyter.svg)](https://pypi.org/project/llm-jupyter/)
[![Changelog](https://img.shields.io/github/v/release/lucasrcezimbra/llm-jupyter?include_prereleases&label=changelog)](https://github.com/lucasrcezimbra/llm-jupyter/releases)
[![Tests](https://github.com/lucasrcezimbra/llm-jupyter/workflows/Test/badge.svg)](https://github.com/lucasrcezimbra/llm-jupyter/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/lucasrcezimbra/llm-jupyter/blob/main/LICENSE)

Run a IPython interpreter in the LLM virtual environment

## Installation

Install this plugin in the same environment as [LLM](https://llm.datasette.io/).
```bash
llm install llm-jupyter
```
## Usage

This plugin adds a new `ipython` command to LLM. This executes IPython in the same virtual environment as LLM itself.

You can use this to check the Python version

```bash
llm ipython --version
# Should output '8.20.0' or similar
```
Or to start a IPython shell. In that shell you can import `llm` and use it to interact with models:
```bash
llm ipython
```

## Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:
```bash
git clone git@github.com:lucasrcezimbra/llm-jupyter.git
cd llm-jupyter
python -m venv .venv
source .venv/bin/activate
pip install -e .[test]
```
Now install the dependencies and test dependencies:
```bash
llm install -e '.[test]'
```
To run the tests:
```bash
pytest
```
