๐Ÿ“ฝ Streamlit application powered by a PyScaffold project setup

Overview

Project generated with PyScaffold

streamlit-demo

Streamlit application powered by a PyScaffold project setup.

Work in progress: The idea of this repo is to demonstrate how to package a streamlit app using PyScaffold. Since streamlit currently doesn't support apps as proper Python packages, this example is still suboptimal. Following Github issue was created to improve the current situation.

The structure was created with:

putup --dsproject streamlit-demo -p git_overview \
      -d "Streamlit application powered by a PyScaffold project setup." \
      -u https://github.com/pyscaffold/streamlit-demo

then the actual code was taken from git-overview (MIT-licensed) and changed into a proper Python package layout.

The advantages over the original codebase are:

  1. wheel file for distribution can be easily build with tox -e build,
  2. unit tests can be easily added in the tests folder,
  3. extract-repo is now a shell command (available after installation) instead of a script repo.py,
  4. git_overview is a Python package that could be reused by other Python projects after installation,
  5. all the other advantages of a PyScaffold layout...

Installation & Running the dashboard

In order to set up the necessary environment:

  1. create and activate the environment streamlit-demo with the help of conda:
    conda env create -f environment.yml
    conda activate streamlit-demo
    or use environment.lock.yml to recreate an environment with pinned dependencies.

NOTE: The conda environment will have streamlit-demo installed in editable mode. Some changes, e.g. in setup.cfg, might require you to run pip install -e . again.

  1. run the dashboard with:

    streamlit run scripts/show_dashboard.py
  2. or (optionally) build a docker image and run it with:

    docker build -t local/streamlit-demo:latest .
    docker run -p 8501:8501 local/streamlit-demo:latest
  3. open the dashboard at http://localhost:8501.

Project Organization

โ”œโ”€โ”€ AUTHORS.md              <- List of developers and maintainers.
โ”œโ”€โ”€ CHANGELOG.md            <- Changelog to keep track of new features and fixes.
โ”œโ”€โ”€ CONTRIBUTING.md         <- Guidelines for contributing to this project.
โ”œโ”€โ”€ Dockerfile              <- Build a docker container with `docker build .`.
โ”œโ”€โ”€ LICENSE.txt             <- License as chosen on the command-line.
โ”œโ”€โ”€ README.md               <- The top-level README for developers.
โ”œโ”€โ”€ docs                    <- Directory for Sphinx documentation in rst or md.
โ”œโ”€โ”€ environment.yml         <- The conda environment file for reproducibility.
โ”œโ”€โ”€ pyproject.toml          <- Build configuration. Don't change! Use `pip install -e .`
โ”‚                              to install for development or to build `tox -e build`.
โ”œโ”€โ”€ scripts                 <- Entry-script `show_dashboard.py` for streamlit
โ”œโ”€โ”€ setup.cfg               <- Declarative configuration of your project.
โ”œโ”€โ”€ setup.py                <- [DEPRECATED] obsolete way of building and installation.
โ”œโ”€โ”€ src
โ”‚   โ””โ”€โ”€ git_overview        <- Actual Python package `git-overview` with the main functionality.
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ”œโ”€โ”€ dashboard.py    <- Layout-function of the actual dashboard.
โ”‚       โ”œโ”€โ”€ repo.py         <- Functions to download repo data.
โ”‚       โ””โ”€โ”€ utils.py        <- Some dashboard-related helpers
โ”œโ”€โ”€ tests                   <- Unit tests which can be run with `pytest`.
โ”œโ”€โ”€ .coveragerc             <- Configuration for coverage reports of unit tests.
โ”œโ”€โ”€ .isort.cfg              <- Configuration for git hook that sorts imports.
โ””โ”€โ”€ .pre-commit-config.yaml <- Configuration of pre-commit git hooks.

This structure is in strong contrast to the original one:

โ”œโ”€โ”€ app
โ”‚   โ”œโ”€โ”€ dashboard.py        <- Dashboard entry-point
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ repo.py             <- Script to download repo data
โ”‚   โ””โ”€โ”€ utils.py            <- Some dashboard-related helpers
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ requirements.txt

Note

This project has been set up using PyScaffold 4.1.1.post1.dev28+g075b76f and the dsproject extension 0.6.1.post28+g91ab61a.

Owner
PyScaffold
Python project template generator with batteries included
PyScaffold
A Linux webcam plugin for BGMv2 as used in our demos.

The goal of this repository is to supplement the main Real-Time High Resolution Background Matting repo with a working demo of a videoconferencing plu

Andrey Ryabtsev 144 Dec 27, 2022
Python Interactive Graphical System made during Computer Graphics classes (INE5420-2021.1)

PY-IGS - The PYthon Interactive Graphical System The PY-IGS Installation To install this software you will need these dependencies (with their thevelo

Enzo Coelho Albornoz 4 Dec 03, 2021
Winxp_python3.6.15 - Python 3.6.15 For Windows XP SP3

This is Python version 3.6.15 Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. See the end of this file for further copyright

Alex Free 13 Sep 11, 2022
XHacks 2021 Startup Track Winner: Be Heard. Educate, Enact, Empower. No voice left behind. (backend)

Be Heard: X Hacks 2021 Submission Educate, Enact, Empower. No voice left behind. Inspiration To say 2020 was an eventful year would be an understateme

3 Jul 14, 2022
A deployer and package manager for OceanBase open-source software.

OceanBase Deploy OceanBase Deploy ๏ผˆ็ฎ€็งฐ OBD๏ผ‰ๆ˜ฏ OceanBase ๅผ€ๆบ่ฝฏไปถ็š„ๅฎ‰่ฃ…้ƒจ็ฝฒๅทฅๅ…ทใ€‚OBD ๅŒๆ—ถไนŸๆ˜ฏๅŒ…็ฎก็†ๅ™จ๏ผŒๅฏไปฅ็”จๆฅ็ฎก็† OceanBase ๆ‰€ๆœ‰็š„ๅผ€ๆบ่ฝฏไปถใ€‚ๆœฌๆ–‡ไป‹็ปๅฆ‚ไฝ•ๅฎ‰่ฃ… OBDใ€ไฝฟ็”จ OBD ๅ’Œ OBD ็š„ๅ‘ฝไปคใ€‚ ๅฎ‰่ฃ… OBD ๆ‚จๅฏไปฅไฝฟ็”จไปฅไธ‹ๆ–น

OceanBase 59 Dec 27, 2022
Change your Windows background with this program safely & easily!

Background_Changer Table of Contents: About the Program Features Requirements Preview Credits Reach Me See Also About the Program: You can change your

Sina.f 0 Jul 14, 2022
Hands-on machine learning workshop

emb-ntua-workshop This workshop discusses introductory concepts of machine learning and data mining following a hands-on approach using popular tools

ISSEL Soft Eng Team 12 Oct 30, 2022
Bitflip Fault Simulation Platform by Daniele Rizzieri (2021)

BFSP [v1.05] Bitflip Fault Simulation Platform by Daniele Rizzieri (2021) The platform injects a random bitflip in each of N copies of a binary file.

Daniele Rizzieri 2 Nov 05, 2022
UF3: a python library for generating ultra-fast interatomic potentials

Ultra-Fast Force Fields (UF3) S. R. Xie, M. Rupp, and R. G. Hennig, "Ultra-fast interpretable machine-learning potentials", preprint arXiv:2110.00624

Ultra-Fast Force Fields 24 Nov 13, 2022
A GUI love Calculator which saves all the User Data in text file(sql based script will be uploaded soon). Interative GUI. Even For Admin Panel

Love-Calculator A GUI love Calculator which saves all the User Data in text file(sql based script will be uploaded soon). Interative GUI, even For Adm

Adithya Krishnan 1 Mar 22, 2022
It converts ING BANK account historic into a csv file you can import in HomeBank application.

ing2homebank It converts your ING Bank account historic csv file into another csv file you can import in HomeBank application

1 Feb 14, 2022
Object-oriented programming (OOP) is a method of structuring a program by bundling related properties and behaviors into individual objects. In this tutorial, youโ€™ll learn the basics of object-oriented programming in Python.

06_Python_Object_Class Introduction ๐Ÿ‘‹ Objected oriented programming as a discipline has gained a universal following among developers. Python, an in-

Milaan Parmar / ะœะธะปะฐะฝ ะฟะฐั€ะผะฐั€ / _็ฑณๅ…ฐ ๅธ•ๅฐ”้ฉฌ 239 Dec 20, 2022
VCM EE1.2 P-layer feature map anchor generation 137th MPEG-VCM

VCM EE1.2 P-layer feature map anchor generation 137th MPEG-VCM

IPSL 6 Oct 18, 2022
Laurence Billingham 1 Feb 16, 2022
The most hackable keyboard in all the land

MiRage Modular Keyboard ยฉ 2021 Zack Freedman of Voidstar Lab Licensed Creative Commons 4.0 Attribution Noncommercial Share-Alike The MiRage is a 60% o

Zack Freedman 558 Dec 30, 2022
EFB Docker image with efb-telegram-master and efb-wechat-slave

efb-wechat-docker EFB Docker image with efb-telegram-master and efb-wechat-slave Features Container run by non-root user. Support add environment vari

Haukeng 1 Nov 10, 2022
Framework To Ease Operating with Quantum Computers

QType Framework To Ease Operating with Quantum Computers Concept # define an array of 15 cubits:

Antonio Pรกrraga Navarro 2 Jun 06, 2022
Shopping-card - Shopping Card Project With Python

Shopping Card Project this application was built to handle problems with saving

moein98 1 May 06, 2022
A play store search module

A play store search module

Fayas Noushad 5 Dec 01, 2021
A telegram bot which programed to countdown.

countdown-vi this is a telegram bot which programed to countdown. usage well, first you should specify a exact interval. there is 5 column, very first

Arya Shabane 3 Feb 15, 2022