adds a User-Agent to the requests when doing a bulk download.
The importlib.metadata is available in the python core since version 3.9, so for all supported versions.
In the rare but possible case, that the open-mastr module is called directly without being installed in any way, the user-agent is simply set to open-mastr without any version.
As all requests also contain the version of the python-requests library, this is added as well to provide metadata.
Summary of the discussion
adds a User-Agent to the requests when doing a bulk download. The
importlib.metadata
is available in the python core since version 3.9, so for all supported versions.In the rare but possible case, that the
open-mastr
module is called directly without being installed in any way, the user-agent is simply set toopen-mastr
without any version.As all requests also contain the version of the python-requests library, this is added as well to provide metadata.
Workflow checklist
Automation
Closes #489
PR-Assignee
Reviewer