boardify
A web-based dashboard to analyzing your data with Python
Installation
pip3 install boardify
Usage
from boardify import BaseDashboard, BaseBlock, BarChart
# Class for the dashboard
class FruitDashboard(BaseDashboard):
def config(self):
self.name = "Fruit Company"
# Add Blocks to the dashboard
self.add_block(Products)
self.add_block(NicestFruit)
# Block contains HTML Code
class Products(BaseBlock):
def config(self):
self.name = "Products"
self.description = "A list of our products"
def generate(self):
return """<ul>
<li>Apple</li>
<li>Orange</li>
<li>Banana</li>
<li>Kiwifruit</li>
<li>Blueberry</li>
<li>Grapes</li>
</ul>"""
# Block renders a bar chart
class NicestFruit(BarChart):
def config(self):
self.name = "Nicest Fruit"
self.description = ("A survey of 145 people asked them "
"\"Which is the nicest fruit?\"")
def data(self):
return {
"datasets": {
"Survey One": [35, 20, 45, 10, 30, 5],
"Survey Two": [30, 25, 60, 5, 35, 0],
},
"labels": ["Apple",
"Orange",
"Banana",
"Kiwifruit",
"Blueberry",
"Grapes"],
"background_color": ["rgb(128, 18, 2)",
"rgb(244, 132, 0)",
"rgb(246, 221, 0)",
"rgba(83, 65, 25, 0.97)",
"rgb(35, 123, 214)",
"rgb(99, 74, 161)"]
}
# Run the server
dashboard = FruitDashboard()
dashboard.run()
Open the dashboard at http://localhost:7000
Made with
Meta
Lucas Hild - https://lucas-hild.de
This project is licensed under the MIT License - see the LICENSE file for details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
boardify-0.5.2.tar.gz
(4.2 kB
view details)
File details
Details for the file boardify-0.5.2.tar.gz.
File metadata
- Download URL: boardify-0.5.2.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ec72adcdee275d6a8428600b4ec361e521eab633570b8a552681019ea6fb871
|
|
| MD5 |
92ad456503770e76d35e7a7e01763b49
|
|
| BLAKE2b-256 |
e62737c144a98059bc88aa59d76a19472c5c9c41bf11464ef763031ef227c631
|