← Back to list

agilab-streamlit-pages
by ThalesGroup
AGILAB project purpose is to explore AI for engineering. It is designed to help engineers quickly experiment with AI-driven methods.
⭐ 3🍴 1📅 Jan 22, 2026
SKILL.md
name: agilab-streamlit-pages description: Streamlit page authoring patterns for AGILAB (session_state safety, keys, rerun, UX). license: BSD-3-Clause (see repo LICENSE) metadata: updated: 2026-01-09
Streamlit Pages Skill (AGILAB)
Use this skill when editing:
src/agilab/AGILAB.pysrc/agilab/pages/*.pysrc/agilab/apps-pages/*/src/*/*.py
Session State Rules (Avoid Common Crashes)
-
Never assign
st.session_state["k"] = …after a widget withkey="k"was created.- Prefer
st.session_state.setdefault("k", default)before the widget. - Or use widget return values and compute derived state separately.
- Prefer
-
If you need to “reset” a widget value:
- Use a different key (versioned key pattern), or
- Gate the reset behind a rerun and only mutate state before widget creation.
Recommended Pattern
- Initialize defaults with
setdefaultat the top of the page. - Render widgets.
- Read values from widgets, compute derived state, store under different keys.
Rerun API
- Do not use
st.experimental_rerun(); usest.rerun().
Key Hygiene
- Every widget must have a stable, unique key.
- Prefer namespaced keys:
f\"{page_id}:df_files\", not"df_files".
Score
Total Score
70/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon