OpenGeodeWeb-Back 5.10.3rc11__py3-none-any.whl → 5.10.3rc17__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.

Potentially problematic release.


This version of OpenGeodeWeb-Back might be problematic. Click here for more details.

opengeodeweb_back/app.py CHANGED
@@ -140,12 +140,13 @@ def run_server() -> None:
140
140
  flush=True,
141
141
  )
142
142
 
143
- db_filename: str = app.config.get("DATABASE_FILENAME") or "database.db"
143
+ db_filename: str = app.config.get("DATABASE_FILENAME") or "project.db"
144
144
  db_path = os.path.join(args.data_folder_path, db_filename)
145
145
  os.makedirs(os.path.dirname(db_path), exist_ok=True)
146
146
  app.config["SQLALCHEMY_DATABASE_URI"] = f"sqlite:///{db_path}"
147
147
  app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
148
- init_database(app, db_filename)
148
+
149
+ init_database(db_path)
149
150
  print(f"Database initialized at: {db_path}", flush=True)
150
151
 
151
152
  app.run(debug=args.debug, host=args.host, port=args.port, ssl_context=SSL)
@@ -381,3 +381,17 @@ def ping():
381
381
  utils_functions.validate_request(flask.request, ping_json)
382
382
  flask.current_app.config.update(LAST_PING_TIME=time.time())
383
383
  return flask.make_response({"message": "Flask server is running"}, 200)
384
+
385
+
386
+ with open(
387
+ os.path.join(schemas, "kill.json"),
388
+ "r",
389
+ ) as file:
390
+ kill_json = json.load(file)
391
+
392
+
393
+ @routes.route(kill_json["route"], methods=kill_json["methods"])
394
+ def kill() -> flask.Response:
395
+ print("Manual server kill, shutting down...", flush=True)
396
+ os._exit(0)
397
+ return flask.make_response({"message": "Flask server is dead"}, 200)
@@ -0,0 +1,10 @@
1
+ {
2
+ "route": "/kill",
3
+ "methods": [
4
+ "POST"
5
+ ],
6
+ "type": "object",
7
+ "properties": {},
8
+ "required": [],
9
+ "additionalProperties": false
10
+ }
@@ -163,7 +163,7 @@ def create_data_folder_from_id(data_id: str) -> str:
163
163
  def save_all_viewables_and_return_info(
164
164
  geode_object: str,
165
165
  data: Any,
166
- input_file: str,
166
+ input_file: str | None = None,
167
167
  additional_files: list[str] | None = None,
168
168
  ) -> dict[str, Any]:
169
169
  if additional_files is None:
@@ -227,6 +227,8 @@ def generate_native_viewable_and_light_viewable_from_object(
227
227
  def generate_native_viewable_and_light_viewable_from_file(
228
228
  geode_object: str, input_filename: str
229
229
  ) -> dict[str, Any]:
230
+
231
+ session = get_session()
230
232
  temp_data_entry = Data.create(
231
233
  geode_object=geode_object,
232
234
  input_file=input_filename,
@@ -258,10 +260,10 @@ def generate_native_viewable_and_light_viewable_from_file(
258
260
 
259
261
  data = geode_functions.load(geode_object, copied_full_path)
260
262
 
261
- session = get_session()
262
263
  if session:
263
264
  session.delete(temp_data_entry)
264
265
  session.flush()
266
+ session.commit()
265
267
 
266
268
  return save_all_viewables_and_return_info(
267
269
  geode_object,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: OpenGeodeWeb-Back
3
- Version: 5.10.3rc11
3
+ Version: 5.10.3rc17
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,27 +11,23 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: <3.13,>=3.9
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: asgiref==3.10.0
15
- Requires-Dist: blinker==1.9.0
16
- Requires-Dist: click==8.3.0
17
- Requires-Dist: flask[async]==3.1.2
14
+ Requires-Dist: asgiref>=3
15
+ Requires-Dist: blinker>=1
16
+ Requires-Dist: click>=8
17
+ Requires-Dist: flask[async]>=3
18
18
  Requires-Dist: flask-cors==6.0.1
19
- Requires-Dist: flask-sqlalchemy==3.1.1
20
19
  Requires-Dist: geode-common==33.11.0
21
20
  Requires-Dist: geode-viewables==3.3.0
22
- Requires-Dist: greenlet==3.2.4
23
- Requires-Dist: itsdangerous==2.2.0
24
- Requires-Dist: jinja2==3.1.6
25
- Requires-Dist: markupsafe==3.0.3
21
+ Requires-Dist: itsdangerous>=2
22
+ Requires-Dist: jinja2>=3
23
+ Requires-Dist: markupsafe>=3
26
24
  Requires-Dist: opengeode-core==15.27.4
27
25
  Requires-Dist: opengeode-geosciences==9.4.1
28
26
  Requires-Dist: opengeode-geosciencesio==5.8.0
29
27
  Requires-Dist: opengeode-inspector==6.8.1
30
28
  Requires-Dist: opengeode-io==7.4.0
31
- Requires-Dist: sqlalchemy==2.0.43
32
- Requires-Dist: typing-extensions==4.15.0
33
29
  Requires-Dist: werkzeug==3.1.2
34
- Requires-Dist: opengeodeweb-microservice~=1.0
30
+ Requires-Dist: opengeodeweb-microservice==1.*,>=1.0.4rc7
35
31
  Dynamic: license-file
36
32
 
37
33
  <h1 align="center">OpenGeodeWeb-Back<sup><i>by Geode-solutions</i></sup></h1>
@@ -1,12 +1,12 @@
1
1
  opengeodeweb_back/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- opengeodeweb_back/app.py,sha256=HrEVaxrttrwkSvl7UVplwCY7SsqvXxz6r6srnPiVkl4,4518
2
+ opengeodeweb_back/app.py,sha256=7sacDhOn73S4SBACvwvHonS5pOeu4ttuxrg32FRHlPQ,4509
3
3
  opengeodeweb_back/app_config.py,sha256=z-omTiGj3-y0BZ1IchAM6EoTdC7vAX6B4OymEnuM0T4,843
4
4
  opengeodeweb_back/geode_functions.py,sha256=NzELy9s6AETDnm7tyA_uM2N89zrfeLdblRhzYrBONmw,10804
5
5
  opengeodeweb_back/geode_objects.py,sha256=_NclGPa024kCwUHdORkFuXYtiZBmQpgq6sO3LRkBhe8,27776
6
6
  opengeodeweb_back/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
7
7
  opengeodeweb_back/test_utils.py,sha256=18AbRW9-tfKkPcmRGilTTHXI7S3armYyV7Vdy5UvUKM,794
8
- opengeodeweb_back/utils_functions.py,sha256=A9xWWD0Zf9-XLR3k6WOQq9wvFtyjV3ceLtjjpx0dNZs,9071
9
- opengeodeweb_back/routes/blueprint_routes.py,sha256=h_yfFC3ljH0KqFr5Ab_-IQYNB7VVRENwAMQk4NDsh18,11042
8
+ opengeodeweb_back/utils_functions.py,sha256=rGxBhz_t6JJ7eEi4PZS0b3SyGBFRCohZN5e3DQscpeQ,9111
9
+ opengeodeweb_back/routes/blueprint_routes.py,sha256=19W90mI3-jL80prgOU3aq8mBp3TM5-TO1rg244eZg2k,11394
10
10
  opengeodeweb_back/routes/models/blueprint_models.py,sha256=Jo9pUDeu1nO3_IbBiuHGk57cc4_fhwxjM0EKNyv1FT0,1874
11
11
  opengeodeweb_back/routes/models/schemas/mesh_components.json,sha256=JmQUvpy7HpGS6FlThZLx1YjHqiInRTqUZ_Ft5MfOzEE,239
12
12
  opengeodeweb_back/routes/models/schemas/vtm_component_indices.json,sha256=0XILVxhAxi0RhQFDZZoUeGcAnBMroWz3kNJS7-6_dKQ,239
@@ -16,6 +16,7 @@ opengeodeweb_back/routes/schemas/create_point.json,sha256=XjmXLMkr4jgWYHUKSwAhsx
16
16
  opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json,sha256=tp83tPQaxTltQrdL8D3TnG8pqY_2fgAaYVeTWPXO0qI,371
17
17
  opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json,sha256=lnPqevRRlUASF4ObmpG8ChH3c2LHNB99Si292S3OsLU,279
18
18
  opengeodeweb_back/routes/schemas/inspect_file.json,sha256=WoFF2hgZCUfqSDFJRq1sLpivjCQ6TCvSHPH8pKFY6KM,348
19
+ opengeodeweb_back/routes/schemas/kill.json,sha256=tZEv4TuTNNthet2MsxUPLV3ivW6tIGjYTfxd6Jl9zaM,144
19
20
  opengeodeweb_back/routes/schemas/missing_files.json,sha256=eOBAkiphA-2xG6e-OAy7wcJK2FeY0YFYXJlLdr8SNSc,349
20
21
  opengeodeweb_back/routes/schemas/ping.json,sha256=MhI5jtrjMsAsfIKEzdY8p1HyV9xv4O3hYfESWw6tkyE,162
21
22
  opengeodeweb_back/routes/schemas/polygon_attribute_names.json,sha256=1BrpfjcbRL1ZOL4azHIHirqXIc8tpu4xGnMRFEMEshU,241
@@ -24,9 +25,9 @@ opengeodeweb_back/routes/schemas/save_viewable_file.json,sha256=pvvEdaC7bNASPMrl
24
25
  opengeodeweb_back/routes/schemas/texture_coordinates.json,sha256=2uQueIl1jOmxFG_gIi_vJETR4IurrwuSf8GAnzphk9g,237
25
26
  opengeodeweb_back/routes/schemas/upload_file.json,sha256=LJ3U3L5ApKuQDVFIpVT_y2alq4HW_suTvZ3HUucNbhg,219
26
27
  opengeodeweb_back/routes/schemas/vertex_attribute_names.json,sha256=ECIflohiqPZNsflAdkfEzksL4we0JvZhIxUd84Ubctg,240
27
- opengeodeweb_back-5.10.3rc11.dist-info/licenses/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
28
- opengeodeweb_back-5.10.3rc11.dist-info/METADATA,sha256=jyC8y-m4ryNNT4DHtMl4UgxSEF6SoyG69uZK7KsZxUk,2832
29
- opengeodeweb_back-5.10.3rc11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
30
- opengeodeweb_back-5.10.3rc11.dist-info/entry_points.txt,sha256=3W_t5GFc9ROHSIZ55IGvYU3DLHUFQmYOM4Bm9u3Z0cE,71
31
- opengeodeweb_back-5.10.3rc11.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
32
- opengeodeweb_back-5.10.3rc11.dist-info/RECORD,,
28
+ opengeodeweb_back-5.10.3rc17.dist-info/licenses/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
29
+ opengeodeweb_back-5.10.3rc17.dist-info/METADATA,sha256=1ccJfnw9bH9sZ2NASndNFufVEDgcrdGb5XuuHVdEkzs,2669
30
+ opengeodeweb_back-5.10.3rc17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
+ opengeodeweb_back-5.10.3rc17.dist-info/entry_points.txt,sha256=3W_t5GFc9ROHSIZ55IGvYU3DLHUFQmYOM4Bm9u3Z0cE,71
32
+ opengeodeweb_back-5.10.3rc17.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
33
+ opengeodeweb_back-5.10.3rc17.dist-info/RECORD,,