๐ŸŽˆ `st` is a CLI to quickly kick-off your new Streamlit project

Related tags

Command-line Toolsst
Overview

๐ŸŽˆ st - a friendly Streamlit CLI

st is a CLI that helps you kick-off a new Streamlit project so you can start crafting the app as soon as possible!

How it works

โœจ Simple as:

$ st .
demo_quick.mov

๐Ÿš€ Usage

Prerequisites

This is a working setup for anyone using Microsoft VS Code. Has been tested solely on Mac OSX.

Manually

  1. Install requirements:
pip install -r requirements.txt
  1. Make sure to enable your CLI to access VS Code. See this link.

  2. Add the alias to your ~/.bashrc:

# Alias for st
alias st='python ~/your/path/to/st/st.py -p'
  1. Source it:
source ~/.bash_profile

Getting started

Run:

$ st {directory}

Documentation

$ python st.py --help

Usage: st.py [OPTIONS]

Options:
  -p, --path TEXT                 Path where you want to create your Streamlit
                                  project.

  --open_project_in_vs_code INTEGER
                                  Open VS code with the newly created file.
  --run_app INTEGER               Run Streamlit script
  --open_app_in_browser INTEGER   Open Streamlit app in browser
  --help                          Show this message and exit.

Troubleshooting

xcode-select --install
Comments
  • Cookiecutter, tests and new API

    Cookiecutter, tests and new API

    ๐Ÿ“š Context

    Adding some work on top of what @snehankekre started! Inspired by thoughts in here

    ๐Ÿง  Description of changes

    On top of https://github.com/arnaudmiribel/st/pull/3:

    • Replaced pip with pip3 and python with python3
    • Added tests for GitHub URL validation and parsing
    • Better .gitignore!
    • Now using st-cookiecutter to enable customizing the template

    ๐Ÿ”ฅ In addition, now supporting...

    $python3 main.py
    Usage: main.py [OPTIONS] COMMAND [ARGS]...
    
      ๐ŸŽˆ Welcome to st ๐ŸŽˆ
    
      This is an experimental CLI to help you kick off and maintain Streamlit
      projects as fast as possible!
    
    Options:
      --help  Show this message and exit.
    
    Commands:
      clone  ๐Ÿ‘ฏ Clone an existing Streamlit project
      go     ๐Ÿ˜Ž Open VS Code and your app in Chrome!
      kill   ๐Ÿ”ซ Kill a given Streamlit app running locally!
      list   ๐Ÿคฏ List running Streamlit apps under ports 85**
      new    ๐Ÿ†• Create a new Streamlit project from an empty template
    
    • clone:
    python3 main.py clone https://github.com/arnaudmiribel/stoggle/blob/main/streamlit_app.py 
    โž• Cloning repo https://github.com/arnaudmiribel/stoggle
    โž• Changing directory to 'app/'
    โž• Creating a new environment with venv
    โž• Installing dependencies
    DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
    DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
    WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
    You should consider upgrading via the '/usr/local/opt/[email protected]/bin/python3.9 -m pip install --upgrade pip' command.
    โž• Opening project in VS Code...
    โž• Running app...
    
    • list:
    $python3 main.py list
    
    Let's look at your apps running locally...
                           App URL
    App ID                        
    1110    http://localhost:8501 
    
    • kill:
    $python3 main.py kill --id 1110
    Killing 1110...
    
    • new:
    $python3 main.py new
    
    You just asked for a `new` Streamlit project. Let's go!
    New directory name [app]: 
    Want to customize the template? [y/N]: y
    Title of your app [Balloons]: Surfin' USA
    Will you be using secrets? [Y/n]:  
    Will your app use more than one page? [Y/n]: 
    Are you connecting to Snowflake in this app? [y/N]: y
    
    
    ๐ŸŽ‰ Successfully created your new Streamlit app in directory 'app'!
    

    ๐Ÿ–ฅ๏ธ Test!

    1. Clone this repo and go on this branch
    2. Now go ahead and try out python3 main.py!
    opened by arnaudmiribel 2
  • Support GitHub url of main script

    Support GitHub url of main script

    :books: Context

    @arnaudmiribel you had mentioned that you'd someday like to support st {template}, where template is a GitHub repo. This PR makes incremental progress towards that vision.

    :brain: Description of changes

    • Supports st {template}, where template is the GitHub (.py) url of the main script. E.g.

      st https://github.com/streamlit/streamlit-example/blob/master/streamlit_app.py
      
    • Creates a virtualenv with venv

    TODO

    • Refactor into functions to more conveniently reuse code
    • Support Conda, Poetry
    opened by snehankekre 1
  • added a couple new features

    added a couple new features

    Hey @arnaudmiribel, I thought it might be interesting to add a snowflake flag that automatically adds space in the secrets file for usernames, passwords, etc, and also adds a sample query. This isn't exactly ready yet (mostly because the streamlit app doesn't work OOB with this setup), but I just wanted to toss this idea by you (i'm also super bored)

    opened by tylerjrichards 1
  • Refactoring + CI

    Refactoring + CI

    • Split all main.py into multiple files, one for the entrypoint and one for each command (within their own subdirectory)
    • Remove unused functions
    • Set up GitHub Action for releases to PyPi
    opened by arnaudmiribel 0
  • Show main file name in `st list`

    Show main file name in `st list`

    Shows the Streamlit apps' main file name in the output of st list:

    $python3 main.py list
    
    Let's look at your apps running locally...
                           App URL          Main file
    App ID                                           
    6487    http://localhost:8501              yes.py
    7121    http://localhost:8502             user.py
    9239    http://localhost:8505   get_mainscript.py
    
    opened by snehankekre 0
Releases(v0.1.1)
  • v0.1.0(Sep 11, 2022)

    What's Changed

    • Support GitHub url of main script by @snehankekre in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/3
    • Show main file name in st list by @snehankekre in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/5
    • Cookiecutter, tests and new API by @arnaudmiribel in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/4
    • Pass directory name even if not customizing template by @blackary in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/6
    • Handle cases where python is a substring of the command by @blackary in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/7
    • Refactoring + CI by @arnaudmiribel in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/8

    New Contributors

    • @snehankekre made their first contribution in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/3
    • @arnaudmiribel made their first contribution in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/4
    • @blackary made their first contribution in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/6

    Full Changelog: https://github.com/arnaudmiribel/streamlit-kickoff-cli/commits/v0.0.4

    Source code(tar.gz)
    Source code(zip)
Owner
Arnaud
Arnaud
A Command Line Error Parser Built using Python.

"Stalk Overflow with debuggy" Error Parser Everything is done in Python so it's extremely easy to install and use. Supports Python 3. Debuggy is used

Derhnyel 22 Nov 10, 2022
A python package to display progress of loops to the user

ProgressBars A python package to display progress of loops to the user. Installation This package can be installed using pip. pip install progressbars

Matthias 3 Jan 16, 2022
Python CLI vm manager for remote access of docker images via noVNC

vmman is a tool to quickly boot and view docker-based VMs running on a linux server through noVNC without ssh tunneling on another network.

UCSD Engineers for Exploration 1 Nov 29, 2021
This is the public repo for the VS Code Extension AT&T i386/IA32 UIUC-ECE391 Syntax Highlighting

AT&T i386 IA32 UIUC ECE391 GCC Highlighter & Snippet & Linter This is the VS Code Extension for UIUC ECE 391, MIT 6.828, and all other AT&T-based i386

Jackgetup 1 Feb 05, 2022
Chameleon is yet another PowerShell obfuscation tool designed to bypass AMSI and commercial antivirus solutions.

Chameleon is yet another PowerShell obfuscation tool designed to bypass AMSI and commercial antivirus solutions. The tool has been developed as a Python port of the Chimera project, by tokioneon_.

332 Dec 26, 2022
xonsh is a Python-powered, cross-platform, Unix-gazing shell

xonsh is a Python-powered, cross-platform, Unix-gazing shell language and command prompt.

xonsh 6.7k Dec 31, 2022
Multifunctional library for creating progress bars.

๐Ÿ‘‹ Content Installation Using github Using pypi Quickstart Flags Useful links Documentation Pypi Changelog TODO Contributing FAQ Bar structure โš™๏ธ Inst

DenyS 27 Jan 01, 2023
An question and answer shell environment based on xonsh using ansible for setup

An question and answer shell environment based on xonsh using ansible for setup

Steven Hollingsworth 2 Jan 11, 2022
Get latest astronomy job and rumor news in your command line

astrojobs Tired of checking the AAS job register and astro rumor mill for job news? Get the latest updates in the command line! astrojobs automaticall

Philip Mocz 19 Jul 20, 2022
A CLI tool for searching and watching videos on youtube with no spyware and MPV and yt-dlp

A CLI tool for searching and watching videos on youtube with no spyware and MPV and yt-dlp

TruncatedDinosour 3 Feb 22, 2022
Hack-All is a simple CLI tool that helps ethical-hackers to make a reverse connection without knowing the target device in use is it computer or phone

Hack-All is a simple CLI tool that helps ethical-hackers to make a reverse connection without knowing the target device in use is it computer

LightYagami17 5 Nov 22, 2022
a GUI app base on warp-cli for linux

warp cloudflare gui a GUI app base on warp-cli for linux Installation read warp-cli install doc. install warp-cli and register with $ warp-cli registe

Moein Aghamirzaei 58 Jan 01, 2023
Investing library and command-line interface inspired by the Bogleheads philosophy

Lakshmi (Screenshot of the lak command in action) Background This project is inspired by Bogleheads forum. Bogleheads focus on a simple but powerful p

Sarvjeet Singh 108 Dec 26, 2022
Easily handle day to day CLI operation via Python instead of regular Bash programs.

pz Ever wished to use Python in Bash? Would you choose the Python syntax over sed, awk, ...? Should you exactly know what command would you use in Pyt

CZ.NIC 697 Jan 03, 2023
๐Ÿ—ƒ๏ธ Fileio-cli wrapper for fileioapi.py with fire.py, inspiration DOS

๐Ÿ—ƒ๏ธ File.io File.io simply upload a file, share the link, and after it is downloaded, the file is completely deleted. An API wrapper for the file.io w

nkot56297 2 May 12, 2022
A simple python script to execute a command when a YubiKey is disconnected

YubiKeyExecute A python script to execute a command when a YubiKey / YubiKeys are disconnected. โ€โ€โ€Ž โ€Ž How to use: 1. Download the latest release and d

6 Mar 12, 2022
Python library & console tool for controlling Xiaomi smart appliances

python-miio This library (and its accompanying cli tool) can be used to interface with devices using Xiaomi's miIO and MIoT protocols. Getting started

Teemu R. 2.4k Jan 02, 2023
๐ŸฆŽ A NeoVim plugin for highlighting visual selections like in a normal document editor!

๐ŸฆŽ HighStr.nvim A NeoVim plugin for highlighting visual selections like in a normal document editor! Demo TL;DR HighStr.nvim is a NeoVim plugin writte

Pocco81 222 Jan 03, 2023
Pequeno joguinho pra vocรช rodar no seu terminal

JokenPython Pequeno joguinho pra vocรช rodar no seu terminal Olรก! Joguinho legal pra vc rodar no seu terminal!! (rode no terminal, pra melhor experienc

Scott 4 Nov 25, 2021
Urial (URI Addition tooL) intelligently updates URIs stored in Finder comments of macOS files

Urial Urial (URI addition tool) is a simple but intelligent command-line tool to add or replace URIs found inside macOS Finder comments. Table of cont

Mike Hucka 3 Sep 14, 2022