python-fasthtml 0.12.18__tar.gz → 0.12.19__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.12.18/python_fasthtml.egg-info → python_fasthtml-0.12.19}/PKG-INFO +1 -1
- python_fasthtml-0.12.19/fasthtml/__init__.py +2 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/core.py +5 -4
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/core.pyi +1 -1
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19/python_fasthtml.egg-info}/PKG-INFO +1 -1
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/settings.ini +1 -1
- python_fasthtml-0.12.18/fasthtml/__init__.py +0 -2
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/CONTRIBUTING.md +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/LICENSE +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/MANIFEST.in +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/README.md +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/_modidx.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/authmw.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/basics.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/cli.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/common.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/components.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/components.pyi +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/fastapp.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/ft.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/js.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/jupyter.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/katex.js +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/live_reload.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/oauth.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/pico.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/starlette.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/stripe_otp.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/svg.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/toaster.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/xtend.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/fasthtml/xtend.pyi +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/pyproject.toml +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/python_fasthtml.egg-info/SOURCES.txt +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/python_fasthtml.egg-info/dependency_links.txt +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/python_fasthtml.egg-info/entry_points.txt +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/python_fasthtml.egg-info/not-zip-safe +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/python_fasthtml.egg-info/requires.txt +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/python_fasthtml.egg-info/top_level.txt +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/setup.cfg +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/setup.py +0 -0
- {python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/tests/test_toaster.py +0 -0
|
@@ -11,7 +11,7 @@ __all__ = ['empty', 'htmx_hdrs', 'fh_cfg', 'htmx_resps', 'htmx_exts', 'htmxsrc',
|
|
|
11
11
|
'RouteFuncs', 'APIRouter', 'cookie', 'reg_re_param', 'MiddlewareBase', 'FtResponse', 'unqid', 'setup_ws']
|
|
12
12
|
|
|
13
13
|
# %% ../nbs/api/00_core.ipynb
|
|
14
|
-
import json,uuid,inspect,types,signal,asyncio,threading,inspect
|
|
14
|
+
import json,uuid,inspect,types,signal,asyncio,threading,inspect,random
|
|
15
15
|
|
|
16
16
|
from fastcore.utils import *
|
|
17
17
|
from fastcore.xml import *
|
|
@@ -31,7 +31,7 @@ from warnings import warn
|
|
|
31
31
|
from dateutil import parser as dtparse
|
|
32
32
|
from httpx import ASGITransport, AsyncClient
|
|
33
33
|
from anyio import from_thread
|
|
34
|
-
from uuid import uuid4
|
|
34
|
+
from uuid import uuid4, UUID
|
|
35
35
|
from base64 import b85encode,b64encode
|
|
36
36
|
|
|
37
37
|
from .starlette import *
|
|
@@ -810,8 +810,9 @@ class FtResponse:
|
|
|
810
810
|
return self.cls(cts, status_code=self.status_code, headers=headers, media_type=self.media_type, background=tasks)
|
|
811
811
|
|
|
812
812
|
# %% ../nbs/api/00_core.ipynb
|
|
813
|
-
def unqid():
|
|
814
|
-
|
|
813
|
+
def unqid(seeded=False):
|
|
814
|
+
id4 = UUID(int=random.getrandbits(128), version=4) if seeded else uuid4()
|
|
815
|
+
res = b64encode(id4.bytes)
|
|
815
816
|
return '_' + res.decode().rstrip('=').translate(str.maketrans('+/', '_-'))
|
|
816
817
|
|
|
817
818
|
# %% ../nbs/api/00_core.ipynb
|
|
@@ -242,7 +242,7 @@ iframe_scr = Script(NotStr("\n function sendmsg() {\n window.parent.po
|
|
|
242
242
|
|
|
243
243
|
class FastHTML(Starlette):
|
|
244
244
|
|
|
245
|
-
def __init__(self, debug=False, routes=None, middleware=None, title: str='FastHTML page', exception_handlers=None, on_startup=None, on_shutdown=None, lifespan=None, hdrs=None, ftrs=None, exts=None, before=None, after=None, surreal=True, htmx=True, default_hdrs=True, sess_cls=SessionMiddleware, secret_key=None, session_cookie='session_', max_age=365 * 24 * 3600, sess_path='/', same_site='lax', sess_https_only=False, sess_domain=None, key_fname='.sesskey', body_wrap=noop_body, htmlkw=None, nb_hdrs=False, **bodykw):
|
|
245
|
+
def __init__(self, debug=False, routes=None, middleware=None, title: str='FastHTML page', exception_handlers=None, on_startup=None, on_shutdown=None, lifespan=None, hdrs=None, ftrs=None, exts=None, before=None, after=None, surreal=True, htmx=True, default_hdrs=True, sess_cls=SessionMiddleware, secret_key=None, session_cookie='session_', max_age=365 * 24 * 3600, sess_path='/', same_site='lax', sess_https_only=False, sess_domain=None, key_fname='.sesskey', body_wrap=noop_body, htmlkw=None, nb_hdrs=False, canonical=True, **bodykw):
|
|
246
246
|
...
|
|
247
247
|
|
|
248
248
|
def add_route(self, route):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[DEFAULT]
|
|
2
2
|
repo = fasthtml
|
|
3
3
|
lib_name = python-fasthtml
|
|
4
|
-
version = 0.12.
|
|
4
|
+
version = 0.12.19
|
|
5
5
|
min_python = 3.10
|
|
6
6
|
license = apache2
|
|
7
7
|
requirements = fastcore>=1.8.1 python-dateutil starlette>0.33 oauthlib itsdangerous uvicorn[standard]>=0.30 httpx fastlite>=0.1.1 python-multipart beautifulsoup4
|
|
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
|
|
File without changes
|
{python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/python_fasthtml.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{python_fasthtml-0.12.18 → python_fasthtml-0.12.19}/python_fasthtml.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|