A pure Python implementation of NetworkTables, used for robot communications in the FIRST Robotics Competition.
75
Build a small helper that keeps table entries aligned with supported data types while allowing explicit type overrides and flag configuration for persistence.
None or a mixed-type list) raises a ValueError without writing to the entry. @testallow_retype=True replaces the stored value and updates the entry to the new type. @testallow_retype=False, attempting to write a different type leaves the previous value untouched and returns that prior value. @test@generates
class EntryTypeController:
def __init__(self, table_path: str): ...
def set_typed(self, key: str, value):
"""
Store a value if it matches a supported data type.
Raises a ValueError for unsupported types.
"""
def apply_override(self, key: str, value, allow_retype: bool = False):
"""
Write a value, retyping the entry only when allow_retype is True.
Returns the value currently stored after the operation.
"""
def mark_persistent(self, key: str, persistent: bool = True):
"""
Set or clear persistence on the entry without changing its data.
"""
def get_value(self, key: str, default=None):
"""
Read the current value for a key, returning default if the entry is missing.
"""
def get_flags(self, key: str) -> int:
"""
Return the current flag bitmask for a key.
"""Robot-oriented networked key-value store with typed entries, force-set overrides, and entry flag controls.
Install with Tessl CLI
npx tessl i tessl/pypi-pynetworktablesdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10