python-fasthtml 0.14.6__tar.gz → 0.14.7__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.
- {python_fasthtml-0.14.6/python_fasthtml.egg-info → python_fasthtml-0.14.7}/PKG-INFO +2 -2
- python_fasthtml-0.14.7/fasthtml/__init__.py +2 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/_modidx.py +0 -3
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/jupyter.py +3 -30
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/pyproject.toml +1 -1
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7/python_fasthtml.egg-info}/PKG-INFO +2 -2
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/python_fasthtml.egg-info/requires.txt +1 -1
- python_fasthtml-0.14.6/fasthtml/__init__.py +0 -2
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/CONTRIBUTING.md +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/LICENSE +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/MANIFEST.in +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/README.md +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/authmw.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/basics.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/cli.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/common.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/components.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/components.pyi +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/core.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/core.pyi +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/fastapp.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/ft.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/js.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/katex.js +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/live_reload.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/oauth.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/pico.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/starlette.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/stripe_otp.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/svg.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/toaster.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/xtend.py +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/fasthtml/xtend.pyi +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/python_fasthtml.egg-info/SOURCES.txt +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/python_fasthtml.egg-info/dependency_links.txt +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/python_fasthtml.egg-info/entry_points.txt +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/python_fasthtml.egg-info/top_level.txt +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/setup.cfg +0 -0
- {python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/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.
|
|
3
|
+
Version: 0.14.7
|
|
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.
|
|
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
|
|
@@ -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', '
|
|
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,
|
|
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.
|
|
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.
|
|
3
|
+
Version: 0.14.7
|
|
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.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_fasthtml-0.14.6 → python_fasthtml-0.14.7}/python_fasthtml.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|