Tutti logo

Distributed Synchronization for Python

Introduction

Tutti provides synchronization primitives that let you keep distributed systems synchronized. The API mirrors that of the synchronization primitives in the builtin threading module. It currently ships with a Redis backend, but more providers are in the works.

Installing Tutti

You can install the latest version of tutti using pip

$ pip install tutti

Redis Configuration

You’ll need to have a redis instance somewhere, by default it looks for an instance running on the local machine, but the connection can be configured using environment variables: TUTTI_REDIS_HOST, TUTTI_REDIS_PORT, TUTTI_REDIS_DB

Getting Started

from tutti import Lock, Semaphore


with Lock():
    print("Synchronized across machines!")
    access_critical_resource()

with Semaphore(value=2):
    print("Semaphores too!")
    access_less_critical_resource()

Roadmap

Author/License

tutti package is written by Hamilton Kibbe and released under the MIT license.

Source code is available on GitHub. Feel free to contribute!

Table of Contents