Skip to main content

Foxglove WebSocket server (deprecated in favor of foxglove-sdk)

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Foxglove WebSocket server

⚠️ Important Notice: This package is no longer maintained and has been replaced by foxglove-sdk. We recommend migrating to the Foxglove SDK for future development.

This package provides a server implementation of the Foxglove WebSocket protocol with examples. The protocol enables Foxglove to ingest arbitrary “live” streamed data.

Example servers

This package includes example servers demonstrating how to use JSON and Protobuf data. To install additional dependencies required for the examples, run:

$ pip install 'foxglove-websocket[examples]'

Run a simple example server that publishes messages on a single example_msg topic:

  • JSON server – Uses JSON to encode message data and JSON Schema to describe the message layout.

    python -m foxglove_websocket.examples.json_server
    
  • Protobuf server – Uses Protobuf to encode message data.

    python -m foxglove_websocket.examples.protobuf_server
    

Note: You must exit each server (control + c) before starting up another.

To see data from any server, open Foxglove with a Foxglove WebSocket connection to ws://localhost:8765/:

Foxglove displaying data from the example server

To customize each server for your specifications, copy either server into a separate file like server.py and make the desired adjustments to this template. Start up your server from the command line, using python3 server.py.

Multi-threaded usage

The threaded_server example demonstrates how to use the FoxgloveServer class in a thread-safe way when interacting with a threaded middleware. Run the server using:

python -m foxglove_websocket.examples.threaded_server

When connected to the server in Foxglove, use the Data Source Info panel to see channels appearing and disappearing, and a Plot panel to visualize data on each channel.

image

For a more detailed explanation, read the example's source code.

Development

When developing or maintaining the foxglove-websocket package, it is recommended to use pipenv to manage development dependencies and virtualenv.

  • pipenv install --dev – Create a virtualenv and install development dependencies
  • pipenv shell – Enter the virtualenv

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

foxglove_websocket-0.1.4.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

foxglove_websocket-0.1.4-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file foxglove_websocket-0.1.4.tar.gz.

File metadata

  • Download URL: foxglove_websocket-0.1.4.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for foxglove_websocket-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2ec8936982e478d103dd90268a572599fc0cce45a4ab95490d5bc31f7c8a8af8
MD5 de45f7c0a573c8b902510653bd0d7df9
BLAKE2b-256 dbb5df32ac550eb0df9000ed78d872eb19738edecfd88f47fe08588d5066f317

See more details on using hashes here.

Provenance

The following attestation bundles were made for foxglove_websocket-0.1.4.tar.gz:

Publisher: ci.yml on foxglove/ws-protocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foxglove_websocket-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for foxglove_websocket-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 772e24e2c98bdfc704df53f7177c8ff5bab0abc4dac59a91463aca16debdd83a
MD5 2e8e72e62292ee70ac8f841c349e1f74
BLAKE2b-256 c4733a3e6cb864ddf98800a9236ad497d32e5b50eb1682ac659f7d669d92faec

See more details on using hashes here.

Provenance

The following attestation bundles were made for foxglove_websocket-0.1.4-py3-none-any.whl:

Publisher: ci.yml on foxglove/ws-protocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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