mince 🔪🧄🧅
mince is a toolkit for slicing up data into bite-sized dashboards
The goal of mince is to minimize the effort required to build and maintain dashboards
mince provides a single coherent interface to help with many different dashboard-related tasks:
- ETL: data exploration, design of queries, execution of queries, persistent data storage
- UI: data visualization, custom interactive buttons
- hosting: building images, deploying images, network configuration
- live updates: collecting, storing, and serving data diffs efficiently
Table Of Contents
Getting started
1. Installation
pip install mince
2. Define a new Dashboard class
Every mince dashboard needs 1) a data collector function and 2) a specification for how to display data
from mince import Dashboard, CollectKwargs, UiSpec
import polars as pl
class SomeNewDash(Dashboard):
@classmethod
async def async_collect_data(cls, **kwargs: Unpack[CollectKwargs]) -> dict[str, pl.DataFrame]:
...
@classmethod
def load_spec(cls) -> UiSpec:
...
3. (optional) Register dashboard
Adding a dashboard to the local registry makes it possible to refer to dashboards by name instead of by class
python:
mince.register(SomeNewDash)
cli:
mince register some_module_name.SomeNewDash
4. Collect dashboard data
The collector function should return a dict of polars dataframes, which mince will then store in its data directory.
python:
await mince.async_collect_dashboard_data(SomeNewDash)
# or, if registered: mince.async_collect_dashboard_data('some_new_dash')
cli:
mince collect some_new_dash
5. Run dashboard
Running the dashboard loads the most recently collected data and serves a UI on a local port (such as http://localhost:8052)
python:
mince.run_dashboard(SomeNewDash)
# or, if registered: mince.run_dashboard('some_new_dash')
cli:
mince run some_new_dash
Environment
MINCE_ROOTroot directory where mince stores collected data, default~/data/minceMINCE_REGISTRYpath to mince registry, defaultMINCE_ROOT/mince_registry.json
Data Collection
[WIP]
Data storage
Design goals
- use same path structure for local filesystem vs web urls
- allow atomic updates for groups of files
UI Specification
[WIP]
Command Line Interface
The mince cli aims to automate as many of these tasks as possible
- run dashboard
mince run ... --pdb - run dashboard with interactive debugger
mince run ... --pdb - list info about all running dashboards
mince ls
- disk caching of loaded datasets for quick dashboard restarts
- standardized hooks for data collection
mince collect <DASHBOARD> - cli generator to create a management cli for each dashboard
<DASHBOARD> <SUBCOMMAND> ... - easily load a dashboard's data into an interactive python session
mince data <DASHBOARD> -i
Custom CLI's
- bypasses the registry
- takes config settings using arguments
- is meant to be intended within each dashboard package
Metadata
Release files for mince 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mince-0.2.4.tar.gz | 81.0 kB | Without provenance | Details for mince-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mince-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for mince-0.2.4-py3-none-any.whl |
Total release size: 187.9 kB
Release files / mince-0.2.4.tar.gz
| Download URL | mince-0.2.4.tar.gz |
|---|---|
| Size | 81.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bd026b2b1406e49e0cb6622b572ab9e04e68e214b568de8fbf804b51a885047
|
|
BLAKE2b-256 checksum How to use checksums |
3d867499b230b3417f80de7d36083d04ae6a539674987db93616ff6dec8acfb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.3
|
Release files / mince-0.2.4-py3-none-any.whl
| Download URL | mince-0.2.4-py3-none-any.whl |
|---|---|
| Size | 106.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2b232533251cdf05082858c8a5615e8451a40c4841e970b8aaacfd3d8cda5b6
|
|
BLAKE2b-256 checksum How to use checksums |
459ac7dcbd7a41578147c56770ce1a43646e89323b28c2180ce7ec6d96c75543
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.3
|
Security for mince 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.