Skip to content

New tag-based API spec #1550

@whitphx

Description

@whitphx

Tag selections for files.

<streamlit-app>
<!-- For backward compatibility -->
<app-file name="app.py">
</app-file>

<!-- New prefix "st-*" for better clarity -->
<st-file>
</st-file>

<!-- Child elements don't have to have hyphens in their names -->
<file>
</file>

<!-- Tags such as script are considered as literal block where line-breaks matters -->
<!-- This should solve https://github.com/whitphx/stlite/issues/1549 -->
<script type="py" name="app.py">
</script>

<!-- To make it spec-compliant, non-standard attributes should be prefixed with "data-*" -->
<script type="py" data-name="app.py">
</script>
</streamlit-app>

Installation spec

With consideration of #1502, mapping the tag-based expressions to micropip.install() API.

<streamlit-app>
<st-install deps="false">
package-A
package-B
  <st-constraints>
  dep-X==0.1.1
  dep-Y<2
  </st-constraints>
</st-install>
</streamlit-app>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions