Skip to main content

Streamlit integration plugin for Jac programming language - enables running and visualizing Jac applications in Streamlit

Project description

Jac-Streamlit Plugin

The jac-streamlit plugin provides seamless integration between the Jac programming language and Streamlit, enabling you to create interactive web applications and visualizations directly from Jac code.

Features

  • Direct Execution: Run Streamlit apps written in Jac with a single command
  • Graph Visualization: Interactive and static visualization of Jac graph structures
  • Testing Framework: Comprehensive testing support for Jac-Streamlit applications
  • Cross-Platform: Works on Windows, macOS, and Linux

Installation

pip install jac-streamlit

Quick Start

Running Jac Streamlit Applications

Execute a Streamlit app written in Jac:

jac streamlit app.jac

Visualizing Jac Graphs

Visualize your Jac graph structures in an interactive web interface:

jac dot_view app.jac

This opens a Streamlit application with two visualization modes:

  • Interactive View: Using streamlit-agraph for dynamic graph exploration
  • Static View: Using pygraphviz for traditional graph rendering

Testing

The plugin includes a testing framework compatible with Streamlit's testing methodology:

from jaclang_streamlit import AppTest

# Create test instance from Jac file
app_test = AppTest.from_jac_file("path/to/your/app.jac")

# Run the app and perform tests
app = app_test.run()
assert len(app.exception) == 0

Example

Here's a simple Jac Streamlit application:

import streamlit as st;

with entry {
    st.title("Hello Jac Streamlit!");
    name = st.text_input("Enter your name");
    if st.button("Greet") and name {
        st.success(f"Hello, {name}!");
    }
}

Requirements

  • Python 3.12+
  • Jac programming language (jaclang)
  • Streamlit 1.38+

Documentation

For comprehensive documentation and examples, visit jac-lang.org.

License

MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jac_streamlit-0.0.6.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jac_streamlit-0.0.6-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file jac_streamlit-0.0.6.tar.gz.

File metadata

  • Download URL: jac_streamlit-0.0.6.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for jac_streamlit-0.0.6.tar.gz
Algorithm Hash digest
SHA256 07a5290efd3519aba258f48912e869f2609f09da71bd823507092b14b81f3ff0
MD5 25eaec98403c63a42bdcc9a72b3f07ea
BLAKE2b-256 3ab35718387137081f233e873418ed6ff79c44c8c7696de03d012bc65b2357cd

See more details on using hashes here.

File details

Details for the file jac_streamlit-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: jac_streamlit-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for jac_streamlit-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5b5a71ddc820e7deba382446050acc1d2638e01a0d972c9a987cb6d029181c49
MD5 d85cbe866f222ca66c200e180076f3ee
BLAKE2b-256 1883c7c354585928636d4910608b07b10ed4ed3e7dd332e00b58900b3fe7f9af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page