Ryanair-py

Latest version: v3.0.0

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

Scan your dependencies

Page 1 of 2

3.0.0

Added
- Error handling for airport data loading.
- Unit testing for main endpoints parsing, internal retryable queries w/ backoff, error handling and logging.

Changed
- Module console logging is now only set up if handlers haven't already been specified.
- `dataclass` usage instead of `namedtuple`.
- Only load airport data as needed.
- Separated out concerns to `SessionManager`.
- Less redundant logging.
- Propagate up exceptions if all retries fail.

Removed
- **Removed the availability API.**
- Unfortunately, grabbing a session cookie is now insufficient to use this API.
Usage of the API now requires a session cookie to be generated within a "real" browser session.
I do not wish to add the capability to specifically work around this, seemingly intentional, limitation.
- With all this in mind, I've decided to regrettably remove the ability to use this endpoint from the library,
since it will fail in most cases without such a workaround implemented.
- Methods deprecated in v2.0.0 have now been completely removed.

2.3.1

Added
- README warning note for availability API
- README non-affiliation disclaimer.

2.3.0

Added
- Optional `destination_airport` keyword argument to the cheap flights endpoints,
in case you only care about the cheapest flight to a single airport.
- Improved type hints on the main API methods.
- In regard to the availability API:
- Ability to grab a session cookie for use by the availability API.
- Exceptions raised when the availbility API declines to provide results,
for reasons such as rate limiting or the lack of a session cookie.
- Thanks to [dolohow](https://www.github.com/dolohow).

Changed
- When the library hits an exception parsing an API response, it will now also log the original query params.
- Thanks to [dolohow](https://www.github.com/dolohow).
- Small refactors, additional type hints

Fixed
- `currency` is now only added as a parameter on calls to `get_cheapest_return_flights` whenit is configured, identical
to `get_cheapest_flights`.

2.2.0

Added
- Ability to constrain the max price of retrieved flights/trips from the API when
using `get_cheapest_flights` or `get_cheapest_return_flights` via the `max_price` kwarg.
- Added `currency` field to the `Flight` object.
- Availability API method `get_all_flights` does not support specifying currency (it is always the currency of the
departure country), but this was not documented. `Flight` will now allow the user to see what currency has been
returned.
- Log a warning when returned currency doesn't match the configured value.
- Primarily to warn users using the `get_all_flights` API that the response isn't as configured.
- Might also be useful if the `get_cheapest_flights` and `get_cheapest_return_flights` APIs ever stop respecting
requests for results in specific currencies.

Fixed
- Incorrect date format used for logs.

Changed
- It is now _optional_ to specify `currency` when creating an instance of the library.
- If not specified, the API decides the return currency (normally the currency of the departure country).
- If an API, such as the availability / `get_all_flights` API, doesn't support it anyway, this will be ignored,
except for the purposes of deciding whether a warning should be shown, where the currencies mismatch.

2.1.0

Added
- Added flight departure time filter keyword arguments to `get_cheapest_flights` and `get_cheapest_return_flights`.

2.0.1

Fixed
- Module description to account for new functionality.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.