geobox 1.1.0__py3-none-any.whl → 1.1.1__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.
- geobox/api.py +5 -5
- geobox/enums.py +1 -1
- geobox/file.py +6 -10
- {geobox-1.1.0.dist-info → geobox-1.1.1.dist-info}/METADATA +1 -1
- {geobox-1.1.0.dist-info → geobox-1.1.1.dist-info}/RECORD +8 -8
- {geobox-1.1.0.dist-info → geobox-1.1.1.dist-info}/WHEEL +0 -0
- {geobox-1.1.0.dist-info → geobox-1.1.1.dist-info}/licenses/LICENSE +0 -0
- {geobox-1.1.0.dist-info → geobox-1.1.1.dist-info}/top_level.txt +0 -0
geobox/api.py
CHANGED
|
@@ -597,23 +597,23 @@ class GeoboxClient:
|
|
|
597
597
|
return File.get_file(self, uuid=uuid)
|
|
598
598
|
|
|
599
599
|
|
|
600
|
-
def
|
|
600
|
+
def get_files_by_name(self, name: str, user_id: int = None) -> List['File']:
|
|
601
601
|
"""
|
|
602
|
-
Get
|
|
602
|
+
Get files by name
|
|
603
603
|
|
|
604
604
|
Args:
|
|
605
605
|
name (str): the name of the file to get
|
|
606
606
|
user_id (int, optional): specific user. privileges required.
|
|
607
607
|
|
|
608
608
|
Returns:
|
|
609
|
-
File
|
|
609
|
+
List[File]: returns files that matches the given name
|
|
610
610
|
|
|
611
611
|
Example:
|
|
612
612
|
>>> from geobox import GeoboxClient
|
|
613
613
|
>>> client = GeoboxClient()
|
|
614
|
-
>>>
|
|
614
|
+
>>> files = client.get_files_by_name(name='test')
|
|
615
615
|
"""
|
|
616
|
-
return File.
|
|
616
|
+
return File.get_files_by_name(self, name, user_id)
|
|
617
617
|
|
|
618
618
|
|
|
619
619
|
def upload_file(self, path: str, user_id: int = None, scan_archive: bool = True) -> 'File':
|
geobox/enums.py
CHANGED
geobox/file.py
CHANGED
|
@@ -188,9 +188,9 @@ class File(Base):
|
|
|
188
188
|
|
|
189
189
|
|
|
190
190
|
@classmethod
|
|
191
|
-
def
|
|
191
|
+
def get_files_by_name(cls, api: 'GeoboxClient', name: str, user_id: int = None) -> List['File']:
|
|
192
192
|
"""
|
|
193
|
-
Get
|
|
193
|
+
Get files by name
|
|
194
194
|
|
|
195
195
|
Args:
|
|
196
196
|
api (GeoboxClient): The GeoboxClient instance for making requests.
|
|
@@ -198,21 +198,17 @@ class File(Base):
|
|
|
198
198
|
user_id (int, optional): specific user. privileges required.
|
|
199
199
|
|
|
200
200
|
Returns:
|
|
201
|
-
File
|
|
201
|
+
List[File]: returns files that matches the given name
|
|
202
202
|
|
|
203
203
|
Example:
|
|
204
204
|
>>> from geobox import GeoboxClient
|
|
205
205
|
>>> from geobox.file import File
|
|
206
206
|
>>> client = GeoboxClient()
|
|
207
|
-
>>>
|
|
207
|
+
>>> files = File.get_file_by_name(client, name='test')
|
|
208
208
|
or
|
|
209
|
-
>>>
|
|
209
|
+
>>> files = client.get_file_by_name(name='test')
|
|
210
210
|
"""
|
|
211
|
-
|
|
212
|
-
if files and files[0].name == name:
|
|
213
|
-
return files[0]
|
|
214
|
-
else:
|
|
215
|
-
return None
|
|
211
|
+
return cls.get_files(api, q=f"name = '{name}'", user_id=user_id)
|
|
216
212
|
|
|
217
213
|
|
|
218
214
|
def _get_save_path(self, save_path: str = None) -> str:
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
geobox/__init__.py,sha256=iRkJAFIjMXiAaLTVXvZcW5HM7ttyipGdxFZ15NCM8qU,1895
|
|
2
|
-
geobox/api.py,sha256=
|
|
2
|
+
geobox/api.py,sha256=Sq9iKYltgdR96cA4w5_5jMraNqAUpgSzMriO9PbZFNA,100538
|
|
3
3
|
geobox/apikey.py,sha256=FBio1PtGovAUaTE0HW9IJ55UuFdR_1ICk_FQhHu5dAE,7427
|
|
4
4
|
geobox/attachment.py,sha256=XbGwfWWuFAMimj4tsjKBvlSLP-rhpNACCtxgRmUvcdY,11631
|
|
5
5
|
geobox/base.py,sha256=p0UVZo9CINw0mW9o0nNR_VNCk7V1r-FrLQ_NH39WARE,12299
|
|
6
6
|
geobox/basemap.py,sha256=fDWwkMf-F2NTE1tVLijoxQku55825b6gj8nk69TMOII,4386
|
|
7
7
|
geobox/dashboard.py,sha256=MYyT3YJEGPCbTXHcYoZmn14rFOaut1J3idEA8bCdFgI,11762
|
|
8
|
-
geobox/enums.py,sha256=
|
|
8
|
+
geobox/enums.py,sha256=SVUmz_Z4PrPSauutULb3lzrEwNuGJ2qa_DRgpz7n5qo,6268
|
|
9
9
|
geobox/exception.py,sha256=jvpnv0M2Ck1FpxHTL_aKYWxGvLnCQ3d9vOrMIktjw1U,1507
|
|
10
10
|
geobox/feature.py,sha256=3Kbc1LjIkBt1YqRAry84BrR7qxx9BexvBB3YQ8D9mGk,18504
|
|
11
11
|
geobox/field.py,sha256=2VxjeYgRwnDxHYpAsK0ASOCz8V0JmfTA3GqHDv3rfgQ,10526
|
|
12
|
-
geobox/file.py,sha256=
|
|
12
|
+
geobox/file.py,sha256=YlBrX8apx-4Z0QutZq9fdoVqdfqqQop0UdHdzr6daII,18474
|
|
13
13
|
geobox/log.py,sha256=ZTmVErhyAszf7M5YFxT5mqXNNDGPnRwXPeGLDS1G6PE,3582
|
|
14
14
|
geobox/map.py,sha256=98P1gbB5U_eu71Hu6EQ0kL_ponbPAnoOCitjEa35q4I,31307
|
|
15
15
|
geobox/model3d.py,sha256=qRYCx-q9LpGhdu5oz3av0uUoiDimuk4BvXXwMW5bo9Q,12061
|
|
@@ -30,8 +30,8 @@ geobox/vectorlayer.py,sha256=xnYsJei-bpKgM_EJlRbZ-bAIHdmvfU-VZ2t-NEEJCfc,49420
|
|
|
30
30
|
geobox/version.py,sha256=0GLPhxCeEb2bAkdpPJWtXPXc1KP6kQ_TOMwLAL0ldo0,9374
|
|
31
31
|
geobox/view.py,sha256=fRYlzNu4eGl6Zx9gPom47BkVE8DfWLj0bNlW2-u4TOU,37390
|
|
32
32
|
geobox/workflow.py,sha256=6hKnSw4G0_ZlgmUb0g3fxT-UVsFbiYpF2FbEO5fpQv0,11606
|
|
33
|
-
geobox-1.1.
|
|
34
|
-
geobox-1.1.
|
|
35
|
-
geobox-1.1.
|
|
36
|
-
geobox-1.1.
|
|
37
|
-
geobox-1.1.
|
|
33
|
+
geobox-1.1.1.dist-info/licenses/LICENSE,sha256=AvFB7W94sJYKLDhBxLRshL3upexCOG8HQY_1JibB96w,1063
|
|
34
|
+
geobox-1.1.1.dist-info/METADATA,sha256=H10IZAEE-owFW1GSsxbwh-f80oe4HSp9NW2l4Qi2UYE,2556
|
|
35
|
+
geobox-1.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
36
|
+
geobox-1.1.1.dist-info/top_level.txt,sha256=ppXH8Bu2mlB-pLQ6lsoWEm2Gr6wZx1uzkhetsYA5ins,7
|
|
37
|
+
geobox-1.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|