Skip to main content

This package provides a GUI application for browsing and executing Python scripts, with the intention to demonstrate how Enthought Tool Suite packages can be used.

The actual demonstration materials are not provided by this package.

How to run

After installing etsdemo, the application can be launched from the command line prompt:

$ etsdemo

It can also be launched programmatically. For example, from Python prompt:

>>> from etsdemo.main import main
>>> main()

How to contribute data via entry points

Any Python package can contribute data to be viewed from the application. To do so, define a function in the package that returns information about the data files. For example:

def info(request):
    # request is currently a placeholder, not used.
    return {
        "version": 1,
        # Name to be displayed in the node wrapping the data files.
        "name": "Project X Examples",
        # Path to a directory where data files can be found.
        "root": pkg_resources.resource_filename("my_project", "data"),
    }

Then add an entry point in setup.py that points to the newly created function. For example:

from setuptools import setup

setup(
    name="my_project",
    ...
    entry_points={
        "etsdemo_data": ["demo = my_project.info:info"],
    ...
)

Launch with specific data sources

Instead of launching the application with data collected from packages installed in the Python environment, the demo application can be launched with specific data sources:

from etsdemo.main import main
main(
    [
        {
            "version": 1,
            "name": "Project X Examples",
            "root": pkg_resources.resource_filename("my_project", "data"),
        },
        {
            "version": 1,
            "name": "Project X Demo",
            "root": pkg_resources.resource_filename("my_project", "demo"),
        },
    ]
)

Notice that the nested dictionaries follow the same schema specification described above.

Dependencies

Metadata

Release files for etsdemo 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for etsdemo 0.1.0
File Size Uploaded
etsdemo-0.1.0.tar.gz 48.7 kB Details

Release files / etsdemo-0.1.0.tar.gz

Download URL etsdemo-0.1.0.tar.gz
Size 48.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8cb21ede670c47015780d44ccbe9fd4f179c4f4eba59e044b38c4b4ba37714e2
BLAKE2b-256 checksum
How to use checksums
40fcce66a738b2f62ca20ea02c392bb1c61cd251c70779c71d76c8b6c9ae1067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page