Skip to main content

Track changes to mutable data types.

Project description

Build Status Documentation Status Version Info


A library for Python 2 and 3 that can track changes to mutable data types.

With spectate complicated protocols for managing updates, don't need to be the outward responsibility of a user, and can instead be done automagically in the background. For instance, syncing the state between a server and client can controlled by spectate so user's don't have to.



  • stable
pip install spectate
  • pre-release
pip install spectate --pre
  • master
pip install git+
  • developer
git clone && cd spectate/ && pip install -e . -r requirements.txt

At A Glance

If you're using Python 3.6 and above, create a model object

from spectate import mvc

l = mvc.List()

Register a view function to it that observes changes

def printer(l, events):
    for e in events:

Then modify your object and watch the view function react

l[0] = 1
l.extend([2, 3])
{'index': 0, 'old': Undefined, 'new': 0}
{'index': 0, 'old': 0, 'new': 1}
{'index': 1, 'old': Undefined, 'new': 2}
{'index': 2, 'old': Undefined, 'new': 3}

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for spectate, version 0.4.1
Filename, size File type Python version Upload date Hashes
Filename, size spectate-0.4.1-py3-none-any.whl (25.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size spectate-0.4.1.tar.gz (18.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page