No project description provided
Project description
Shellviz Python Library
Shellviz is a zero-hassle Python tool that transforms your data into dynamic, real-time visualizations you can explore right in your browser. It's lightweight, free, and has no dependencies — just install and start visualizing!
🛠️ Installation
Install Shellviz with pip:
pip install shellviz
🔧 Getting Started
Basic Usage
from shellviz import log, table, json
log('my first shellviz command')
# Shellviz serving on http://127.0.0.1:5544
table([("Alice", 25, 5.6), ("Bob", 30, 5.9)])
json({"name": "Alice", "age": 25, "height": 5.6})
Open the generated URL in your browser, and you'll see your data visualized instantly.
Advanced Usage
Update Existing Values
from shellviz import progress
progress(0.0, id='migration')
progress(1.0, id='migration') # Update data dynamically
Django Integration
Querysets and Models
Shellviz can encode Queryset and Model instances, so you can visualize ORM queries without having to serialize them
from shellviz import json, card
json(request.user)
card(User.objects.all())
Django Logging
Shellviz has an optional drop-in logging handler that can automatically initialize a Shellviz instance and forward all logging calls to it
LOGGING = {
'handlers': {
'shellviz': {
'class': 'shellviz.django_logging.ShellvizHandler',
#...
},
}
}
Django Debug Toolbar
Shellviz can be configured to launch as a tab in the Django Debug Toolbar
DEBUG_TOOLBAR_PANELS = [
#...
'shellviz.django_debug_toolbar.ShellvizPanel'
#...
]
Build
Bundling and deploying Shellviz is straightforward. To automate the process of building the client, copying the necessary files, and compiling the Python package, use the provided build_with_latest_client.py script:
# From the libraries/python directory:
python build_with_latest_client.py
This script will:
- Build the Shellviz client (runs
npm installandnpm run buildin the client directory) - Copy the built client files into the Python package
- Build the Python package using Poetry
Once this is done, you can publish the package to PyPI:
poetry publish
To install into a local python environment, run the following command:
poetry add --no-cache ~/[path-to-repo]/dist/shellviz-0.x.x-py3-none-any.whl
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shellviz-0.4.3.tar.gz.
File metadata
- Download URL: shellviz-0.4.3.tar.gz
- Upload date:
- Size: 416.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.17 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
161922443428e6d79c8d6e19a8a58b63a16a08942131c100f53b3108c4346e5a
|
|
| MD5 |
536186d250a05421eaff598412248826
|
|
| BLAKE2b-256 |
4e236e1dc5ad8463b84329548764e1e200dd697e8c879c76144f33339c756a98
|
File details
Details for the file shellviz-0.4.3-py3-none-any.whl.
File metadata
- Download URL: shellviz-0.4.3-py3-none-any.whl
- Upload date:
- Size: 420.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.17 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b5d05318308bbbb250dccc13138533465a2a4fa59d4561bfb74e9da5565b051
|
|
| MD5 |
d7e3ab43abad289b919ff5652101bb6f
|
|
| BLAKE2b-256 |
f5c0e868977537b3391694c2bd5515a8dfb28a71ecd74f17b0496f0e401c8df9
|