Skip to main content

A streamlit extention to interact with Pollination Cloud

Project description

Streamlit Pollination

A collection of objects to facilitate working with Pollination in Streamlit.

Quickstart

import json
import pathlib

import hiplot
import numpy as np
import streamlit as st
from honeybee_vtk.model import HBModel, Model
from streamlit_pollination.selectors import job_selector
from streamlit_vtkjs import st_vtkjs

job = job_selector()

if job is not None:
    df = job.runs_dataframe

    st.markdown("## Runs Dataframe")
    plt = hiplot.Experiment.from_dataframe(df)
    plt.display_st()

    run_number = st.select_slider(
        'Select a run',
        options=range(0, df.shape[0])
    )

    run_row = df.iloc[run_number]
    model_path = run_row.model
    model_dict = json.load(job.download_artifact(model_path))
    hb_model = HBModel.from_dict(model_dict)
    vtk_model = Model(hb_model)
    key = run_row['run-id']
    file = pathlib.Path(vtk_model.to_vtkjs('data', key))
    st_vtkjs(file.read_bytes(), menu=True, key=key)

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

streamlit-pollination-0.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

streamlit_pollination-0.1.0-py2.py3-none-any.whl (9.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file streamlit-pollination-0.1.0.tar.gz.

File metadata

  • Download URL: streamlit-pollination-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/58.5.3 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.5

File hashes

Hashes for streamlit-pollination-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c9f026dd6a0c1490add519998283a8b22f57e99f5ec737d5ff155eb066bbe59a
MD5 d5811e41718dcfcce8ebbcbd9a58d0f9
BLAKE2b-256 43b9d0575bec01231196f8484286597716656f704cd6e6d2b3f5ec8c765748f7

See more details on using hashes here.

File details

Details for the file streamlit_pollination-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: streamlit_pollination-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/58.5.3 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.5

File hashes

Hashes for streamlit_pollination-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 72e27ac96d485e432e9bfa5eebefbe1a067b67186766cdb564ede2f57e2b9ccc
MD5 42ca69a55a2e6e5024b0cb44e6e2724a
BLAKE2b-256 216a0e924fdfb79cbe420d03363cd3d22c6a8449b797521a40e93519cb9ec278

See more details on using hashes here.

Supported by

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