Skip to content

Commit 727e549

Browse files
committed
Auto stash before merge of "main" and "origin/main"
1 parent 128feff commit 727e549

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+23
-340
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Python Web
22

33
[![Python](https://img.shields.io/badge/Python-3.12+-yellow?style=for-the-badge&logo=python&logoColor=white&labelColor=101010)](https://python.org)
4-
[![Reflex](https://img.shields.io/badge/Reflex-0.7.2+-5646ED?style=for-the-badge&logo=reflex&logoColor=white&labelColor=101010)](https://reflex.dev)
4+
[![Reflex](https://img.shields.io/badge/Reflex-0.7.14+-5646ED?style=for-the-badge&logo=reflex&logoColor=white&labelColor=101010)](https://reflex.dev)
55

66
## Curso de 13 horas en vídeo para aprender desarrollo web con Python puro y Reflex desde cero.
77

link_bio/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Web de links de MoureDev
22

33
[![Python](https://img.shields.io/badge/Python-3.12+-yellow?style=for-the-badge&logo=python&logoColor=white&labelColor=101010)](https://python.org)
4-
[![Reflex](https://img.shields.io/badge/Reflex-0.7.2+-5646ED?style=for-the-badge&logo=reflex&logoColor=white&labelColor=101010)](https://reflex.dev)
4+
[![Reflex](https://img.shields.io/badge/Reflex-0.7.14+-5646ED?style=for-the-badge&logo=reflex&logoColor=white&labelColor=101010)](https://reflex.dev)
55

66
## Proyecto desarrollado con [Python](https://www.python.org/) y [Reflex](https://reflex.dev/) que representa un sitio web personal estilo "[link in bio](https://moure.dev/)"
77

link_bio/link_bio/api/api.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
11
import link_bio.constants as const
2+
from fastapi import FastAPI
23
from link_bio.model.Featured import Featured
34
from link_bio.model.Live import Live
45
from .TwitchAPI import TwitchAPI
56
from .SupabaseAPI import SupabaseAPI
67
from .ConfigCatAPI import ConfigCatAPI
78

9+
# API
10+
11+
fastapi_app = FastAPI()
12+
813
TWITCH_API = TwitchAPI()
914
SUPABASE_API = SupabaseAPI()
1015
CONFIGCAT_API = ConfigCatAPI()
1116

1217

18+
@fastapi_app.get("/repo")
1319
async def repo() -> str:
1420
return const.REPO_URL
1521

1622

23+
@fastapi_app.get("/live/{user}")
1724
async def live(user: str) -> Live:
1825
return TWITCH_API.live(user)
1926

2027

28+
@fastapi_app.get("/featured")
2129
async def featured() -> list[Featured]:
2230
return SUPABASE_API.featured()
2331

2432

33+
@fastapi_app.get("/schedule")
2534
async def schedule() -> dict:
2635
return CONFIGCAT_API.schedule()

link_bio/link_bio/link_bio.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import link_bio.styles.styles as styles
44
from link_bio.pages.index import index
55
from link_bio.pages.courses import courses
6-
from link_bio.api.api import repo, live, featured, schedule
6+
from link_bio.api.api import fastapi_app
77

88
app = rx.App(
99
stylesheets=styles.STYLESHEETS,
1010
style=styles.BASE_STYLE,
11+
api_transformer=fastapi_app,
1112
head_components=[
1213
rx.script(
1314
src=f"https://www.googletagmanager.com/gtag/js?id={const.G_TAG}"),
@@ -21,8 +22,3 @@
2122
),
2223
],
2324
)
24-
25-
app.api.add_api_route("/repo", repo)
26-
app.api.add_api_route("/live/{user}", live)
27-
app.api.add_api_route("/featured", featured)
28-
app.api.add_api_route("/schedule", schedule)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import reflex as rx
1+
from pydantic import BaseModel
22

33

4-
class Featured(rx.Base):
4+
class Featured(BaseModel):
55
title: str
66
image: str
77
url: str

link_bio/link_bio/model/Live.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import reflex as rx
1+
from pydantic import BaseModel
22

33

4-
class Live(rx.Base):
4+
class Live(BaseModel):
55
live: bool
66
title: str

link_bio/link_bio/views/courses_links.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def courses_links() -> rx.Component:
2424
),
2525
link_button(
2626
"JavaScript desde cero",
27-
"Curso de +6h y 45 clases",
27+
"Curso de +14h, 120 lecciones y 220 ejercicios",
2828
"/icons/js.svg",
2929
const.JS_COURSE_URL
3030
),

link_bio/public/_next/static/chunks/framework-a4ddb9b21624b39b.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

link_bio/public/_next/static/chunks/main-c303cdf182a2f955.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

link_bio/public/_next/static/chunks/pages/404-ac239c0b68006ad6.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)