CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-pynetworktables

tessl install tessl/pypi-pynetworktables@2021.0.0

A pure Python implementation of NetworkTables, used for robot communications in the FIRST Robotics Competition.

Agent Success

Agent success rate when using this tile

75%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.01x

Baseline

Agent success rate without this tile

74%

task.mdevals/scenario-3/

Default Session Bridge

Design a lightweight session helper that boots the package's default messaging instance in an in-memory mode, exposes its primary key-value table, and coordinates a local client connection for reading and writing values.

Capabilities

Start default service

  • Starting the session brings up the in-memory messaging service on the default instance using the configured identity and port, and it exposes the default table handle for subsequent operations. @test

Publish and read keys

  • After the service starts, publishing a key/value pair stores it in the default table and reading the same key returns the stored value. @test
  • Publishing a new value to an existing key overwrites the previous value and the latest value is returned when read. @test

Client observes updates

  • Once a local client connection is established, updates to keys in the default table are immediately visible when read through the session. @test

Clean shutdown and restart

  • Stopping the session cleanly shuts down the service and releases connections, and starting again yields an empty default table without any previously published keys. @test

Implementation

@generates

API

from typing import Any

class InstanceSession:
    def __init__(self, identity: str = "session", port: int = 0) -> None: ...
    def start(self) -> None: ...
    def connect_local_client(self) -> None: ...
    def publish(self, key: str, value: Any) -> None: ...
    def read(self, key: str) -> Any: ...
    def stop(self) -> None: ...

Dependencies { .dependencies }

pynetworktables { .dependency }

Provides default instance management, in-memory messaging, and table-based key/value access.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pynetworktables@2021.0.x
tile.json