OpenGeodeWeb-Back 1.4.0rc1__py3-none-any.whl → 2.0.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: OpenGeodeWeb-Back
3
- Version: 1.4.0rc1
3
+ Version: 2.0.0
4
4
  Summary: OpenGeodeWeb-Back is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem
5
5
  Author-email: Geode-solutions <team-web@geode-solutions.com>
6
6
  Project-URL: Homepage, https://github.com/Geode-solutions/OpenGeodeWeb-Back
@@ -11,13 +11,27 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.8
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: geode-common ==29.0.0
15
- Requires-Dist: geode-viewables ==2.1.2
16
- Requires-Dist: opengeode-core ==14.9.1
14
+ Requires-Dist: asgiref ==3.7.2
15
+ Requires-Dist: attrs ==23.1.0
16
+ Requires-Dist: blinker ==1.7.0
17
+ Requires-Dist: click ==8.1.7
18
+ Requires-Dist: flask[async] ==3.0.0
19
+ Requires-Dist: geode-common ==29.0.1
20
+ Requires-Dist: geode-viewables ==2.1.3
21
+ Requires-Dist: itsdangerous ==2.1.2
22
+ Requires-Dist: jinja2 ==3.1.2
23
+ Requires-Dist: jsonschema ==4.19.2
24
+ Requires-Dist: jsonschema-specifications ==2023.7.1
25
+ Requires-Dist: markupsafe ==2.1.3
26
+ Requires-Dist: opengeode-core ==14.9.3
17
27
  Requires-Dist: opengeode-geosciences ==7.2.1
18
28
  Requires-Dist: opengeode-geosciencesio ==4.5.1
19
29
  Requires-Dist: opengeode-inspector ==4.0.0
20
30
  Requires-Dist: opengeode-io ==6.2.1
31
+ Requires-Dist: referencing ==0.30.2
32
+ Requires-Dist: rpds-py ==0.12.0
33
+ Requires-Dist: typing-extensions ==4.8.0
34
+ Requires-Dist: werkzeug ==3.0.1
21
35
 
22
36
 
23
37
  <h1 align="center">OpenGeodeWeb-Back<sup><i>by Geode-solutions</i></sup></h1>
@@ -0,0 +1,9 @@
1
+ opengeodeweb_back/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ opengeodeweb_back/geode_functions.py,sha256=t7VFN59J2Zq7wfPApN5PCaAYFbRg0Ag_LnrQRVi-6oM,9559
3
+ opengeodeweb_back/geode_objects.py,sha256=lOyptkl37Vtpp5I02-GN6s9sie2qJvaYHTz8GCJp3jw,16604
4
+ opengeodeweb_back/inspector_functions.py,sha256=rx3LsY6ETKl1J9kKilcFRZMZrIoBZEIOebqWrcuMJsk,15903
5
+ OpenGeodeWeb_Back-2.0.0.dist-info/LICENSE,sha256=d-icw4NmOEwW-hCOcEjYmvoBZW_cEqiC4VL3cxZMe6Y,1072
6
+ OpenGeodeWeb_Back-2.0.0.dist-info/METADATA,sha256=gsBXWlgwEqvGaf_OUC6mXhwY1rjtAV7J7sC1a8zblx0,2814
7
+ OpenGeodeWeb_Back-2.0.0.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
8
+ OpenGeodeWeb_Back-2.0.0.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
9
+ OpenGeodeWeb_Back-2.0.0.dist-info/RECORD,,
@@ -11,6 +11,8 @@ import opengeode_geosciences as og_gs
11
11
  import opengeode as og
12
12
  import pkg_resources
13
13
  import werkzeug
14
+ from jsonschema import validate
15
+ from jsonschema.exceptions import ValidationError
14
16
 
15
17
  # Local application imports
16
18
  from .geode_objects import geode_objects_dict
@@ -234,15 +236,16 @@ def extension_from_filename(filename):
234
236
  return os.path.splitext(filename)[1][1:]
235
237
 
236
238
 
237
- def validate_request(request, variables_array):
239
+ def validate_request(request, schema):
238
240
  json_data = request.get_json(force=True, silent=True)
239
241
 
240
242
  if json_data is None:
241
- flask.abort(400, f"No json sent")
243
+ json_data = {}
242
244
 
243
- for variable in variables_array:
244
- if variable not in json_data.keys():
245
- flask.abort(400, f"No {variable} sent")
245
+ try:
246
+ validate(instance=json_data, schema=schema)
247
+ except ValidationError as e:
248
+ flask.abort(400, f"Validation error: {e.message}")
246
249
 
247
250
 
248
251
  def geographic_coordinate_systems(geode_object: str):
@@ -1,9 +0,0 @@
1
- opengeodeweb_back/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- opengeodeweb_back/geode_functions.py,sha256=0ttOUUL7RNKfa5BPDOInwP-iCV2NFna8Gm7Gq-6wAHk,9486
3
- opengeodeweb_back/geode_objects.py,sha256=lOyptkl37Vtpp5I02-GN6s9sie2qJvaYHTz8GCJp3jw,16604
4
- opengeodeweb_back/inspector_functions.py,sha256=rx3LsY6ETKl1J9kKilcFRZMZrIoBZEIOebqWrcuMJsk,15903
5
- OpenGeodeWeb_Back-1.4.0rc1.dist-info/LICENSE,sha256=d-icw4NmOEwW-hCOcEjYmvoBZW_cEqiC4VL3cxZMe6Y,1072
6
- OpenGeodeWeb_Back-1.4.0rc1.dist-info/METADATA,sha256=wNd8hfezBxlOIqtHgHpBkUBilz-vUueRVYWzv6a9hOE,2332
7
- OpenGeodeWeb_Back-1.4.0rc1.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
8
- OpenGeodeWeb_Back-1.4.0rc1.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
9
- OpenGeodeWeb_Back-1.4.0rc1.dist-info/RECORD,,