pyzotero 1.6.2__tar.gz → 1.6.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. {pyzotero-1.6.2 → pyzotero-1.6.3}/PKG-INFO +3 -3
  2. {pyzotero-1.6.2 → pyzotero-1.6.3}/pyproject.toml +2 -2
  3. {pyzotero-1.6.2 → pyzotero-1.6.3}/src/_version.py +2 -2
  4. {pyzotero-1.6.2 → pyzotero-1.6.3}/src/pyzotero/zotero.py +27 -2
  5. {pyzotero-1.6.2 → pyzotero-1.6.3}/src/pyzotero.egg-info/PKG-INFO +3 -3
  6. {pyzotero-1.6.2 → pyzotero-1.6.3}/.coveragerc +0 -0
  7. {pyzotero-1.6.2 → pyzotero-1.6.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  8. {pyzotero-1.6.2 → pyzotero-1.6.3}/.github/ISSUE_TEMPLATE/usage_question.md +0 -0
  9. {pyzotero-1.6.2 → pyzotero-1.6.3}/.github/dependabot.yml +0 -0
  10. {pyzotero-1.6.2 → pyzotero-1.6.3}/.github/pull_request_template.md +0 -0
  11. {pyzotero-1.6.2 → pyzotero-1.6.3}/.github/workflows/tests.yml +0 -0
  12. {pyzotero-1.6.2 → pyzotero-1.6.3}/.gitignore +0 -0
  13. {pyzotero-1.6.2 → pyzotero-1.6.3}/.readthedocs.yaml +0 -0
  14. {pyzotero-1.6.2 → pyzotero-1.6.3}/AUTHORS +0 -0
  15. {pyzotero-1.6.2 → pyzotero-1.6.3}/CITATION.cff +0 -0
  16. {pyzotero-1.6.2 → pyzotero-1.6.3}/CONTRIBUTING.md +0 -0
  17. {pyzotero-1.6.2 → pyzotero-1.6.3}/CONTRIBUTORS.md +0 -0
  18. {pyzotero-1.6.2 → pyzotero-1.6.3}/LICENSE.md +0 -0
  19. {pyzotero-1.6.2 → pyzotero-1.6.3}/README.md +0 -0
  20. {pyzotero-1.6.2 → pyzotero-1.6.3}/__init__.py +0 -0
  21. {pyzotero-1.6.2 → pyzotero-1.6.3}/doc/Makefile +0 -0
  22. {pyzotero-1.6.2 → pyzotero-1.6.3}/doc/_templates/layout.html +0 -0
  23. {pyzotero-1.6.2 → pyzotero-1.6.3}/doc/cat.png +0 -0
  24. {pyzotero-1.6.2 → pyzotero-1.6.3}/doc/conf.py +0 -0
  25. {pyzotero-1.6.2 → pyzotero-1.6.3}/doc/index.rst +0 -0
  26. {pyzotero-1.6.2 → pyzotero-1.6.3}/dump_contributors.py +0 -0
  27. {pyzotero-1.6.2 → pyzotero-1.6.3}/setup.cfg +0 -0
  28. {pyzotero-1.6.2 → pyzotero-1.6.3}/setup.py +0 -0
  29. {pyzotero-1.6.2 → pyzotero-1.6.3}/src/pyzotero/__init__.py +0 -0
  30. {pyzotero-1.6.2 → pyzotero-1.6.3}/src/pyzotero/zotero_errors.py +0 -0
  31. {pyzotero-1.6.2 → pyzotero-1.6.3}/src/pyzotero.egg-info/SOURCES.txt +0 -0
  32. {pyzotero-1.6.2 → pyzotero-1.6.3}/src/pyzotero.egg-info/dependency_links.txt +0 -0
  33. {pyzotero-1.6.2 → pyzotero-1.6.3}/src/pyzotero.egg-info/requires.txt +0 -0
  34. {pyzotero-1.6.2 → pyzotero-1.6.3}/src/pyzotero.egg-info/top_level.txt +0 -0
  35. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/__init__.py +0 -0
  36. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/attachments_doc.json +0 -0
  37. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/citation_doc.xml +0 -0
  38. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/collection_doc.json +0 -0
  39. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/collection_tags.json +0 -0
  40. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/collection_versions.json +0 -0
  41. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/collections_doc.json +0 -0
  42. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/creation_doc.json +0 -0
  43. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/groups_doc.json +0 -0
  44. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/item_doc.json +0 -0
  45. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/item_fields.json +0 -0
  46. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/item_file.pdf +0 -0
  47. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/item_template.json +0 -0
  48. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/item_types.json +0 -0
  49. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/item_versions.json +0 -0
  50. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/items_doc.json +0 -0
  51. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/keys_doc.txt +0 -0
  52. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/api_responses/tags_doc.json +0 -0
  53. {pyzotero-1.6.2 → pyzotero-1.6.3}/tests/test_zotero.py +0 -0
  54. {pyzotero-1.6.2 → pyzotero-1.6.3}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyzotero
3
- Version: 1.6.2
3
+ Version: 1.6.3
4
4
  Summary: Python wrapper for the Zotero API
5
5
  Author-email: Stephan Hügel <urschrei@gmail.com>
6
6
  License: # Blue Oak Model License
@@ -43,11 +43,11 @@ Project-URL: Repository, https://github.com/urschrei/pyzotero
43
43
  Project-URL: Tracker, https://github.com/urschrei/pyzotero/issues
44
44
  Keywords: Zotero,DH
45
45
  Classifier: Programming Language :: Python
46
- Classifier: Programming Language :: Python :: 3.8
47
46
  Classifier: Programming Language :: Python :: 3.9
48
47
  Classifier: Programming Language :: Python :: 3.10
49
48
  Classifier: Programming Language :: Python :: 3.11
50
49
  Classifier: Programming Language :: Python :: 3.12
50
+ Classifier: Programming Language :: Python :: 3.13
51
51
  Classifier: Development Status :: 5 - Production/Stable
52
52
  Classifier: Intended Audience :: Developers
53
53
  Classifier: Intended Audience :: Science/Research
@@ -55,7 +55,7 @@ Classifier: Intended Audience :: Education
55
55
  Classifier: License :: OSI Approved :: Blue Oak Model License (BlueOak-1.0.0)
56
56
  Classifier: Operating System :: OS Independent
57
57
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
58
- Requires-Python: >=3.8
58
+ Requires-Python: >=3.9
59
59
  Description-Content-Type: text/markdown
60
60
  License-File: LICENSE.md
61
61
  License-File: AUTHORS
@@ -2,7 +2,7 @@
2
2
  name = "pyzotero"
3
3
  dynamic = ["version", "readme"]
4
4
  description = "Python wrapper for the Zotero API"
5
- requires-python = ">=3.8"
5
+ requires-python = ">=3.9"
6
6
  dependencies = [
7
7
  "feedparser >= 6.0.11",
8
8
  "pytz",
@@ -14,11 +14,11 @@ license = {file = "LICENSE.md"}
14
14
  keywords = ["Zotero", "DH"]
15
15
  classifiers = [
16
16
  "Programming Language :: Python",
17
- "Programming Language :: Python :: 3.8",
18
17
  "Programming Language :: Python :: 3.9",
19
18
  "Programming Language :: Python :: 3.10",
20
19
  "Programming Language :: Python :: 3.11",
21
20
  "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
22
  "Development Status :: 5 - Production/Stable",
23
23
  "Intended Audience :: Developers",
24
24
  "Intended Audience :: Science/Research",
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.6.2'
16
- __version_tuple__ = version_tuple = (1, 6, 2)
15
+ __version__ = version = '1.6.3'
16
+ __version_tuple__ = version_tuple = (1, 6, 3)
@@ -62,6 +62,23 @@ def build_url(base_url, path, args_dict=None):
62
62
  return urlunparse(url_parts)
63
63
 
64
64
 
65
+ def merge_params(url, params):
66
+ """This function strips query parameters, extracting them into a dict, then merging it with
67
+ the "params" dict, returning the truncated url and merged query params dict"""
68
+ parsed = urlparse(url)
69
+ # Extract query parameters from URL
70
+ incoming = parse_qs(parsed.query)
71
+ incoming = {k: v[0] for k, v in incoming.items()}
72
+
73
+ # Create new params dict by merging
74
+ merged = {**incoming, **params}
75
+
76
+ # Get base URL by zeroing out the query component
77
+ base_url = urlunparse(parsed._replace(query=""))
78
+
79
+ return base_url, merged
80
+
81
+
65
82
  def token():
66
83
  """Return a unique 32-char write-token"""
67
84
  return str(uuid.uuid4().hex)
@@ -458,7 +475,16 @@ class Zotero:
458
475
  if not self.url_params:
459
476
  self.url_params = {}
460
477
  merged_params = params | self.url_params
461
- self.request = self.client.get(url=full_url, params=merged_params)
478
+ # our incoming url might be from the "links" dict, in which case it will contain url parameters.
479
+ # Unfortunately, httpx doesn't like to merge query paramaters in the url string and passed params
480
+ # so we strip the url params, combining them with our existing url_params
481
+ final_url, final_params = merge_params(full_url, merged_params)
482
+ self.request = self.client.get(
483
+ url=final_url,
484
+ params=final_params,
485
+ headers=self.default_headers(),
486
+ timeout=timeout,
487
+ )
462
488
  self.request.encoding = "utf-8"
463
489
  try:
464
490
  self.request.raise_for_status()
@@ -894,7 +920,6 @@ class Zotero:
894
920
  """Return the result of the call to the URL in the 'Next' link"""
895
921
  if n := self.links.get("next"):
896
922
  newurl = self._striplocal(n)
897
- print(newurl)
898
923
  return newurl
899
924
  return
900
925
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyzotero
3
- Version: 1.6.2
3
+ Version: 1.6.3
4
4
  Summary: Python wrapper for the Zotero API
5
5
  Author-email: Stephan Hügel <urschrei@gmail.com>
6
6
  License: # Blue Oak Model License
@@ -43,11 +43,11 @@ Project-URL: Repository, https://github.com/urschrei/pyzotero
43
43
  Project-URL: Tracker, https://github.com/urschrei/pyzotero/issues
44
44
  Keywords: Zotero,DH
45
45
  Classifier: Programming Language :: Python
46
- Classifier: Programming Language :: Python :: 3.8
47
46
  Classifier: Programming Language :: Python :: 3.9
48
47
  Classifier: Programming Language :: Python :: 3.10
49
48
  Classifier: Programming Language :: Python :: 3.11
50
49
  Classifier: Programming Language :: Python :: 3.12
50
+ Classifier: Programming Language :: Python :: 3.13
51
51
  Classifier: Development Status :: 5 - Production/Stable
52
52
  Classifier: Intended Audience :: Developers
53
53
  Classifier: Intended Audience :: Science/Research
@@ -55,7 +55,7 @@ Classifier: Intended Audience :: Education
55
55
  Classifier: License :: OSI Approved :: Blue Oak Model License (BlueOak-1.0.0)
56
56
  Classifier: Operating System :: OS Independent
57
57
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
58
- Requires-Python: >=3.8
58
+ Requires-Python: >=3.9
59
59
  Description-Content-Type: text/markdown
60
60
  License-File: LICENSE.md
61
61
  License-File: AUTHORS
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes