
Aug. 4, 2025
7:09 p.m.
Some member preferences - such as hide_address - cannot be set with the [OPTIONS] in the command line.
I suggest to modify the code so that all member preferences can be set via the command line. What do you think?
This is how I currently patch (some) member preferences (hide_address is a variable here) in a python script, but this takes a lot of time, depending on the number of users.... YMMV.
patch_url = f"{member['self_link']}/preferences"
patch_data = {
"acknowledge_posts": True,
"hide_address": hide_address,
"preferred_language": "de",
"receive_list_copy": True,
"receive_own_postings": True,
"delivery_mode": "regular", # accepted values are: regular, plaintext_digests, mime_digests, summary_digests
"delivery_status": delivery_status # accepted values are: enabled, by_user, by_bounces, by_moderator, unknown
}
r = requests.patch(patch_url, json=patch_data, auth=AUTH, headers=HEADERS)