Skip to content

Instantly share code, notes, and snippets.

View zmej-serow's full-sized avatar

Andrey Serov zmej-serow

View GitHub Profile
@zmej-serow
zmej-serow / dot_notation.py
Created August 22, 2023 18:11
Dot notation access for dicts
class DotNotation(dict):
"""
Access dictionary attributes via dot notation
"""
__getattr__ = dict.get
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__