Skip to content

Instantly share code, notes, and snippets.

import sys
import cairo
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk
class AppWindow(Gtk.ApplicationWindow):
import asyncio
class MyLogger:
enabled = True
def log(self, something: str) -> None:
if not self.enabled:
print("NOT LOGGING:", something)
return
"""
Zstore is designed to be a heavily read, low write storage that is shared
across all instances of Python code that is connected to it. It is updated
via a call to .update(), which is meant to be a slow process.
Usage:
zstore = Zstore(db)
zstore.set('something', 'something')
zstore.get('something')