Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jph00 committed Oct 23, 2024
1 parent 92197ad commit 232f188
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
2 changes: 2 additions & 0 deletions fasthtml/jupyter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Use FastHTML in Jupyter notebooks"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/api/06_jupyter.ipynb.

# %% auto 0
Expand Down
24 changes: 12 additions & 12 deletions nbs/api/00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "32849494",
"id": "fa505c58",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -131,7 +131,7 @@
{
"data": {
"text/plain": [
"datetime.datetime(2024, 10, 21, 14, 0)"
"datetime.datetime(2024, 10, 24, 14, 0)"
]
},
"execution_count": null,
Expand Down Expand Up @@ -2291,13 +2291,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Set to 2024-10-21 11:30:09.178139\n"
"Set to 2024-10-24 04:46:03.100239\n"
]
},
{
"data": {
"text/plain": [
"'Session time: 2024-10-21 11:30:09.178139'"
"'Session time: 2024-10-24 04:46:03.100239'"
]
},
"execution_count": null,
Expand Down Expand Up @@ -2511,7 +2511,7 @@
"metadata": {},
"outputs": [],
"source": [
"rt = APIRouter()"
"ar = APIRouter()"
]
},
{
Expand All @@ -2521,16 +2521,16 @@
"metadata": {},
"outputs": [],
"source": [
"@rt(\"/hi\")\n",
"@ar(\"/hi\")\n",
"def get(): return 'Hi there'\n",
"@rt(\"/hi\")\n",
"@ar(\"/hi\")\n",
"def post(): return 'Postal'\n",
"@rt(\"/hostie\")\n",
"@ar(\"/hostie\")\n",
"def show_host(req): return req.headers['host']\n",
"@rt\n",
"@ar\n",
"def yoyo(): return 'a yoyo'\n",
"\n",
"@rt.ws(\"/ws\")\n",
"@ar.ws(\"/ws\")\n",
"def ws(self, msg:str): return f\"Message text was: {msg}\""
]
},
Expand All @@ -2542,7 +2542,7 @@
"outputs": [],
"source": [
"app,cli,_ = get_cli(FastHTML())\n",
"rt.to_app(app)"
"ar.to_app(app)"
]
},
{
Expand Down Expand Up @@ -2631,7 +2631,7 @@
{
"data": {
"text/plain": [
"'Cookie was set at time 11:30:09.771098'"
"'Cookie was set at time 04:46:03.784300'"
]
},
"execution_count": null,
Expand Down
3 changes: 2 additions & 1 deletion nbs/api/06_jupyter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"source": [
"# Jupyter compatibility\n",
"\n",
"- Use FastHTML in Jupyter notebooks"
"> Use FastHTML in Jupyter notebooks\n",
"- skip_exec: true"
]
},
{
Expand Down

0 comments on commit 232f188

Please sign in to comment.