Skip to main content

Backend for server-configured charts powered by Vega Altair.

Project description

chartlets

chartlets is a Python framework for server-configured web-UI contributions.

Run demo server

mamba env create
conda activate chartlets
python -m chartlets.demo.server 

How to use the framework

1. Implement the possible contributions

Implement the application-specific contributions that users can add to their extensions.

As an example, see panel.py of the demo:

from chartlets import Contribution


class Panel(Contribution):
    """Panel contribution"""

    def __init__(self, name: str, title: str | None = None):
        super().__init__(name, title=title)

2. Define the contributions points

Define the possible contribution points in your application.

As an example, see server.py of the demo:

from chartlets import Extension
from chartlets.demo.contribs import Panel

Extension.add_contrib_point("panels", Panel)

3. Load the extensions

Load the extensions that augment your application.

As an example, see server.py of the demo:

from chartlets import ExtensionContext

ext_ctx = ExtensionContext.load(app_ctx, extension_refs)

4. Publish the extensions

Implement the Chartlets API in your application-specific webserver using the controller implementations in chartlets.controllers.

As an example, see server.py of the demo.

5. Consume the extensions

Use JavaScript package chartlets in your frontend to implement the contribution lifecycle in your React application.

As an example, see the demo application.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

chartlets-0.0.16-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file chartlets-0.0.16-py3-none-any.whl.

File metadata

  • Download URL: chartlets-0.0.16-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for chartlets-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 038a8004aea1185e3c8f048034e29bea2af3a9abc113aa7902f3b0ef59856399
MD5 17da519ddbbeff117175feb59c48e15c
BLAKE2b-256 1432d8d74615288a798e529c554463cf8955aa31fd2152a387bac1e25b9b313c

See more details on using hashes here.

Supported by

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