We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ecc28d commit d744a08Copy full SHA for d744a08
octue/cloud/events/attributes.py
@@ -173,6 +173,12 @@ def __init__(
173
self.ephemeral_storage = ephemeral_storage
174
175
def to_minimal_dict(self):
176
+ """Convert the attributes to a minimal dictionary containing only the attributes that have a non-`None` value.
177
+ Using a minimal dictionary means the smallest possible data structure is used so `None` values don't,
178
+ for example, need to be redundantly encoded and transmitted when part of a JSON payload for a Pub/Sub message.
179
+
180
+ :return dict: the non-`None` attributes
181
+ """
182
return {
183
**super().to_minimal_dict(),
184
**make_minimal_dictionary(
0 commit comments