🎈 `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
Command-line script to upload videos to Youtube using theYoutube APIv3.

Introduction Command-line script to upload videos to Youtube using theYoutube APIv3. It should work on any platform (GNU/Linux, BSD, OS X, Windows, ..

Arnau Sanchez 1.9k Jan 09, 2023
Chat In Terminal - Chat-App in python

Chat In Terminal Hello all. πŸ˜‰ Sockets and servers are vey important for connection and importantly chatting with others. πŸ˜‚ 😁 I have thought of maki

Shreejan Dolai 5 Nov 17, 2022
vimBrain is a brainfuck-based vim-inspired esoteric programming language.

vimBrain vimBrain is a brainfuck-based vim-inspired esoteric programming language. vimBrainPy Currently, the only interpreter available is written in

SalahDin Ahmed 3 May 08, 2022
NudeNet wrapper made to provide a simple cli interface to the library

Nudenet Wrapper. Small warpper script for NudeNet Made to provide a small and easy to use cli interface with the library. You can indicate a single im

1 Oct 20, 2021
πŸ’»VIEN is a command-line tool for managing Python Virtual Environments.

vien VIEN is a command-line tool for managing Python Virtual Environments. It provides one-line shortcuts for: creating and deleting environments runn

ArtΡ‘m IG 5 Mar 19, 2022
Write Django management command using the click CLI library

Django Click Project information: Automated code metrics: django-click is a library to easily write Django management commands using the click command

Jonathan Stoppani 215 Dec 19, 2022
Simple command line tool to train and deploy your machine learning models with AWS SageMaker

metamaker Simple command line tool to train and deploy your machine learning models with AWS SageMaker Features metamaker enables you to: Build a dock

Yasuhiro Yamaguchi 5 Jan 09, 2022
Output Analyzer for you terminal commands

Output analyzer (OZER) You can specify a few words inside config.yaml file and specify the color you want to be used. installing: Install command usin

Ehsan Shirzadi 1 Oct 21, 2021
Jupyter notebook client in neovim

πŸͺ Jupyter-Nvim Read jupyter notebooks in neovim Note: The plugin is still in alpha stage πŸ‘Ύ Usage Just open any *.ipynb file and voila! ✨ Contributin

Ahmed Khalf 85 Dec 29, 2022
A begginer reverse shell tool python.

A begginer tools for hacking. The theme of this repository is to bring some ready-made open-source tools for anyone new to the world of hacking. This

Dio brando 2 Jan 05, 2022
AlienFX is a CLI and GUI utility to control the lighting effects of your Alienware computer.

AlienFX is a Linux utility to control the lighting effects of your Alienware computer. At present there is a CLI version (alienfx) and a gtk GUI versi

Stephen Harris 218 Dec 26, 2022
Neovim integration for Google Keep, built using gkeepapi

Gkeep.nvim Neovim integration for Google Keep, built using gkeepapi Requirements Neovim 0.5 Python 3.6+ A patched font (optional. Used for icons) Tabl

Steven Arcangeli 143 Jan 02, 2023
A simple note taker CLI program written in python

note-taker A simple note taker program written in python This allows you to snip your todo's, notes, and your tasks easily without extra charges Requi

marcusz 4 Nov 02, 2021
Dynamically Generate GitHub Stats as like Terminal Interface

GitHub Stats Terminal Style Dynamically Generate GitHub Stats as like Terminal Interface Usage Create a New Repository using this Template or click he

YOGESHWARAN R 63 Jan 03, 2023
The Prisma Cloud CLI is a command line interface for Prisma Cloud by Palo Alto Networks.

Prisma Cloud CLI The Prisma Cloud CLI is a command line interface for Prisma Cloud by Palo Alto Networks. Support This project has been developed by P

Palo Alto Networks 13 Oct 14, 2022
A Python module and command line utility for working with web archive data using the WACZ format specification

py-wacz The py-wacz repository contains a Python module and command line utility for working with web archive data using the WACZ format specification

Webrecorder 14 Oct 24, 2022
Dart Version Manager CLI implemented with Python and Typer.

Dart Version Manager CLI implemented with Python and Typer.

EducUp 6 Jun 26, 2022
Ros command - Unifying the ROS command line tools

Unifying the ROS command line tools One impairment to ROS 2 adoption is that all

37 Dec 15, 2022
A simple weather tool. I made this as a way for me to learn Python, API, and PyPi packaging.

A simple weather tool. I made this as a way for me to learn Python, API, and PyPi packaging.

Clint E. 105 Dec 31, 2022
doq (python docstring generator) extension for coc.nvim

coc-pydocstring doq (python docstring generator) extension for coc.nvim Install CocInstall: :CocInstall coc-pydocstring vim-plug: Plug 'yaegassy/coc-p

yaegassy 27 Jan 04, 2023