Exchangelib

Latest version: v5.5.0

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

Scan your dependencies

Page 13 of 15

1.8.1

-----

- Fix completely botched `Message.from` field renaming in 1.8.0
- Improve performance of QuerySet slicing and indexing. For example,
`account.inbox.all()[10]` and `account.inbox.all()[:10]` now only fetch 10 items from the server even
though `account.inbox.all()`
could contain thousands of messages.

1.8.0

-----

- Renamed `Message.from` field to `Message.author`. `from` is a Python keyword so `from` could only be accessed as
`Getattr(my_essage, 'from')` which is just stupid.
- Make `EWSTimeZone` Windows timezone name translation more robust
- Add read-only `Message.message_id` which holds the Internet Message Id
- Memory and speed improvements when sorting querysets using
`order_by()` on a single field.
- Allow setting `Mailbox` and `Attendee`-type attributes as plain strings, e.g.:

python
calendar_item.organizer = "anneexample.com"
calendar_item.required_attendees = ["johnexample.com", "billexample.com"]

message.to_recipients = ["johnexample.com", "anneexample.com"]

1.7.6

-----

- Bugfix release

1.7.5

-----

- `Account.fetch()` and `Folder.fetch()` are now generators. They will do nothing before being evaluated.
- Added optional `page_size` attribute to `QuerySet.iterator()` to specify the number of items to return per HTTP
request for large query results. Default `page_size` is 100.
- Many minor changes to make queries less greedy and return earlier

1.7.4

-----

- Add Python2 support

1.7.3

-----

- Implement attachments support. It's now possible to create, delete and get attachments connected to any item type:

python
from exchangelib.folders import FileAttachment, ItemAttachment

Process attachments on existing items
for item in my_folder.all():
for attachment in item.attachments:
local_path = os.path.join("/tmp", attachment.name)
with open(local_path, "wb") as f:
f.write(attachment.content)
print("Saved attachment to", local_path)

Create a new item with an attachment
item = Message(...)
binary_file_content = "Hello from unicode æøå".encode(
"utf-8"
) Or read from file, BytesIO etc.
my_file = FileAttachment(name="my_file.txt", content=binary_file_content)
item.attach(my_file)
my_calendar_item = CalendarItem(...)
my_appointment = ItemAttachment(name="my_appointment", item=my_calendar_item)
item.attach(my_appointment)
item.save()

Add an attachment on an existing item
my_other_file = FileAttachment(name="my_other_file.txt", content=binary_file_content)
item.attach(my_other_file)

Remove the attachment again
item.detach(my_file)


Be aware that adding and deleting attachments from items that are already created in Exchange (items that have
an `item_id`) will update the `changekey` of the item.

- Implement `Item.headers` which contains custom Internet message headers. Primarily useful for `Message` objects.
Read-only for now.

Page 13 of 15

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.