Metadata-Version: 2.1
Name: jaclang-streamlit
Version: 0.0.3
Summary: This Jac plugin adds a streamlit command line option for conveniently running streamlit apps written in Jac.
Home-page: https://jaseci.org
License: MIT
Keywords: jac,jaclang,jaseci,streamlit,visualization,graph
Author: Jason Mars
Author-email: jason@jaseci.org
Requires-Python: >=3.12.0,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pydot (>=3.0.1,<4.0.0)
Requires-Dist: streamlit (>=1.38.0,<2.0.0)
Requires-Dist: streamlit-agraph (>=0.0.45,<0.0.46)
Project-URL: Documentation, https://jac-lang.org
Project-URL: Repository, https://github.com/Jaseci-Labs/jaclang
Description-Content-Type: text/markdown

# jaclang_streamlit Plugin Documentation

The `jaclang_streamlit` plugin is a powerful tool that allows you to run and test Streamlit apps written in Jac. This documentation will guide you through the installation process and provide instructions on how to run and test your Jac Streamlit apps.

## Installation

To install the `jaclang_streamlit` plugin, you can use pip:

```shell
pip install jaclang_streamlit
```

## Running Jac Streamlit Apps

To run a Streamlit app written in Jac, you can use the following command:

```shell
jac streamlit app.jac
```

Replace `app.jac` with the path to your Jac Streamlit app file.

## Generating Graphs with Jac Streamlit

If you want to visualize the graph of your Jac Streamlit app in a browser, you can use the following command:

```shell
jac dot_view app.jac
```

This will open up a Streamlit app in your browser, displaying the graph of your Jac Streamlit app.

## Testing Jac Streamlit Apps

To test your Jac Streamlit app using the Streamlit testing framework, you can follow these steps:

1. Import the `AppTest` class from `jaclang_streamlit`:

```python
from jaclang_streamlit import AppTest
```

2. Use the `AppTest.from_jac_file(filename)` method to create an instance of `AppTest` for your Jac Streamlit app:

```python
app_test = AppTest.from_jac_file(filename)
```

Replace `filename` with the path to your Jac Streamlit app file.

3. You can now use the `app_test` instance to test your Jac Streamlit app using the Streamlit testing methodology.

Please note that the testing methodology for Jac Streamlit apps is similar to the one used for regular Streamlit apps.

