๐Ÿ“ฝ 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
[x]it! support for working with todo and check list files in Sublime Text

[x]it! for Sublime Text This Sublime Package provides syntax-highlighting, shortcuts, and auto-completions for [x]it! files. Features Syntax highlight

Jan Heuermann 18 Sep 19, 2022
Assignment for python course, BUPT 2021.

pyFuujinrokuDestiny Assignment for python course, BUPT 2021. Notice username and password must be ASCII encoding. If username exists in database, syst

Ellias Kiri Stuart 3 Jun 18, 2021
Org agenda in the console

This Python script reads an org agenda file (i.e. a regular org file with some active dates) and displays an interactive and colored year calendar with detailed information for each day when the mous

Nicolas P. Rougier 113 Jan 03, 2023
Certipy is a Python tool to enumerate and abuse misconfigurations in Active Directory Certificate Services (AD CS).

Certipy Certipy is a Python tool to enumerate and abuse misconfigurations in Active Directory Certificate Services (AD CS). Based on the C# variant Ce

ollypwn 1.3k Jan 01, 2023
An open-source Python project series where beginners can contribute and practice coding.

Python Mini Projects A collection of easy Python small projects to help you improve your programming skills. Table Of Contents Aim Of The Project Cont

Leah Nguyen 491 Jan 04, 2023
A project for the Qvault Hackathon, 2022-01-17

musical-octo-engine Steps to run brew install python-tk brew install portaudio

Erik Kristofer Anderson 2 May 17, 2022
โ†’ Plantilla de registro para Python

๐Ÿ”ง Pasos Necesarios CMD ๐Ÿ–ฅ๏ธ SOCKETS pip install sockets ๐ŸŽจ COLORAMA pip install colorama ๐Ÿ’ป Cรณdigo register-by-inputs from turtle import color # Impor

Panda.xyz 4 Mar 12, 2022
Solcast Integration for Home Assistant

Solcast Solar Home Assistant(https://www.home-assistant.io/) Component This custom component integrates the Solcast API into Home Assistant. Modified

Greg 45 Dec 20, 2022
HomeAssistant Linux Companion

Application to run on linux desktop computer to provide sensors data to homeasssistant, and get notifications as if it was a mobile device.

Javier Lopez 10 Dec 27, 2022
Make discord server By Coding!

Discord Server Maker Make discord server by Coding! FAQ How can i get role permissons? Open discord with chrome developer tool, go to network and clic

1 Jul 17, 2022
Advent of Code 2021 challenges

Data analysis Document here the project: AoC21 Description: Project Description Data Source: Type of analysis: Please document the project the better

Daniel Wendel 1 Jan 07, 2022
The code for 2021 MGTV AI Challenge Anti Stealing Link, and the online result ranks 10th.

่ต›้ข˜ไป‹็ป ่Š’ๆžœTV-็ฌฌไบŒๅฑŠโ€œ้ฉฌๆ ๅฑฑๆฏโ€ๅ›ฝ้™…้Ÿณ่ง†้ข‘็ฎ—ๆณ•ๅคง่ต›-้˜ฒ็›—้“พ ้š็€ไธšๅŠก็š„ๅ‘ๅฑ•๏ผŒ่Š’ๆžœ็š„่ง†้ข‘ๅ†…ๅฎนไนŸๆทฑๅ—็ฝ‘ๅ‹็š„ๅ–œๆฌข๏ผŒไธๅฐ‘่ง†้ข‘็ฝ‘็ซ™ๅ’Œๅบ”็”จๅผ€ๅง‹็›—ๆ’ญ่Š’ๆžœ็š„่ง†้ข‘ๅ†…ๅฎน๏ผŒ็›—้“พ็ฝ‘็ซ™ไธ็ป่ฟ‡่Š’ๆžœTV็š„ๅ‰็ซฏ็ณป็ปŸ๏ผŒ่ทณ่ฟ‡ๅนฟๅ‘Šๆ’ญๆ”พ๏ผŒไธ”ๆถˆ่€—ๅคง้‡็š„ๆœๅŠกๅ™จใ€ๅธฆๅฎฝ่ต„ๆบ๏ผŒ็›ดๆŽฅ็ป™ๅ…ฌๅธๅธฆๆฅไบ†ๅทจๅคง็š„็ปๆตŽๆŸๅคฑ๏ผŒๅ› ๆญค้˜ฒ็›—้“พๅœจๆ—ฅๅธธ่ฟ่ฅไธญๆ˜พๅพ—ๅฐคไธบ้‡่ฆ

tongji40 16 Jun 17, 2022
Open source home automation that puts local control and privacy first

Home Assistant Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiast

Home Assistant 57k Jan 02, 2023
Calc.py - A powerful Python REPL calculator

Calc - A powerful Python REPL calculator This is a calculator with a complex sou

Alejandro 8 Oct 22, 2022
A python program for rick rolling people.

Rickware A python program for rick rolling people. (And annoying them too) What is rick roll? Read this wikipedia article - Rickrolling About program

2 Jan 18, 2022
๐Ÿ Make Thinc faster on macOS by calling into Apple's native Accelerate library

๐Ÿ Make Thinc faster on macOS by calling into Apple's native Accelerate library

Explosion 81 Nov 26, 2022
Learning a Little about Containerlab

Learning a Little about Containerlab Hello all. This is the respository based on this blog post. Getting Started Feel free to use this example. You wi

10 Oct 16, 2022
A collection of common regular expressions bundled with an easy to use interface.

CommonRegex Find all times, dates, links, phone numbers, emails, ip addresses, prices, hex colors, and credit card numbers in a string. We did the har

Madison May 1.5k Dec 31, 2022
๐Ÿ’ป Algo-Phantoms-Backend is an Application that provides pathways and quizzes along with a code editor to help you towards your DSA journey.๐Ÿ“ฐ๐Ÿ”ฅ This repository contains the REST APIs of the application.โœจ

Algo-Phantom-Backend ๐Ÿ’ป Algo-Phantoms-Backend is an Application that provides pathways and quizzes along with a code editor to help you towards your D

Algo Phantoms 44 Nov 15, 2022
A python script providing an idea of how a MindSphere application, e.g., a dashboard, can be displayed around the clock without the need of manual re-authentication on enforced session expiration

A python script providing an idea of how a MindSphere application, e.g., a dashboard, can be displayed around the clock without the need of manual re-authentication on enforced session expiration

MindSphere 3 Jun 03, 2022