Gapipy

Latest version: v2.37.0

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

Scan your dependencies

Page 2 of 27

2.31.1

-------------------

* Initialize the ``DjangoCache`` via the ``BaseCache`` which exposes the
``default_timeout`` attribute to the class. Prior to this change, when using
the ``DjangoCache``, items would persist forever as no timeout would be set
on the entries. See `PR 133`_ for more details.

.. note:: ``DjangoCache`` was introduced in `2.30.0 (2021-02-08)`_

.. _`PR 133`: https://github.com/gadventures/gapipy/pull/133

2.31.0

-------------------

* Introduce ``gapipy.constants`` module that holds common constants. See
`PR 132`_ for more details.

* Reintroduce the ability to enable old behaviour (pre `2.25.0 (2020-01-02)`_)
for ``Resource.fetch``. It adds an optional ``httperrors_mapped_to_none``
parameter to the method (default ``None``), where if a list of HTTP Status
codes is provided instead, will silently consume errors mapped to those
status codes and return a ``None`` value instead of raising the HTTPError.
See `PR 131`_ for more details.

.. _`PR 131`: https://github.com/gadventures/gapipy/pull/131
.. _`PR 132`: https://github.com/gadventures/gapipy/pull/132

2.30.1

-------------------

* Fix for `2.30.0 (2021-02-08)`_ Adds a guard against configuring Django
settings again as per the `Django settings docs`_. See `PR 130`_ for more
details.

.. _`Django settings docs`: https://docs.djangoproject.com/en/3.1/topics/settings/#either-configure-or-django-settings-module-is-required
.. _`PR 130`: https://github.com/gadventures/gapipy/pull/130

2.30.0

-------------------

* Adds a new cache backend; ``gapipy.cache.DjangoCache``. It requires ``Django``
and a ``gapi`` entry in ``settings.CACHES``. See `PR 129`_ for more details.

.. _`PR 129`: https://github.com/gadventures/gapipy/pull/129/

**Usage:**

* Set the ``GAPI_CACHE_BACKEND`` Env varible to ``gapipy.cache.DjangoCache``.

OR

.. code-block:: python

from gapipy import Client

gapi = Client(
application_key="live_your-secret-gapi-key",
cache_backend="gapipy.cache.DjangoCache",
)

2.29.0

-------------------

* Adds ``Departure.relationships`` field via ``DepartureRelationship`` model
* Adds ``TourDossier.relationships`` field via ``TourDossierRelationship``
model

.. warning:: BREAKING!

* Moves the ``gapipy.resources.tour.itinerary.ValidDuringRange`` class over to
its own file ``gapipy.models.valid_duraing_range.ValidDuringRange``
so that it can be reused by the ``TourDossierRelationship`` model. Any code
importing the class directly will need to change the import path:

.. code-block:: python

before
from gapipy.resources.tour.itinerary.ValidDuringRange

now
from gapipy.models import ValidDuringRange

* See `PR 128`_ for more details.

.. _`PR 128`: https://github.com/gadventures/gapipy/pull/128/

2.28.0

-------------------

* Add a new ``Client`` config option, ``global_http_headers``, a dict of HTTP
headers to add to each request made with that client.

This is similar to the ``headers=`` kwargs available when making ``get`` and
``create`` calls, except that the ``global_http_headers`` set on a client
will apply on *every request* made by that client instance.

Page 2 of 27

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.