pyzotero 1.6.4__tar.gz → 1.6.6__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 (55) hide show
  1. pyzotero-1.6.6/.github/dependabot.yml +16 -0
  2. {pyzotero-1.6.4 → pyzotero-1.6.6}/.readthedocs.yaml +5 -0
  3. {pyzotero-1.6.4 → pyzotero-1.6.6}/PKG-INFO +2 -2
  4. {pyzotero-1.6.4 → pyzotero-1.6.6}/doc/conf.py +16 -1
  5. {pyzotero-1.6.4 → pyzotero-1.6.6}/doc/index.rst +3 -1
  6. {pyzotero-1.6.4 → pyzotero-1.6.6}/src/_version.py +2 -2
  7. {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero/zotero.py +5 -3
  8. {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero.egg-info/PKG-INFO +2 -2
  9. {pyzotero-1.6.4 → pyzotero-1.6.6}/uv.lock +1 -2
  10. pyzotero-1.6.4/.github/dependabot.yml +0 -16
  11. {pyzotero-1.6.4 → pyzotero-1.6.6}/.coveragerc +0 -0
  12. {pyzotero-1.6.4 → pyzotero-1.6.6}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  13. {pyzotero-1.6.4 → pyzotero-1.6.6}/.github/ISSUE_TEMPLATE/usage_question.md +0 -0
  14. {pyzotero-1.6.4 → pyzotero-1.6.6}/.github/pull_request_template.md +0 -0
  15. {pyzotero-1.6.4 → pyzotero-1.6.6}/.github/workflows/tests.yml +0 -0
  16. {pyzotero-1.6.4 → pyzotero-1.6.6}/.gitignore +0 -0
  17. {pyzotero-1.6.4 → pyzotero-1.6.6}/AUTHORS +0 -0
  18. {pyzotero-1.6.4 → pyzotero-1.6.6}/CITATION.cff +0 -0
  19. {pyzotero-1.6.4 → pyzotero-1.6.6}/CONTRIBUTING.md +0 -0
  20. {pyzotero-1.6.4 → pyzotero-1.6.6}/CONTRIBUTORS.md +0 -0
  21. {pyzotero-1.6.4 → pyzotero-1.6.6}/LICENSE.md +0 -0
  22. {pyzotero-1.6.4 → pyzotero-1.6.6}/README.md +0 -0
  23. {pyzotero-1.6.4 → pyzotero-1.6.6}/__init__.py +0 -0
  24. {pyzotero-1.6.4 → pyzotero-1.6.6}/doc/Makefile +0 -0
  25. {pyzotero-1.6.4 → pyzotero-1.6.6}/doc/_templates/layout.html +0 -0
  26. {pyzotero-1.6.4 → pyzotero-1.6.6}/doc/cat.png +0 -0
  27. {pyzotero-1.6.4 → pyzotero-1.6.6}/dump_contributors.py +0 -0
  28. {pyzotero-1.6.4 → pyzotero-1.6.6}/pyproject.toml +0 -0
  29. {pyzotero-1.6.4 → pyzotero-1.6.6}/setup.cfg +0 -0
  30. {pyzotero-1.6.4 → pyzotero-1.6.6}/setup.py +0 -0
  31. {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero/__init__.py +0 -0
  32. {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero/zotero_errors.py +0 -0
  33. {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero.egg-info/SOURCES.txt +0 -0
  34. {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero.egg-info/dependency_links.txt +0 -0
  35. {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero.egg-info/requires.txt +0 -0
  36. {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero.egg-info/top_level.txt +0 -0
  37. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/__init__.py +0 -0
  38. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/attachments_doc.json +0 -0
  39. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/citation_doc.xml +0 -0
  40. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/collection_doc.json +0 -0
  41. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/collection_tags.json +0 -0
  42. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/collection_versions.json +0 -0
  43. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/collections_doc.json +0 -0
  44. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/creation_doc.json +0 -0
  45. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/groups_doc.json +0 -0
  46. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_doc.json +0 -0
  47. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_fields.json +0 -0
  48. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_file.pdf +0 -0
  49. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_template.json +0 -0
  50. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_types.json +0 -0
  51. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_versions.json +0 -0
  52. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/items_doc.json +0 -0
  53. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/keys_doc.txt +0 -0
  54. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/tags_doc.json +0 -0
  55. {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/test_zotero.py +0 -0
@@ -0,0 +1,16 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ open-pull-requests-limit: 20
8
+ groups:
9
+ # Specify a name for the group, which will be used in pull request titles
10
+ # and branch names
11
+ python-dependencies:
12
+ # Define patterns to include dependencies in the group (based on
13
+ # dependency name)
14
+ applies-to: version-updates # Applies the group rule to version updates
15
+ patterns:
16
+ - "*"
@@ -11,11 +11,16 @@ build:
11
11
  tools:
12
12
  python: "3.11"
13
13
 
14
+ jobs:
15
+ post_create_environment:
16
+ - python -m pip install sphinx_rtd_theme
17
+
14
18
  python:
15
19
  install:
16
20
  - method: pip
17
21
  path: .
18
22
 
23
+
19
24
  # Build documentation in the docs/ directory with Sphinx
20
25
  sphinx:
21
26
  configuration: doc/conf.py
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pyzotero
3
- Version: 1.6.4
3
+ Version: 1.6.6
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
@@ -11,6 +11,7 @@
11
11
  # All configuration values have a default; values that are commented out
12
12
  # serve to show the default.
13
13
 
14
+ import os
14
15
  import sys
15
16
  from datetime import date
16
17
 
@@ -18,8 +19,22 @@ sys.path.insert(1, "..")
18
19
  import pyzotero
19
20
  from pyzotero import zotero as zot
20
21
 
22
+ # Tell Jinja2 templates the build is running on Read the Docs
23
+ if os.environ.get("READTHEDOCS", "") == "True":
24
+ if "html_context" not in globals():
25
+ html_context = {}
26
+ html_context["READTHEDOCS"] = True
27
+
21
28
  author = zot.__author__
22
29
  current_year = date.today().year
30
+
31
+ html_context = {
32
+ "display_github": True, # Integrate GitHub
33
+ "github_user": "urschrei", # Username
34
+ "github_repo": "pyzotero", # Repo name
35
+ "github_version": "main", # Version
36
+ "conf_py_path": "/doc/", # Path in the checkout to the docs root
37
+ }
23
38
  # If extensions (or modules to document with autodoc) are in another directory,
24
39
  # add these directories to sys.path here. If the directory is relative to the
25
40
  # documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -97,7 +112,7 @@ pygments_style = "sphinx"
97
112
 
98
113
  # The theme to use for HTML and HTML Help pages. See the documentation for
99
114
  # a list of builtin themes.
100
- html_theme = "default"
115
+ html_theme = "sphinx_rtd_theme"
101
116
  RTD_NEW_THEME = True
102
117
 
103
118
  # Theme options are theme-specific and customize the look and feel of a theme
@@ -106,7 +106,7 @@ General Usage
106
106
  First, create a new Zotero instance:
107
107
 
108
108
 
109
- .. py:class:: Zotero(library_id, library_type[, api_key, preserve_json_order, locale])
109
+ .. py:class:: Zotero(library_id, library_type[, api_key, preserve_json_order, locale, local])
110
110
 
111
111
  :param str library_id: a valid Zotero API user ID
112
112
  :param str library_type: a valid Zotero API library type: **user** or **group**
@@ -937,6 +937,8 @@ Uploading files
937
937
 
938
938
  Upload files to their corresponding attachments. If the attachments lack the ``key`` property they are assumed not to exist and will be created. The ``parentid`` parameter is **not compatible** with existing attachments. In order for uploads to succeed, the filename parameter of each attachment must resolve.
939
939
 
940
+ This method is really only required in cases where a sync has been interrupted, leaving your library with attachment items that don't have corresponding files attached. It *may* also work for uploading modified files, though **this is untested**.
941
+
940
942
  :param list attachments: A list of dicts representing zotero imported files which may or may not already have their key fields filled in.
941
943
  :param string parentid: a library Item ID. If this is specified and key fields are not included, attachments will be created as child items of this ID.
942
944
  :param string/path basedir: A string or path object to which the filenames specified in attachments will be evaluated relative to. If unspecified the filenames are evaluated as they are.
@@ -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.4'
16
- __version_tuple__ = version_tuple = (1, 6, 4)
15
+ __version__ = version = '1.6.6'
16
+ __version_tuple__ = version_tuple = (1, 6, 6)
@@ -305,7 +305,7 @@ class Zotero:
305
305
  else:
306
306
  self.endpoint = "http://localhost:23119/api"
307
307
  self.local = True
308
- if library_id and library_type:
308
+ if library_id is not None and library_type:
309
309
  self.library_id = library_id
310
310
  # library_type determines whether query begins w. /users or /groups
311
311
  self.library_type = library_type + "s"
@@ -2016,7 +2016,9 @@ class Zupload:
2016
2016
  upload_pairs = tuple(upload_list)
2017
2017
  try:
2018
2018
  self.zinstance._check_backoff()
2019
- upload = self.client.post(
2019
+ # We use a fresh httpx POST because we don't want our existing Pyzotero headers
2020
+ # for a call to the storage upload URL (currently S3)
2021
+ upload = httpx.post(
2020
2022
  url=authdata["url"],
2021
2023
  files=upload_pairs,
2022
2024
  headers={"User-Agent": f"Pyzotero/{pz.__version__}"},
@@ -2043,7 +2045,7 @@ class Zupload:
2043
2045
  }
2044
2046
  reg_data = {"upload": authdata.get("uploadKey")}
2045
2047
  self.zinstance._check_backoff()
2046
- upload_reg = self.zinstane.client.post(
2048
+ upload_reg = self.zinstance.client.post(
2047
2049
  url=build_url(
2048
2050
  self.zinstance.endpoint,
2049
2051
  "/{t}/{u}/items/{i}/file".format(
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pyzotero
3
- Version: 1.6.4
3
+ Version: 1.6.6
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
@@ -1,5 +1,5 @@
1
1
  version = 1
2
- requires-python = ">=3.8"
2
+ requires-python = ">=3.9"
3
3
 
4
4
  [[package]]
5
5
  name = "anyio"
@@ -354,7 +354,6 @@ wheels = [
354
354
 
355
355
  [[package]]
356
356
  name = "pyzotero"
357
- version = "1.6.2.dev7+g9114623.d20241230"
358
357
  source = { editable = "." }
359
358
  dependencies = [
360
359
  { name = "bibtexparser" },
@@ -1,16 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: "github-actions"
4
- directory: "/"
5
- schedule:
6
- interval: "weekly"
7
- ignore:
8
- # Optional: Official actions have moving tags like v1;
9
- # if you use those, you don't need updates.
10
- - dependency-name: "actions/*"
11
-
12
- - package-ecosystem: pip
13
- directory: "/"
14
- schedule:
15
- interval: daily
16
- open-pull-requests-limit: 10
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