From 1b71dce95956e9417e90f1e8cf613d1e16789d8a Mon Sep 17 00:00:00 2001 From: Yuhui Date: Thu, 26 Dec 2024 10:11:34 +0800 Subject: [PATCH] fix: use the package's VERSION instead of hardcoding the version --- singstat/constants.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/singstat/constants.py b/singstat/constants.py index cb3bbcd..4f71117 100644 --- a/singstat/constants.py +++ b/singstat/constants.py @@ -14,6 +14,8 @@ """Constants that can be used anywhere.""" +from . import VERSION + BASE_API_DOMAIN = 'https://tablebuilder.singstat.gov.sg' BASE_API_ENDPOINT = f'{BASE_API_DOMAIN}/api/table' @@ -41,7 +43,7 @@ CACHE_NAME = 'singstat_cache' CACHE_TWELVE_HOURS = 60 * 60 * 12 -USER_AGENT = 'SingStat Python package/2.0.0 https://pypi.org/project/singstat' +USER_AGENT = f'SingStat Python package/{VERSION} https://pypi.org/project/singstat' __all__ = [ 'METADATA_ENDPOINT',