diff --git a/src/odp_gent/odp_gent.py b/src/odp_gent/odp_gent.py index 095510e..9247d99 100644 --- a/src/odp_gent/odp_gent.py +++ b/src/odp_gent/odp_gent.py @@ -15,6 +15,8 @@ from .exceptions import ODPGentConnectionError, ODPGentError from .models import BlueBike, Garage, ParkAndRide, Partago +VERSION = metadata.version(__package__) + @dataclass class ODPGent: @@ -52,7 +54,6 @@ async def _request( ODPGentError: If the data is not valid. """ - version = metadata.version(__package__) url = URL.build( scheme="https", host="data.stad.gent", @@ -61,7 +62,7 @@ async def _request( headers = { "Accept": "application/json", - "User-Agent": f"PythonODPGent/{version}", + "User-Agent": f"PythonODPGent/{VERSION}", } if self.session is None: