Protonmail-api-client

Latest version: v1.9.0

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

Scan your dependencies

1.9.0

What's Changed
* Added the ability to send messages on a schedule


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

1.8.0

What's Changed
* Added methods for mark messages/conversations as read/unread in 30

Now you can mark your messages/conversation as read/unread
(method for mark messages as read was added before)
Messages
python
messages = proton.get_messages()
proton.mark_messages_as_unread(messages)
proton.mark_messages_as_read(messages)

Conversations
python
conversations = proton.get_conversations()
proton.mark_conversations_as_unread(conversations)
proton.mark_conversations_as_read(conversations)


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

1.7.2

What's Changed
- removed build by sdist+setup.py
- update pyproject.toml structure
- include wheel in build (on Linux with `pip<23` this project could not be installed and the project version was automatically downgraded to `1.3.4`, which had wheel in the build, this happened, for example, on default Ubuntu 22.04)

Fixed 21
Fixed 26

**Full Changelog**: https://github.com/opulentfox-29/protonmail-api-client/compare/v1.7.1...v1.7.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

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.