fastled 1.2.59__py3-none-any.whl → 1.2.61__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.
fastled/__init__.py CHANGED
@@ -13,7 +13,7 @@ from .types import BuildMode, CompileResult, CompileServerError
13
13
  # IMPORTANT! There's a bug in github which will REJECT any version update
14
14
  # that has any other change in the repo. Please bump the version as the
15
15
  # ONLY change in a commit, or else the pypi update and the release will fail.
16
- __version__ = "1.2.59"
16
+ __version__ = "1.2.61"
17
17
 
18
18
  DOCKER_FILE = (
19
19
  "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/Dockerfile"
fastled/open_browser.py CHANGED
@@ -14,10 +14,9 @@ SSL_CONFIG = get_ssl_config()
14
14
  # print(f"SSL Config: {SSL_CONFIG.certfile}, {SSL_CONFIG.keyfile}")
15
15
 
16
16
 
17
- def open_http_server_subprocess(
17
+ def _open_http_server_subprocess(
18
18
  fastled_js: Path,
19
19
  port: int,
20
- open_browser: bool,
21
20
  ) -> None:
22
21
  print("\n################################################################")
23
22
  print(f"# Opening browser to {fastled_js} on port {port}")
@@ -32,8 +31,6 @@ def open_http_server_subprocess(
32
31
  "--port",
33
32
  str(port),
34
33
  ]
35
- if open_browser:
36
- cmd.append("--open-browser")
37
34
  # Pass SSL flags if available
38
35
  if SSL_CONFIG.certfile and SSL_CONFIG.keyfile:
39
36
  cmd.extend(
@@ -52,7 +49,7 @@ def open_http_server_subprocess(
52
49
  subprocess.run(
53
50
  cmd,
54
51
  stdout=subprocess.DEVNULL,
55
- stderr=subprocess.DEVNULL,
52
+ # stderr=subprocess.DEVNULL,
56
53
  ) # type ignore
57
54
  except KeyboardInterrupt:
58
55
  print("Exiting from server...")
@@ -111,21 +108,21 @@ def open_browser_process(
111
108
  port = find_free_port(DEFAULT_PORT)
112
109
 
113
110
  proc = Process(
114
- target=open_http_server_subprocess,
115
- args=(fastled_js, port, open_browser),
111
+ target=_open_http_server_subprocess,
112
+ args=(fastled_js, port),
116
113
  daemon=True,
117
114
  )
118
115
  proc.start()
119
116
  wait_for_server(port)
120
- # if open_browser:
121
- # print(
122
- # f"Opening browser to http{'s' if SSL_CONFIG.certfile else ''}://localhost:{port}"
123
- # )
124
- # webbrowser.open(
125
- # url=f"http{'s' if SSL_CONFIG.certfile else ''}://localhost:{port}",
126
- # new=1,
127
- # autoraise=True,
128
- # )
117
+ if open_browser:
118
+ print(f"Opening browser to http://localhost:{port}")
119
+ import webbrowser
120
+
121
+ webbrowser.open(
122
+ url=f"http://localhost:{port}",
123
+ new=1,
124
+ autoraise=True,
125
+ )
129
126
  return proc
130
127
 
131
128
 
fastled/open_browser2.py CHANGED
@@ -2,7 +2,7 @@ import argparse
2
2
  import importlib.resources as pkg_resources
3
3
  from pathlib import Path
4
4
 
5
- from .server_fastapi_cli import run_fastapi_server_proces
5
+ from fastled.server_fastapi_cli import run_fastapi_server_process
6
6
 
7
7
 
8
8
  def get_asset_path(filename: str) -> Path | None:
@@ -16,28 +16,9 @@ def get_asset_path(filename: str) -> Path | None:
16
16
  return None
17
17
 
18
18
 
19
- def _open_browser(url: str) -> None:
20
- # import webview
21
-
22
- # print("\n##################################################")
23
- # print(f"# Opening browser to {url}")
24
- # print("##################################################\n")
25
-
26
- # webview.create_window("FastLED", url)
27
- # webview.start()
28
- import webbrowser
29
-
30
- webbrowser.open(url, new=1, autoraise=True)
31
- while True:
32
- import time
33
-
34
- time.sleep(1)
35
-
36
-
37
19
  def run(
38
20
  path: Path,
39
21
  port: int,
40
- open_browser: bool,
41
22
  certfile: Path | None = None,
42
23
  keyfile: Path | None = None,
43
24
  ) -> None:
@@ -49,10 +30,8 @@ def run(
49
30
  keyfile = get_asset_path("localhost-key.pem")
50
31
 
51
32
  # _run_flask_server(path, port, certfile, keyfile)
52
- # run_fastapi_server_proces(port=port, path=path, certfile=certfile, keyfile=keyfile)
53
- proc = run_fastapi_server_proces(port=port, cwd=path)
54
- if open_browser:
55
- _open_browser(f"http://localhost:{port}/")
33
+ # run_fastapi_server_process(port=port, path=path, certfile=certfile, keyfile=keyfile)
34
+ proc = run_fastapi_server_process(port=port, cwd=path)
56
35
  try:
57
36
  proc.join()
58
37
  except KeyboardInterrupt:
@@ -81,16 +60,11 @@ def parse_args() -> argparse.Namespace:
81
60
  parser.add_argument(
82
61
  "--key", type=Path, help="(Optional) Path to SSL private key (PEM format)"
83
62
  )
84
- parser.add_argument(
85
- "--open-browser",
86
- action="store_true",
87
- )
88
63
  return parser.parse_args()
89
64
 
90
65
 
91
66
  def main() -> None:
92
67
  args = parse_args()
93
- open_browser: bool = args.open_browser
94
68
  fastled_js: Path = args.fastled_js
95
69
  port: int = args.port
96
70
  cert: Path | None = args.cert
@@ -98,7 +72,6 @@ def main() -> None:
98
72
  run(
99
73
  path=fastled_js,
100
74
  port=port,
101
- open_browser=open_browser,
102
75
  certfile=cert,
103
76
  keyfile=key,
104
77
  )
fastled/server_fastapi.py CHANGED
@@ -20,7 +20,7 @@ MAPPING = {
20
20
 
21
21
 
22
22
  """Run FastAPI server with live reload or HTTPS depending on args."""
23
- app = FastAPI()
23
+ app = FastAPI(debug=True)
24
24
  base = Path(".")
25
25
 
26
26
 
@@ -33,12 +33,13 @@ def _run_fastapi_server(
33
33
  host="127.0.0.1",
34
34
  port=port,
35
35
  reload=True,
36
+ # reload_includes=["index.html"],
36
37
  ssl_certfile=certfile,
37
38
  ssl_keyfile=keyfile,
38
39
  )
39
40
 
40
41
 
41
- def run_fastapi_server_proces(
42
+ def run_fastapi_server_process(
42
43
  port: int,
43
44
  cwd: Path | None = None,
44
45
  certfile: Path | None = None,
@@ -56,5 +57,5 @@ def run_fastapi_server_proces(
56
57
 
57
58
  if __name__ == "__main__":
58
59
  # Example usage
59
- proc = run_fastapi_server_proces(port=8000)
60
+ proc = run_fastapi_server_process(port=8000)
60
61
  proc.join()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.2.59
3
+ Version: 1.2.61
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -22,6 +22,7 @@ Requires-Dist: progress>=1.6
22
22
  Requires-Dist: fastapi>=0.115.12
23
23
  Requires-Dist: uvicorn>=0.34.2
24
24
  Requires-Dist: pywebview>=5.4
25
+ Requires-Dist: watchfiles>=1.0.5
25
26
  Dynamic: home-page
26
27
  Dynamic: license-file
27
28
  Dynamic: maintainer
@@ -1,4 +1,4 @@
1
- fastled/__init__.py,sha256=O-a22ClvEx2MXy3apHChC71QCzCCvdXnuQeyZ7aZuk8,6734
1
+ fastled/__init__.py,sha256=w_GKHlTrhiwiz_aQU4IZ08bHxQvhoyhd1oXEsz3gzYQ,6734
2
2
  fastled/app.py,sha256=Ozn7OJ0rz3CEHsJKMhFLxV7TisRKo4DuFpVhrf5FQNw,3944
3
3
  fastled/cli.py,sha256=FjVr31ht0UPlAcmX-84NwfAGMQHTkrCe4o744jCAxiw,375
4
4
  fastled/cli_test.py,sha256=qJB9yLRFR3OwOwdIWSQ0fQsWLnA37v5pDccufiP_hTs,512
@@ -11,14 +11,14 @@ fastled/interactive_srcs.py,sha256=F5nHdJc60xsnmOtnKhngE9JytqGn56PmYw_MVSIX1ac,1
11
11
  fastled/keyboard.py,sha256=UTAsqCn1UMYnB8YDzENiLTj4GeL45tYfEcO7_5fLFEg,3556
12
12
  fastled/keyz.py,sha256=WjfZHtZHEB8wNh1YYZGYwjx1jQV-6wwhCbYn4Zp7xs4,938
13
13
  fastled/live_client.py,sha256=MDauol0mxtXggV1Pv9ahC0Jjg_4wnnV6FjGEtdd9cxU,2763
14
- fastled/open_browser.py,sha256=5m0PFzy0lyIt41R9kAlWFtdTr27K87m2wgXzRAaKXy8,4297
15
- fastled/open_browser2.py,sha256=XVxWFpi9J-TNFPfcU5hD6EOXIjz4UI2_b283lzuK16U,2966
14
+ fastled/open_browser.py,sha256=YrjjCOALEStlrd-7gXGmzY0zSE5gJ6po__2u4M1orUk,4112
15
+ fastled/open_browser2.py,sha256=xR8wLshpk3HPMtSzI48vUN9tvh0kMSR2eEs6LHpnpxM,2279
16
16
  fastled/parse_args.py,sha256=xgjxirQVX3FQxHZNVJtQQxTOeSJRQdGUNQ7W33Y880Y,8051
17
17
  fastled/paths.py,sha256=VsPmgu0lNSCFOoEC0BsTYzDygXqy15AHUfN-tTuzDZA,99
18
18
  fastled/project_init.py,sha256=bBt4DwmW5hZkm9ICt9Qk-0Nr_0JQM7icCgH5Iv-bCQs,3984
19
19
  fastled/select_sketch_directory.py,sha256=TZdCjl1D7YMKjodMTvDRurPcpAmN3x0TcJxffER2NfM,1314
20
- fastled/server_fastapi.py,sha256=BLWERhxXcNxKk7Ub7eLRL1qgXBIgQw24-Zv5vek2X7A,1478
21
- fastled/server_fastapi_cli.py,sha256=i-Paq59dFpl-RV1xb7DycTHuDjaMhAo7u_WdVaSUDTY,1347
20
+ fastled/server_fastapi.py,sha256=ytsL4poO-yugDIhvYJq6nCNdLZ4fQJ1AFqXkF-uEkqo,1488
21
+ fastled/server_fastapi_cli.py,sha256=Qha2Wvv4V1dQ_xstmF4rEtv0dc6dO-AF-nUDH8FlgWw,1391
22
22
  fastled/settings.py,sha256=URgM6ZPlQYF-0ZTEhQCX8isLR6CbmYGwhDX4uXbh-ZI,468
23
23
  fastled/sketch.py,sha256=tHckjDj8P6BI_LWzUFM071a9qcqPs-r-qFWIe50P5Xw,3391
24
24
  fastled/spinner.py,sha256=VHxmvB92P0Z_zYxRajb5HiNmkHHvZ5dG7hKtZltzpcs,867
@@ -33,9 +33,9 @@ fastled/site/build.py,sha256=2YKU_UWKlJdGnjdbAbaL0co6kceFMSTVYwH1KCmgPZA,13987
33
33
  fastled/site/examples.py,sha256=s6vj2zJc6BfKlnbwXr1QWY1mzuDBMt6j5MEBOWjO_U8,155
34
34
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
35
35
  fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
36
- fastled-1.2.59.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
37
- fastled-1.2.59.dist-info/METADATA,sha256=6PRo3P37ZsZE0ZMr-tNP7gsjgyAslXlkr_502doqiAs,21977
38
- fastled-1.2.59.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
39
- fastled-1.2.59.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
40
- fastled-1.2.59.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
41
- fastled-1.2.59.dist-info/RECORD,,
36
+ fastled-1.2.61.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
37
+ fastled-1.2.61.dist-info/METADATA,sha256=-ZksctwA-RHaJmKW0QkXp1ltfcQEPuPkzlG0sxBDHE8,22010
38
+ fastled-1.2.61.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
39
+ fastled-1.2.61.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
40
+ fastled-1.2.61.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
41
+ fastled-1.2.61.dist-info/RECORD,,