Protonmail-api-client

Latest version: v2.1.1

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

1.7.1

What's Changed
* Fix `TypeError: 'staticmethod' object is not callable` in python 3.9 in 28
(There is a bug in python 3.9 where a wrapper can't be a staticmethod of a class, so i moved it to another file.)

**Full Changelog**: https://github.com/opulentfox-29/protonmail-api-client/compare/v1.7.0...v1.7.1

1.7.0

What's Changed
* Working with labels
* Add method `is_draft` to message

working wtih labels
Now you can get labels by type id:
python
labels = proton.get_labels_by_type_id(label_id)

Possible types:
- 1 - User's custom labels.
- 2 - Actually, I have no idea what it is. If this returned a non-empty list for you, please let me know what it is.
- 3 - User's custom folders.
- 4 - ProtonMail's system labels/folders (inbox, drafts, sent, spam, etc.)

Or you can get labels in another way:
python
user_folders = proton.get_user_folders()
user_labels = proton.get_user_labels()
system_labels = proton.get_system_labels()

Or you can get all labels:
python
labels = proton.get_all_labels()

Convert label_ids to label_obj in message:
python
print(message.labels) ['1', '5', '8', '15']
message.convert_labels(labels)
print(message.labels) [Label(id='8', name='Drafts', ...), ...]


Set/Unset label for messages:
python
proton.set_label_for_messages(label_or_id=label, messages_or_ids=[message])
proton.unset_label_for_messages(label_or_id=label, messages_or_ids=[message])


Get messages by label:
python
messages = proton.get_messages(label_or_id='4') spam


Message is_draft method
python
message.is_draft()


by opulentfox-29 in https://github.com/opulentfox-29/protonmail-api-client/pull/25
**Full Changelog**: https://github.com/opulentfox-29/protonmail-api-client/compare/v1.6.1...v1.7.0

1.6.1

What's Changed
* Fixed the `wait_for_new_message` function could consider any event (for example, reading an unread message) as receiving a new message

**Full Changelog**: https://github.com/opulentfox-29/protonmail-api-client/pull/23

Page 2 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.