I am working on a python package which speaks with an API (using HTTP protocol). In my package I have a python configuration file that contains the API URL (hardcoded) and other settings. The API URL is saved in a global variable so I could import it and use it in my package modules. For example:
API_URL = "https://api-url.com"
The configuration file is part of the package, that means once that a user installs the package he also gets the configuration file including the hardcoded URL. The problem is that in some point in the future the API's URL could change, and all the factuality's of the package will break, and the users will have to update (i.g. pip install etc.) the package. What is the right way to handle hardcoded URLs in a package?