quantum-pixel 2.2.2__tar.gz → 2.2.3__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.
Files changed (42) hide show
  1. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/Cargo.lock +11 -12
  2. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/Cargo.toml +2 -2
  3. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/PKG-INFO +1 -1
  4. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/web.py +11 -9
  5. quantum_pixel-2.2.3/uv.lock +1126 -0
  6. quantum_pixel-2.2.2/uv.lock +0 -888
  7. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/.github/FUNDING.yml +0 -0
  8. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/.github/workflows/CI.yml +0 -0
  9. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/.github/workflows/render-md-mermaid.yml +0 -0
  10. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/.gitignore +0 -0
  11. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/.python-version +0 -0
  12. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/LICENSE +0 -0
  13. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/README.md +0 -0
  14. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/README_PYPI.md +0 -0
  15. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/assets/encoded.png +0 -0
  16. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/assets/grok.png +0 -0
  17. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/assets/intro.png +0 -0
  18. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/assets/material.png +0 -0
  19. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/assets/mermaid.png +0 -0
  20. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/assets/preview.png +0 -0
  21. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/pyproject.toml +0 -0
  22. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/README_PYPI.md +0 -0
  23. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/__init__.py +0 -0
  24. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/generator.py +0 -0
  25. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/main.py +0 -0
  26. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/static/decode.js +0 -0
  27. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/static/encode.js +0 -0
  28. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/static/favicon.svg +0 -0
  29. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/static/robots.txt +0 -0
  30. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/static/styles.css +0 -0
  31. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/static/upload.js +0 -0
  32. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/steganography.py +0 -0
  33. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/templates/decode.html +0 -0
  34. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/templates/encode.html +0 -0
  35. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/templates/error.html +0 -0
  36. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/templates/index.html +0 -0
  37. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/quantum_pixel/templates/result.html +0 -0
  38. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/render.yaml +0 -0
  39. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/requirements.txt +0 -0
  40. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/src/lib.rs +0 -0
  41. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/tests/test_generator.py +0 -0
  42. {quantum_pixel-2.2.2 → quantum_pixel-2.2.3}/tests/test_steganography.py +0 -0
@@ -715,9 +715,9 @@ dependencies = [
715
715
 
716
716
  [[package]]
717
717
  name = "pyo3"
718
- version = "0.28.2"
718
+ version = "0.29.2"
719
719
  source = "registry+https://github.com/rust-lang/crates.io-index"
720
- checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1"
720
+ checksum = "4688ddedf473e32662b9b067670129a8afb8c18e351482c70d62ba4a88171e8b"
721
721
  dependencies = [
722
722
  "libc",
723
723
  "once_cell",
@@ -729,18 +729,18 @@ dependencies = [
729
729
 
730
730
  [[package]]
731
731
  name = "pyo3-build-config"
732
- version = "0.28.2"
732
+ version = "0.29.2"
733
733
  source = "registry+https://github.com/rust-lang/crates.io-index"
734
- checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7"
734
+ checksum = "f41027e41b4bd03f6e60f9f417fe24a6341a6bb744edd62b6f709f2a52ea30e9"
735
735
  dependencies = [
736
736
  "target-lexicon",
737
737
  ]
738
738
 
739
739
  [[package]]
740
740
  name = "pyo3-ffi"
741
- version = "0.28.2"
741
+ version = "0.29.2"
742
742
  source = "registry+https://github.com/rust-lang/crates.io-index"
743
- checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc"
743
+ checksum = "e591a95526fead067432c3b3a33fc74770b87b1e04e73671090d9c2055a2b327"
744
744
  dependencies = [
745
745
  "libc",
746
746
  "pyo3-build-config",
@@ -748,9 +748,9 @@ dependencies = [
748
748
 
749
749
  [[package]]
750
750
  name = "pyo3-macros"
751
- version = "0.28.2"
751
+ version = "0.29.2"
752
752
  source = "registry+https://github.com/rust-lang/crates.io-index"
753
- checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e"
753
+ checksum = "73225868fc1cd84eef2c3c230ddb91273bf1de46aeb8a4248da76d32a0924a1c"
754
754
  dependencies = [
755
755
  "proc-macro2",
756
756
  "pyo3-macros-backend",
@@ -760,20 +760,19 @@ dependencies = [
760
760
 
761
761
  [[package]]
762
762
  name = "pyo3-macros-backend"
763
- version = "0.28.2"
763
+ version = "0.29.2"
764
764
  source = "registry+https://github.com/rust-lang/crates.io-index"
765
- checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a"
765
+ checksum = "571575aa3749fa6216757dd47d2a3e7ef360f329a40f0666a9fbd14889024952"
766
766
  dependencies = [
767
767
  "heck",
768
768
  "proc-macro2",
769
- "pyo3-build-config",
770
769
  "quote",
771
770
  "syn",
772
771
  ]
773
772
 
774
773
  [[package]]
775
774
  name = "quantum-pixel"
776
- version = "2.2.2"
775
+ version = "2.2.3"
777
776
  dependencies = [
778
777
  "pyo3",
779
778
  "stegano-core",
@@ -1,7 +1,7 @@
1
1
  [package]
2
2
  edition = "2024"
3
3
  name = "quantum-pixel"
4
- version = "2.2.2"
4
+ version = "2.2.3"
5
5
  description = "When both YES and NO are existed. Only human with emotions can comprehend."
6
6
  readme = "README_PYPI.md"
7
7
  license = "GNU General Public License v3 (GPLv3)"
@@ -12,5 +12,5 @@ name = "stegano"
12
12
  crate-type = ["cdylib"]
13
13
 
14
14
  [dependencies]
15
- pyo3 = "0.28.2"
15
+ pyo3 = "0.29.2"
16
16
  stegano-core = "0.6.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quantum-pixel
3
- Version: 2.2.2
3
+ Version: 2.2.3
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Natural Language :: English
6
6
  Classifier: Programming Language :: Rust
@@ -82,6 +82,8 @@ def _join_uid(uid: str, filename: str) -> str:
82
82
 
83
83
 
84
84
 
85
+ FILE_SIZE_LIMIT: int = 1_073_741_824
86
+
85
87
  @app.get("/", response_class=HTMLResponse)
86
88
  async def start(request: Request):
87
89
  """A default start on app."""
@@ -98,7 +100,7 @@ async def upload(request: Request):
98
100
  return JSONResponse(content={"error": "Unable to load form."})
99
101
 
100
102
  # Im poor u know lol. You can delete this line, just acknowledge your cpu power.
101
- if file.size > 1_073_741_824:
103
+ if file.size > FILE_SIZE_LIMIT:
102
104
  return JSONResponse(content={"error": "File should be <1GB."})
103
105
 
104
106
  while True: # Guarantee an individualized uid.
@@ -115,12 +117,12 @@ async def upload(request: Request):
115
117
  await asyncio.get_event_loop().run_in_executor(executor, img.save,
116
118
  _join_uid(uid, f"{upload_type}_input.png"))
117
119
  return JSONResponse(content={"redirect": f"/{upload_type}/{uid}"})
120
+ except asyncio.exceptions.CancelledError:
121
+ return
118
122
  except UnidentifiedImageError:
119
123
  return JSONResponse(content={"error": "Unsupported image extension."})
120
124
  except Exception as err: #pylint: disable=W0718:broad-exception-caught
121
125
  return JSONResponse(content={"error": err})
122
- except asyncio.exceptions.CancelledError:
123
- return
124
126
 
125
127
  @app.get("/encode/{uid}", response_class=HTMLResponse)
126
128
  async def start_encode(request: Request, uid: str):
@@ -189,10 +191,10 @@ async def end_encode(request: Request, uid: str):
189
191
  "path": f"{uid}/encode_resize.png",
190
192
  "download": "encode-resize",
191
193
  })})
192
- except UnidentifiedImageError:
193
- return_error = "Unsupported image extension."
194
194
  except asyncio.exceptions.CancelledError:
195
195
  return
196
+ except UnidentifiedImageError:
197
+ return_error = "Unsupported image extension."
196
198
 
197
199
  case "panel_steganography":
198
200
  if input_path and form.get("disguise"):
@@ -224,10 +226,10 @@ async def end_encode(request: Request, uid: str):
224
226
  "path": f"{uid}/encode_steganography.png",
225
227
  "download": "encode-steganography",
226
228
  })})
227
- except UnidentifiedImageError:
228
- return_error = "Unsupported image extension."
229
229
  except asyncio.exceptions.CancelledError:
230
230
  return
231
+ except UnidentifiedImageError:
232
+ return_error = "Unsupported image extension."
231
233
 
232
234
  case _:
233
235
  return_error = "Unable to load form."
@@ -286,10 +288,10 @@ async def end_decode(request: Request, uid: str):
286
288
  except UnidentifiedImageError:
287
289
  continue
288
290
  return_error = "There is no readable image within the encoded file."
289
- except BaseException as err: #pylint: disable=W0718:broad-exception-caught
290
- return_error = f"This error usually occurs when the image is not encoded from here: {err}"
291
291
  except asyncio.exceptions.CancelledError:
292
292
  return
293
+ except BaseException as err: #pylint: disable=W0718:broad-exception-caught
294
+ return_error = f"This error usually occurs when the image is not encoded from here: {err}"
293
295
  return {"error": templates.get_template("error.html").render({"error": return_error})}
294
296
 
295
297
  @app.post("/remove/{uid}")