Skip to main content

ganglion

Ganglion is an application which serves Textual apps on the web.

Compatibility

Tested on Linux / macOS. It may well run on Windows, but this is as yet untested.

Installing

Ganglion is best installed as a standalone app.

The easiest way of doing this is with uv:

uv tool install ganglion

You should find the ganglion command on your path. Confirm the installation was successful by running:

ganglion

Setting up the database

Run the following to create a database:

ganglion initdb

This will create a sqllite database "ganglion.db" in the current directory.

Serving

To run a Ganglion server, enter the following command:

ganglion serve

You can also add DEBUG=1 when running locally to see prettier and more verbose logs:

DEBUG=1 ganglion serve

You can run a test client (for debugging) with the following command:

ganglion client

Clients

To serve a Textual web app or apps install textual-web. Follow the instructions on the textual-web repository to run apps, but add -e local to connect to a local server.

For example, so serve the Textual demo you could run the following:

textual-web -r "python -m textual" -e local

Configuration

You can configure Ganglion via a TOML configuration file. The path to this configuration file may be set in the env var GANGLION_CONFIG, or with the --config in the serve command (and others).

Here's the default, internal configuration:

[server]
# The base URL where ganglion serves from
base_url = "http://127.0.0.1:8080"
# The URL for applications
app_url_format = "http://127.0.0.1:8080/{account}/{application}"
# The websocket URL where applications are served from
app_websocket_url = "ws://127.0.0.1:8080"

[templates]
# Root directory for templates
root = "${GANGLION_DATA}/templates"

[static]
# Local directory where static assets are contained
root = "${GANGLION_DATA}/static"
# URL where static assets are served from
url = "/static/"

[db]
# sqlalchemy async database URL
url = "sqlite+aiosqlite:///./ganglion.db"
# Consider Postgres for production
#url = "postgresql+asyncpg://postgres:password@localhost/ganglion"

If you want to edit this configuration, copy it to "ganglion.toml" and run with the following command:

GANGLION_CONFIG=./ganglion.toml ganglion serve 

Alternatively, use the --config switch to set the configuration path:

ganglion serve --config ./ganglion.toml

Metadata

Release files for ganglion 0.1.1

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

Source distribution (sdist)

Source distribution for ganglion 0.1.1
File Size Uploaded Provenance
ganglion-0.1.1.tar.gz 346.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ganglion 0.1.1
File Interpreter ABI Platform
ganglion-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 609.9 kB

Release files / ganglion-0.1.1.tar.gz

Download URL ganglion-0.1.1.tar.gz
Size 346.0 kB
Tags Source
SHA-256 checksum
How to use checksums
490b26e0684c0e4f6d9f593f1fd031e9a14efca50c6c7d3220136f8f4007ca29
BLAKE2b-256 checksum
How to use checksums
94a1889683fc099aad473d7f82623b512f0f1f6a74274f463ce85bbcf31de077
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14

Release files / ganglion-0.1.1-py3-none-any.whl

Download URL ganglion-0.1.1-py3-none-any.whl
Size 264.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2daef07798be208e5044d1ada36a8a97b69d0e8c46b6576bb7682d6b1c566945
BLAKE2b-256 checksum
How to use checksums
f19481abb5c98387d5dbb90e386b959b63ba0e1501fe76d33e44d3d676033453
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14

Security for ganglion 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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