Api-session

Latest version: v1.4.2

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

Scan your dependencies

Page 2 of 3

1.3.3

* Add `offline` as an equivalent of `read_only` for all methods

1.3.2

* Add `JSONDict` to type `dict`s from JSON responses.

1.3.1

* Add `none_on_empty` constructor and `get_json_api` optional argument to return `None` on empty bodies. This is
disabled by default so the current behavior doesn’t change.

1.3.0

* Move `api_session.READ_METHODS` to `APISession.READ_METHODS` to make it easier to override
* Add `.none_on_404` to set the default for `.get_json_api`’s argument of the same name

1.2.1

* `throw` defaults to `None` instead of `False` in all methods. This allows a class that overrides `request_api` to
know if the parameter was set (`True` or `False`) or not (`None`).

1.2.0

* Add `.patch_api` method
* Support `read_only` in the base `request()` method as well
* Don’t throw if `get_json_api` is called with `throw=True, none_on_404=True` (the default) and
encounters a 404 error. This is the documented behavior but the logic wasn’t correctly
implemented.

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.