Source code

Download source archive ↓

src/openpyxl/styles/protection.py

1# Copyright (c) 2010-2024 openpyxl
2
3from openpyxl.descriptors import Bool
4from openpyxl.descriptors.serialisable import Serialisable
5
6
7class Protection(Serialisable):
8    """Protection options for use in styles."""
9
10    tagname = "protection"
11
12    locked = Bool()
13    hidden = Bool()
14
15    def __init__(self, locked=True, hidden=False):
16        self.locked = locked
17        self.hidden = hidden