python-documentcloud 4.1.0__py2.py3-none-any.whl → 4.1.2__py2.py3-none-any.whl
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.
- documentcloud/base.py +1 -1
- documentcloud/client.py +4 -1
- {python_documentcloud-4.1.0.dist-info → python_documentcloud-4.1.2.dist-info}/METADATA +4 -4
- {python_documentcloud-4.1.0.dist-info → python_documentcloud-4.1.2.dist-info}/RECORD +7 -7
- {python_documentcloud-4.1.0.dist-info → python_documentcloud-4.1.2.dist-info}/WHEEL +1 -1
- {python_documentcloud-4.1.0.dist-info → python_documentcloud-4.1.2.dist-info}/LICENSE +0 -0
- {python_documentcloud-4.1.0.dist-info → python_documentcloud-4.1.2.dist-info}/top_level.txt +0 -0
documentcloud/base.py
CHANGED
|
@@ -104,7 +104,7 @@ class BaseAPIClient(object):
|
|
|
104
104
|
|
|
105
105
|
def delete(self, id_):
|
|
106
106
|
"""Deletes a resource"""
|
|
107
|
-
self.client.delete(f"{self.api_path}/{get_id(id_)}")
|
|
107
|
+
self.client.delete(f"{self.api_path}/{get_id(id_)}/")
|
|
108
108
|
|
|
109
109
|
def all(self, **params):
|
|
110
110
|
return self.list(**params)
|
documentcloud/client.py
CHANGED
|
@@ -143,7 +143,10 @@ class DocumentCloud(object):
|
|
|
143
143
|
method, url, timeout=self.timeout, **kwargs
|
|
144
144
|
)
|
|
145
145
|
logger.debug("response: %s - %s", response.status_code, response.content)
|
|
146
|
-
if
|
|
146
|
+
if (
|
|
147
|
+
response.status_code in [requests.codes.FORBIDDEN, requests.codes.TOO_MANY]
|
|
148
|
+
and set_tokens
|
|
149
|
+
):
|
|
147
150
|
self._set_tokens()
|
|
148
151
|
# track set_tokens to not enter an infinite loop
|
|
149
152
|
kwargs["set_tokens"] = False
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-documentcloud
|
|
3
|
-
Version: 4.1.
|
|
3
|
+
Version: 4.1.2
|
|
4
4
|
Summary: A simple Python wrapper for the DocumentCloud API
|
|
5
5
|
Home-page: https://github.com/muckrock/python-documentcloud
|
|
6
6
|
Author: Mitchell Kotler
|
|
@@ -20,14 +20,14 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
20
20
|
Classifier: Topic :: Internet :: WWW/HTTP
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
License-File: LICENSE
|
|
23
|
+
Requires-Dist: fastjsonschema
|
|
23
24
|
Requires-Dist: future
|
|
24
|
-
Requires-Dist: listcrunch
|
|
25
|
+
Requires-Dist: listcrunch >=1.0.1
|
|
25
26
|
Requires-Dist: python-dateutil
|
|
27
|
+
Requires-Dist: pyyaml
|
|
26
28
|
Requires-Dist: ratelimit
|
|
27
29
|
Requires-Dist: requests
|
|
28
30
|
Requires-Dist: urllib3
|
|
29
|
-
Requires-Dist: pyyaml
|
|
30
|
-
Requires-Dist: fastjsonschema
|
|
31
31
|
Provides-Extra: dev
|
|
32
32
|
Requires-Dist: black ; extra == 'dev'
|
|
33
33
|
Requires-Dist: coverage ; extra == 'dev'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
documentcloud/__init__.py,sha256=XAwOR6JYL-flQV_uC616AMA2rYiXTkeogNolqE6LzN4,220
|
|
2
2
|
documentcloud/addon.py,sha256=3FxQjm26jknjLdd-GuztiZO4Z7NcgXq4WqunE9oh2es,11754
|
|
3
3
|
documentcloud/annotations.py,sha256=wVe3wYzyTRvc_hJ3r0m6iyDf6WIFlaGcCnyah_r53pg,2538
|
|
4
|
-
documentcloud/base.py,sha256=
|
|
5
|
-
documentcloud/client.py,sha256=
|
|
4
|
+
documentcloud/base.py,sha256=9RNAaItU2zOWMWUA2AJxAl063_GVrSn8VpUSNDd3dog,6544
|
|
5
|
+
documentcloud/client.py,sha256=sNmo34u3ruxlPZW-T629BizAB-Ao7Pg6GhU9qKt0cBI,5906
|
|
6
6
|
documentcloud/constants.py,sha256=4GuvF140iB3-0lAvyLUVuuVu4PYjqdkHOAn49dEjsbQ,1333
|
|
7
7
|
documentcloud/documents.py,sha256=4OFcWpLgiAhAKpw7QJmswji8jkq2xk12XypfEKmotSk,19563
|
|
8
8
|
documentcloud/exceptions.py,sha256=nLyrg_6KhBotsZp0L6-Mf4A6HYYS60AV2FxSVSq9xAk,1161
|
|
@@ -11,8 +11,8 @@ documentcloud/projects.py,sha256=KuOiw65a-8fdgbjo7BqjbEbWguds8inkhFJZJd578bs,532
|
|
|
11
11
|
documentcloud/sections.py,sha256=cMf973KMvp6fAPSMXCD67L32Pz1_Tfh81oV2q2UQ9Uk,924
|
|
12
12
|
documentcloud/toolbox.py,sha256=zFZTyOn40YZjBpqa1H3qjpR4C3Wu1X2g72AvH_ljlic,1835
|
|
13
13
|
documentcloud/users.py,sha256=yydOXoEsfJlYqryZpXQ4G3aeRc5y_QCHqXd0dfF1aIc,354
|
|
14
|
-
python_documentcloud-4.1.
|
|
15
|
-
python_documentcloud-4.1.
|
|
16
|
-
python_documentcloud-4.1.
|
|
17
|
-
python_documentcloud-4.1.
|
|
18
|
-
python_documentcloud-4.1.
|
|
14
|
+
python_documentcloud-4.1.2.dist-info/LICENSE,sha256=Z1IBhHCzIeGR9F2iHtcLt2I2qoUhJ2pK139CAIAuFgo,1151
|
|
15
|
+
python_documentcloud-4.1.2.dist-info/METADATA,sha256=yigtrjIPScRkdCNm7uHFioOCXH1DuKTF2guygJH1ECg,2694
|
|
16
|
+
python_documentcloud-4.1.2.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
|
|
17
|
+
python_documentcloud-4.1.2.dist-info/top_level.txt,sha256=rzNW2vA9GqU5ipNQYSP1XJQ54ippjKXVIo9oMlM0Tm4,14
|
|
18
|
+
python_documentcloud-4.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|