python-fasthtml 0.14.6__tar.gz → 0.14.9__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 (39) hide show
  1. {python_fasthtml-0.14.6/python_fasthtml.egg-info → python_fasthtml-0.14.9}/PKG-INFO +2 -2
  2. python_fasthtml-0.14.9/fasthtml/__init__.py +2 -0
  3. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/_modidx.py +0 -3
  4. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/jupyter.py +3 -30
  5. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/pyproject.toml +1 -1
  6. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9/python_fasthtml.egg-info}/PKG-INFO +2 -2
  7. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/python_fasthtml.egg-info/requires.txt +1 -1
  8. python_fasthtml-0.14.6/fasthtml/__init__.py +0 -2
  9. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/CONTRIBUTING.md +0 -0
  10. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/LICENSE +0 -0
  11. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/MANIFEST.in +0 -0
  12. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/README.md +0 -0
  13. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/authmw.py +0 -0
  14. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/basics.py +0 -0
  15. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/cli.py +0 -0
  16. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/common.py +0 -0
  17. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/components.py +0 -0
  18. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/components.pyi +0 -0
  19. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/core.py +0 -0
  20. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/core.pyi +0 -0
  21. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/fastapp.py +0 -0
  22. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/ft.py +0 -0
  23. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/js.py +0 -0
  24. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/katex.js +0 -0
  25. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/live_reload.py +0 -0
  26. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/oauth.py +0 -0
  27. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/pico.py +0 -0
  28. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/starlette.py +0 -0
  29. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/stripe_otp.py +0 -0
  30. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/svg.py +0 -0
  31. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/toaster.py +0 -0
  32. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/xtend.py +0 -0
  33. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/fasthtml/xtend.pyi +0 -0
  34. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/python_fasthtml.egg-info/SOURCES.txt +0 -0
  35. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/python_fasthtml.egg-info/dependency_links.txt +0 -0
  36. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/python_fasthtml.egg-info/entry_points.txt +0 -0
  37. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/python_fasthtml.egg-info/top_level.txt +0 -0
  38. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/setup.cfg +0 -0
  39. {python_fasthtml-0.14.6 → python_fasthtml-0.14.9}/tests/test_toaster.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-fasthtml
3
- Version: 0.14.6
3
+ Version: 0.14.9
4
4
  Summary: The fastest way to create an HTML app
5
5
  Author-email: Jeremy Howard and contributors <github@jhoward.fastmail.fm>
6
6
  License: Apache-2.0
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3 :: Only
15
15
  Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: fastcore>=2.0.4
18
+ Requires-Dist: fastcore>=2.1.2
19
19
  Requires-Dist: python-dateutil
20
20
  Requires-Dist: starlette>=1.0.1
21
21
  Requires-Dist: oauthlib
@@ -0,0 +1,2 @@
1
+ __version__ = "0.14.9"
2
+ from .core import *
@@ -190,13 +190,10 @@ d = { 'settings': { 'branch': 'main',
190
190
  'fasthtml.jupyter.JupyUviAsync.start': ('api/jupyter.html#jupyuviasync.start', 'fasthtml/jupyter.py'),
191
191
  'fasthtml.jupyter.JupyUviAsync.stop': ('api/jupyter.html#jupyuviasync.stop', 'fasthtml/jupyter.py'),
192
192
  'fasthtml.jupyter.htmx_config_port': ('api/jupyter.html#htmx_config_port', 'fasthtml/jupyter.py'),
193
- 'fasthtml.jupyter.is_port_free': ('api/jupyter.html#is_port_free', 'fasthtml/jupyter.py'),
194
193
  'fasthtml.jupyter.nb_serve': ('api/jupyter.html#nb_serve', 'fasthtml/jupyter.py'),
195
194
  'fasthtml.jupyter.nb_serve_async': ('api/jupyter.html#nb_serve_async', 'fasthtml/jupyter.py'),
196
195
  'fasthtml.jupyter.render_ft': ('api/jupyter.html#render_ft', 'fasthtml/jupyter.py'),
197
196
  'fasthtml.jupyter.show': ('api/jupyter.html#show', 'fasthtml/jupyter.py'),
198
- 'fasthtml.jupyter.wait_port_free': ('api/jupyter.html#wait_port_free', 'fasthtml/jupyter.py'),
199
- 'fasthtml.jupyter.wait_port_free_async': ('api/jupyter.html#wait_port_free_async', 'fasthtml/jupyter.py'),
200
197
  'fasthtml.jupyter.ws_client': ('api/jupyter.html#ws_client', 'fasthtml/jupyter.py')},
201
198
  'fasthtml.live_reload': {},
202
199
  'fasthtml.oauth': { 'fasthtml.oauth.AppleAppClient': ('api/oauth.html#appleappclient', 'fasthtml/oauth.py'),
@@ -5,14 +5,14 @@ Docs: https://www.fastht.ml/docs/api/jupyter.html.md"""
5
5
  # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/api/06_jupyter.ipynb.
6
6
 
7
7
  # %% auto #0
8
- __all__ = ['nb_serve', 'nb_serve_async', 'is_port_free', 'wait_port_free', 'wait_port_free_async', 'show', 'render_ft',
9
- 'htmx_config_port', 'JupyUvi', 'JupyUviAsync', 'HTMX', 'ws_client']
8
+ __all__ = ['nb_serve', 'nb_serve_async', 'show', 'render_ft', 'htmx_config_port', 'JupyUvi', 'JupyUviAsync', 'HTMX', 'ws_client']
10
9
 
11
10
  # %% ../nbs/api/06_jupyter.ipynb #2c69d9d0
12
- import asyncio, socket, time, uvicorn
11
+ import asyncio, time, uvicorn
13
12
  from threading import Thread
14
13
  from fastcore.utils import *
15
14
  from fastcore.meta import delegates
15
+ from fastcore.net import wait_port_free, wait_port_free_async
16
16
  from .common import *
17
17
  from .common import show as _show
18
18
  from fastcore.parallel import startthread
@@ -36,33 +36,6 @@ async def nb_serve_async(app, log_level="error", port=8000, host='0.0.0.0', **kw
36
36
  while not server.started: await asyncio.sleep(0.01)
37
37
  return server
38
38
 
39
- # %% ../nbs/api/06_jupyter.ipynb #508917bc
40
- def is_port_free(port, host='localhost'):
41
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
42
- sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
43
- try:
44
- sock.bind((host, port))
45
- sock.listen(1)
46
- return True
47
- except OSError: return False
48
- finally: sock.close()
49
-
50
- # %% ../nbs/api/06_jupyter.ipynb #1779cb76
51
- def wait_port_free(port, host='localhost', max_wait=20):
52
- "Wait for `port` to be free on `host`"
53
- start_time = time.time()
54
- while not is_port_free(port, host):
55
- if time.time() - start_time > max_wait: raise TimeoutError(f"Port {host}:{port} not free after {max_wait}s")
56
- time.sleep(0.1)
57
-
58
- async def wait_port_free_async(port, host='localhost', max_wait=20):
59
- "Async wait for `port` to be free on `host`"
60
- start_time = time.time()
61
- while not is_port_free(port, host):
62
- if time.time() - start_time > max_wait: raise TimeoutError(f"Port {host}:{port} not free after {max_wait}s")
63
- await asyncio.sleep(0.1)
64
-
65
-
66
39
  # %% ../nbs/api/06_jupyter.ipynb #654b36bb
67
40
  @delegates(_show)
68
41
  def show(*s, **kwargs):
@@ -12,7 +12,7 @@ license = {text = "Apache-2.0"}
12
12
  authors = [{name = "Jeremy Howard and contributors", email = "github@jhoward.fastmail.fm"}]
13
13
  keywords = ['nbdev', 'jupyter', 'notebook', 'python']
14
14
  classifiers = ["Natural Language :: English", "Intended Audience :: Developers", "Development Status :: 3 - Alpha", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only"]
15
- dependencies = ['fastcore>=2.0.4', 'python-dateutil', 'starlette>=1.0.1', 'oauthlib', 'itsdangerous', 'uvicorn[standard]>=0.30', 'httpx2', 'fastlite>=0.1.1', 'python-multipart', 'beautifulsoup4']
15
+ dependencies = ['fastcore>=2.1.2', 'python-dateutil', 'starlette>=1.0.1', 'oauthlib', 'itsdangerous', 'uvicorn[standard]>=0.30', 'httpx2', 'fastlite>=0.1.1', 'python-multipart', 'beautifulsoup4']
16
16
 
17
17
  [project.urls]
18
18
  Repository = "https://github.com/AnswerDotAI/fasthtml"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-fasthtml
3
- Version: 0.14.6
3
+ Version: 0.14.9
4
4
  Summary: The fastest way to create an HTML app
5
5
  Author-email: Jeremy Howard and contributors <github@jhoward.fastmail.fm>
6
6
  License: Apache-2.0
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3 :: Only
15
15
  Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: fastcore>=2.0.4
18
+ Requires-Dist: fastcore>=2.1.2
19
19
  Requires-Dist: python-dateutil
20
20
  Requires-Dist: starlette>=1.0.1
21
21
  Requires-Dist: oauthlib
@@ -1,4 +1,4 @@
1
- fastcore>=2.0.4
1
+ fastcore>=2.1.2
2
2
  python-dateutil
3
3
  starlette>=1.0.1
4
4
  oauthlib
@@ -1,2 +0,0 @@
1
- __version__ = "0.14.6"
2
- from .core import *