Pyppms

Latest version: v3.3.0

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

Scan your dependencies

Page 1 of 2

3.3.0

Added

- `pyppms.ppms.get_running_sheet()` now has an optional parameter `localisation`
(defaulting to an empty `str`) that will be passed to the call to
`pyppms.ppms.get_systems_matching()`, allowing to restrict the runningsheet to
systems of a given "room".

3.2.1

Fixed

- ๐Ÿ•›๐ŸŒƒ end time: `pyppms.booking.PpmsBooking.endtime_fromstr()` contained a bug
where the end time of a booking finishing at midnight got wrongly assigned to
the *start* of the given day (instead of the end). This is now fixed by
setting the end time to the start of the following day.

3.2.0

Added

- `pyppms.ppms.PpmsConnection.last_served_from_cache` has been added to indicate
if the last request was served from the cache or on-line.

Changed

- Several log messages have been demoted to lower levels for further reducing
logging clutter.

3.1.0

Added

- `pyppms.common.fmt_time()` to string-format a datetime object that might also
be None (in which case a fixed string is returned).
- `pyppms.booking.PpmsBooking.desc` has been added as a property to retrieve a
shorter description of the object than calling `str()` on it.
- `pyppms.exceptions.NoDataError` has been added to indicate a PUMAPI response
did *not* contain any useful data.
- `pyppms.common.parse_multiline_response()` will now raise the newly added
`NoDataError` in case the requested *runningsheet* for a day doesn't contain
any bookings to allow for properly dealing with "empty" days.

Changed

- Several log messages have been demoted from `debug` to `trace` level and might
have been shortened / combined to reduce logging clutter.

3.0.0

Changed

- ๐Ÿงจ Minimum required Python version is now `3.9`.
- Dependencies have been updated to their latest (compatible) versions.
- Logging is now done through [Loguru](https://pypi.org/project/loguru/).

2.3.0

Added

- `pyppms.ppms.PpmsConnection()` now takes an optional parameter
`cache_users_only` that will prevent any request but `getuser` from being
stored in the local cache. This is useful in scenarios where frequent requests
to PPMS are being done to fetch booking states and such that would be slowed
down enormously if no user caching was present. Obviously the cached users
need to be refreshed explicitly on a regular basis then. Defaults to `False`
which will result in the same behavior as before.
Please note that several things are implicitly being cached (in memory) during
the lifetime of the `PpmsConnection` object (e.g. the PPMS systems) unless
their corresponding method is being called with `force_refresh=True`.
- `pyppms.ppms.PpmsConnection.update_users()` and
`pyppms.ppms.PpmsConnection.get_users()` now both have an optional parameter
`active_only` (defaulting to `True`) that can be used to also request users
that are marked as *inactive* in PPMS.

Changed

- `pyppms.ppms.PpmsConnection.get_user()` is only logging a `DEBUG` level
message (before: `ERROR`) in case the requested user can't be found since it
also raises a `KeyError`. This is done to prevent cluttering up the logs of
calling code that might use this method to figure out if an account exists in
PPMS and properly deals with the exception raised.

Page 1 of 2

ยฉ 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.