๐Ÿ“ฝ 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 similarity measurer on two programming assignments on Online Judge.

A similarity measurer on two programming assignments on Online Judge. Algorithm implementation details are at here. Install Recommend OS: Ubuntu 20.04

StardustDL 6 May 21, 2022
Izy - Python functions and classes that make python even easier than it is

izy Python functions and classes that make it even easier! You will wonder why t

5 Jul 04, 2022
Semester long, web application project for CSCI 4370/6370 (Database Management)

Database_Project Prototype ideas for website: Computer Science library (Sells books, products, etc.) Code editor Graph visualizer / creator (can save

Jordan Harman 4 Feb 17, 2022
Reload all Blender add-on modules

Reload-Addon This add-on creates a list of the modules that the add-on selected in the drop-down menu contains and reloads them with the keyboard shor

2 Dec 02, 2021
The Zig programming language, packaged for PyPI

Zig PyPI distribution This repository contains the script used to repackage the releases of the Zig programming language as Python binary wheels. This

Zig Programming Language 100 Nov 04, 2022
ๅŒ—ๅคง้€‰่ฏพ็ฝ‘2021ๅนดๆ˜ฅๅญฃ้ชŒ่ฏ็ ่ฏ†ๅˆซ

ๅŒ—ๅคง้€‰่ฏพ็ฝ‘้ชŒ่ฏ็ ่ฏ†ๅˆซ 2021 ๅนดๆ˜ฅๅญฃๅญฆๆœŸ Powered by Elector Quartet (@Rabbit, @xmcp, @SpiritedAwayCN, @gzz) ๆ•ฐๆฎ้›†ๆ่ฟฐ ๆœ€ๅˆ็š„ๆ•ฐๆฎ้›†ไธบ 5130 ๅผ ไบบๅทฅๆ ‡่ฎฐ็š„้ชŒ่ฏ็ ๏ผŒไน‹ๅŽๅˆฉ็”จๆ—ฉๆœŸ่ฎญ็ปƒๅฅฝ็š„ๆจกๅž‹ๅœจ้€‰่ฏพ็ฝ‘ไธŠ่ฟ›่กŒ่‡ชๅŠจ้ชŒ่ฏ (่‡ชไธพ)๏ผŒๅˆๆ”ถ้›†

Rabbit 27 Sep 17, 2022
Telegram bot to remove the forwarded tag from messages.

Anonymous Sender Bot @AnonySendBot Telegram bot to remove the forwarded tag from messages. Table of Contents Usage Deploy To Heroku Local Deploying En

Stark Bots 26 Nov 24, 2022
Blender Add-on to Add Metal Materials to Your Scene

Blender QMM (Quick Metal Materials) Blender Addon to Add Metal Materials to Your Scene Installation Download the latest ZIP from Releases. Usage This

Don Schnitzius 27 Dec 26, 2022
An extended, game oriented, turtle

Burtle A Better TURTLE. Makes making games easier. write less do more!! Documentation & guide: https://alannxq.github.io/burtle/ Installation pip inst

5 May 19, 2022
A Python software implementation of the Intel 4004 processor

Pyntel4004 A Python software implementation of the Intel 4004 processor. General Information Two pass assembler using the original mnemonics, directiv

alshapton 5 Oct 01, 2022
Blender addon that simplifies access to useful operators and adds missing functionality

Quick Menu is a Blender addon that simplifies common tasks Compatible with Blender 3.x.x Install through Edit - Preferences - Addons - Install... -

passivestar 94 Dec 27, 2022
Manjaro CN Repository

Manjaro CN Repository Automatically built packages based on archlinuxcn/repo and manjarocn/docker. Install Add manjarocn to /etc/pacman.conf: Please m

Manjaro CN 28 Jun 26, 2022
Program Input Data Mahasiswa Oop

PROGRAM INPUT NILAI MAHASISWA MENGGUNAKAN OOP PENGERTIAN OOP object-oriented-programing/OOP adalah paradigma pemrograman berdasarkan konsep "objek", y

Maulana Reza Badrudin 1 Jan 05, 2022
A funny alarm clock I made in python

Wacky-Alarm-Clock Basically, I kept forgetting to take my medications, so I thought it would be a fun project to code my own alarm clock and make it r

1 Nov 18, 2021
Read and write life sciences file formats

Python-bioformats is a Python wrapper for Bio-Formats, a standalone Java library for reading and writing life sciences image file formats. Bio-Formats

CellProfiler 106 Dec 19, 2022
Slimbook Battery 4 is the new version with new features that improves battery control and increases battery duration in laptops.

Slimbookbattery Slimbook Battery 4 is the new version with new features that improves battery control and increases battery duration in laptops. This

SLIMBOOK TEAM 128 Dec 28, 2022
This application demonstrates IoTVAS device discovery and security assessment API integration with the Rapid7 InsightVM.

Introduction This repository hosts a sample application that demonstrates integrating Firmalyzer's IoTVAS API with the Rapid7 InsightVM platform. This

Firmalyzer BV 4 Nov 09, 2022
Exercise to teach a newcomer to the CLSP grid to set up their environment and run jobs

Exercise to teach a newcomer to the CLSP grid to set up their environment and run jobs

Alexandra 2 May 18, 2022
Polypheny Connector for Python

Polypheny Connector for Python This enables Python programs to access Polypheny databases, using an API that is compliant with the Python Database API

Polypheny 3 Jan 03, 2022
Biohacking con Python honeycon21

biohacking-honeycon21 This repository includes the slides of the public presentation 'Biohacking con Python' in the Hack&Beers of HoneyCON21 (PPTX and

3 Nov 13, 2021