Since Zotero 7, every installation of Zotero runs a local clone of the web API. In theory, a user that has Zotero installed could speed up pyzotero significantly with just one line of code:
zot = zotero.Zotero(library_id, library_type, api_key)
zot.endpoint = 'http://localhost:23119/api/'
Unfortunately, the way pyzotero builds URLs breaks this solution: for some reason the /api part of the endpoint gets dismissed and pyzotero tries calling http://localhost:23119/users/ instead of http://localhost:23119/api/users/.
With a little rework of the build_url function one could simplify the code as well as enable the ability to use local API.
Since Zotero 7, every installation of Zotero runs a local clone of the web API. In theory, a user that has Zotero installed could speed up
pyzotero
significantly with just one line of code:Unfortunately, the way
pyzotero
builds URLs breaks this solution: for some reason the/api
part of the endpoint gets dismissed andpyzotero
tries callinghttp://localhost:23119/users/
instead ofhttp://localhost:23119/api/users/
.With a little rework of the
build_url
function one could simplify the code as well as enable the ability to use local API.