pyPreservica 2.6.7__tar.gz → 2.7.0__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.
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/PKG-INFO +1 -1
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/__init__.py +1 -1
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/common.py +3 -2
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/entityAPI.py +5 -1
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica.egg-info/PKG-INFO +1 -1
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/setup.py +1 -1
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/LICENSE.txt +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/README.md +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/adminAPI.py +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/authorityAPI.py +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/contentAPI.py +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/monitorAPI.py +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/opex.py +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/parAPI.py +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/retentionAPI.py +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/uploadAPI.py +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/webHooksAPI.py +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica/workflowAPI.py +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica.egg-info/SOURCES.txt +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica.egg-info/dependency_links.txt +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica.egg-info/requires.txt +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/pyPreservica.egg-info/top_level.txt +0 -0
- {pyPreservica-2.6.7 → pyPreservica-2.7.0}/setup.cfg +0 -0
|
@@ -23,6 +23,7 @@ import xml.etree.ElementTree
|
|
|
23
23
|
from enum import Enum
|
|
24
24
|
from pathlib import Path
|
|
25
25
|
import pyotp
|
|
26
|
+
from requests import Response, Session
|
|
26
27
|
from urllib3.util import Retry
|
|
27
28
|
import requests
|
|
28
29
|
from requests.adapters import HTTPAdapter
|
|
@@ -860,7 +861,7 @@ class AuthenticatedAPI:
|
|
|
860
861
|
|
|
861
862
|
config = configparser.ConfigParser(interpolation=configparser.Interpolation())
|
|
862
863
|
config.read('credentials.properties', encoding='utf-8')
|
|
863
|
-
self.session = requests.Session()
|
|
864
|
+
self.session: Session = requests.Session()
|
|
864
865
|
|
|
865
866
|
retries = Retry(
|
|
866
867
|
total=3,
|
|
@@ -869,7 +870,7 @@ class AuthenticatedAPI:
|
|
|
869
870
|
allowed_methods=Retry.DEFAULT_ALLOWED_METHODS
|
|
870
871
|
)
|
|
871
872
|
|
|
872
|
-
self.shared_secret = bool(use_shared_secret)
|
|
873
|
+
self.shared_secret: bool = bool(use_shared_secret)
|
|
873
874
|
self.protocol = protocol
|
|
874
875
|
self.two_fa_secret_key = two_fa_secret_key
|
|
875
876
|
|
|
@@ -1880,7 +1880,11 @@ class EntityAPI(AuthenticatedAPI):
|
|
|
1880
1880
|
def children(self, folder: Union[str, Folder] = None, maximum: int = 100, next_page: str = None) -> PagedSet:
|
|
1881
1881
|
headers = {HEADER_TOKEN: self.token}
|
|
1882
1882
|
data = {'start': str(0), 'max': str(maximum)}
|
|
1883
|
-
|
|
1883
|
+
|
|
1884
|
+
if isinstance(folder, Folder):
|
|
1885
|
+
folder_reference = folder.reference
|
|
1886
|
+
else:
|
|
1887
|
+
folder_reference = folder
|
|
1884
1888
|
if next_page is None:
|
|
1885
1889
|
if folder_reference is None:
|
|
1886
1890
|
request = self.session.get(f'{self.protocol}://{self.server}/api/entity/root/children', params=data,
|
|
@@ -21,7 +21,7 @@ if sys.argv[-1] == 'publish':
|
|
|
21
21
|
# This call to setup() does all the work
|
|
22
22
|
setup(
|
|
23
23
|
name=PKG,
|
|
24
|
-
version="2.
|
|
24
|
+
version="2.7.0",
|
|
25
25
|
description="Python library for the Preservica API",
|
|
26
26
|
long_description=README,
|
|
27
27
|
long_description_content_type="text/markdown",
|
|
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
|