Exchangelib

Latest version: v5.4.0

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

Scan your dependencies

Page 14 of 14

1.6.1

-----

- Simplify `Q` objects and `Restriction.from_source()` by using Item attribute names in expressions and kwargs instead
of EWS FieldURI values. Change `Folder.find_items()` to accept either a search expression, or a list of `Q` objects
just like Django
`filter()` does. E.g.:

python
ids = account.calendar.find_items(
"start < '2016-01-02T03:04:05T' and end > '2016-01-01T03:04:05T' and categories in ('foo', 'bar')",
shape=IdOnly,
)

q1, q2 = (Q(subject__iexact="foo") | Q(subject__contains="bar")), ~Q(
subject__startswith="baz"
)
ids = account.calendar.find_items(q1, q2, shape=IdOnly)

1.6.0

-----

- Complete rewrite of `Folder.find_items()`. The old `start`, `end`,
`subject` and `categories` args are deprecated in favor of a Django QuerySet filter() syntax. The supported lookup
types are `__gt`,
`__lt`, `__gte`, `__lte`, `__range`, `__in`, `__exact`, `__iexact`,
`__contains`, `__icontains`, `__contains`, `__icontains`,
`__startswith`, `__istartswith`, plus an additional `__not` which translates to `!=`. Additionally, *all* fields on
the item are now supported in `Folder.find_items()`.

**WARNING**: This change is backwards-incompatible! Old uses of
`Folder.find_items()` like this:

python
ids = account.calendar.find_items(
start=tz.localize(EWSDateTime(year, month, day)),
end=tz.localize(EWSDateTime(year, month, day + 1)),
categories=["foo", "bar"],
)


must be rewritten like this:

python
ids = account.calendar.find_items(
start__lt=tz.localize(EWSDateTime(year, month, day + 1)),
end__gt=tz.localize(EWSDateTime(year, month, day)),
categories__contains=["foo", "bar"],
)


failing to do so will most likely result in empty or wrong results.

- Added a `exchangelib.restrictions.Q` class much like Django Q objects that can be used to create even more complex
filtering. Q objects must be passed directly to `exchangelib.services.FindItem`.

1.3.6

-----

- Don't require sequence arguments to `Folder.*_items()` methods to support `len()` (e.g. generators and `map` instances
are now supported)
- Allow empty sequences as argument to `Folder.*_items()` methods

1.3.4

-----

- Add support for `required_attendees`, `optional_attendees` and
`resources` attribute on `folders.CalendarItem`. These are implemented with a new `folders.Attendee` class.

1.3.3

-----

- Add support for `organizer` attribute on `CalendarItem`. Implemented with a new `folders.Mailbox` class.

1.2

---

- Initial import

Page 14 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.