As a developer, I want to use the code examples provided by the Wikidata Query UI in order to use the Wikidata Query Service from my tool/bot/script/whatever, without running afoul of any Wikimedia policies or service constraints.
The code examples generated by the Wikidata Query UI do not set any special User-Agent header (except for the Perl example, which prepends “MyApp/0.1 ” to the default user agent). This violates the User-Agent policy and can result in the script getting blocked (for example, the default python-requests user agent is currently blocked completely.)
- Every code example sets a custom user agent
- The code advises the developer to adjust that user agent further (e. g. via a TODO comment)