Skip to content

Commit 1325daa

Browse files
committed
Backend: Día 1
1 parent ec78af8 commit 1325daa

14 files changed

+71
-26
lines changed
523 Bytes
Binary file not shown.

Backend/FastAPI/main.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Clase en vídeo (24/11/2022): https://www.twitch.tv/videos/1661716599
2+
3+
### Hola Mundo ###
4+
5+
# Documentación oficial: https://fastapi.tiangolo.com/es/
6+
7+
# Instala FastAPI: pip install "fastapi[all]"
8+
9+
from fastapi import FastAPI
10+
11+
app = FastAPI()
12+
13+
# Url local: http://127.0.0.1:8000
14+
@app.get("/")
15+
async def root():
16+
return "Hola FastAPI!"
17+
18+
# Url local: http://127.0.0.1:8000/url
19+
@app.get("/url")
20+
async def url():
21+
return { "url":"https://mouredev.com/python" }
22+
23+
# Inicia el server: uvicorn main:app --reload
24+
# Detener el server: CTRL+C
25+
26+
# Documentación con Swagger: http://127.0.0.1:8000/docs
27+
# Documentación con Redocly: http://127.0.0.1:8000/redoc

Backend/type_hints.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Clase en vídeo (24/11/2022): https://www.twitch.tv/videos/1661716599
2+
3+
### Type Hints ###
4+
5+
my_string_variable = "My String variable"
6+
print(my_string_variable)
7+
print(type(my_string_variable))
8+
9+
my_string_variable = 5
10+
print(my_string_variable)
11+
print(type(my_string_variable))
12+
13+
my_typed_variable: str = "My typed String variable"
14+
print(my_typed_variable)
15+
print(type(my_typed_variable))
16+
17+
my_typed_variable = 5
18+
print(my_typed_variable)
19+
print(type(my_typed_variable))

Intermediate/00_dates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Clase en vídeo (06/10/2022): https://www.twitch.tv/videos/1611014007
1+
# Clase en vídeo: https://youtu.be/TbcEqkabAWU
22

33
### Dates ###
44

Intermediate/01_list_comprehension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Clase en vídeo (06/10/2022): https://www.twitch.tv/videos/1611014007
1+
# Clase en vídeo: https://youtu.be/TbcEqkabAWU?t=3239
22

33
### List Comprehension ###
44

Intermediate/02_challenges.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Clase en vídeo (13/10/2022): https://www.twitch.tv/videos/1623225956
1+
# Clase en vídeo: https://youtu.be/TbcEqkabAWU?t=4142
22

33
### Challenges ###
44

Intermediate/03_lambdas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Clase en vídeo (19/10/22): https://www.twitch.tv/videos/1628654998
1+
# Clase en vídeo: https://youtu.be/TbcEqkabAWU?t=9145
22

33
### Lambdas ###
44

Intermediate/04_higher_order_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Clase en vídeo (19/10/22): https://www.twitch.tv/videos/1628654998
1+
# Clase en vídeo: https://youtu.be/TbcEqkabAWU?t=10172
22

33
### Higher Order Functions ###
44

Intermediate/05_error_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Clase en vídeo (25/10/22): https://www.twitch.tv/videos/1634818287
1+
# Clase en vídeo: https://youtu.be/TbcEqkabAWU?t=12721
22

33
### Error Types ###
44

Intermediate/06_file_handling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Clase en vídeo (25/10/22): https://www.twitch.tv/videos/1634818287
1+
# Clase en vídeo: https://youtu.be/TbcEqkabAWU?t=15524
22

33
### File Handling ###
44

0 commit comments

Comments
 (0)