Skip to main content

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:

  1. Build the Shellviz client (runs npm install and npm run build in the client directory)
  2. Copy the built client files into the Python package
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shellviz-0.4.3.tar.gz (416.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shellviz-0.4.3-py3-none-any.whl (420.1 kB view details)

Uploaded Python 3

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

Hashes for shellviz-0.4.3.tar.gz
Algorithm Hash digest
SHA256 161922443428e6d79c8d6e19a8a58b63a16a08942131c100f53b3108c4346e5a
MD5 536186d250a05421eaff598412248826
BLAKE2b-256 4e236e1dc5ad8463b84329548764e1e200dd697e8c879c76144f33339c756a98

See more details on using hashes here.

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

Hashes for shellviz-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2b5d05318308bbbb250dccc13138533465a2a4fa59d4561bfb74e9da5565b051
MD5 d7e3ab43abad289b919ff5652101bb6f
BLAKE2b-256 f5c0e868977537b3391694c2bd5515a8dfb28a71ecd74f17b0496f0e401c8df9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page