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.5.tar.gz (3.8 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.5-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jac_streamlit-0.0.5.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.12 Linux/6.11.0-1018-azure

File hashes

Hashes for jac_streamlit-0.0.5.tar.gz
Algorithm Hash digest
SHA256 38059f8104b86a913fddd8632c7d22764eaf446c55c163011eff69a86ecf34ca
MD5 86b26d41f6e746a608589b5ef7f46aad
BLAKE2b-256 492c600709f654c8e2c6fbd047d63ba8ad210f04dfac18a50ae0c559279712b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jac_streamlit-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.12 Linux/6.11.0-1018-azure

File hashes

Hashes for jac_streamlit-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c747ac7a4b6405a2abab43c9ac78b89e58eefb33ae9856ffce20e0cd372e8f25
MD5 bedd00ee46d3b8eb88e2b742958500ce
BLAKE2b-256 e12aa93443656cdd7335aa277aba16e277140eee532bca78de384375d4b3f481

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