pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/mouredev/Hello-Python/commit/c625befdf0914ff6396da8ff32379f064a1b4ac2

s" /> Backend: Día 6 · mouredev/Hello-Python@c625bef · GitHub
Skip to content

Commit c625bef

Browse files
committed
Backend: Día 6
1 parent 0530f41 commit c625bef

14 files changed

Lines changed: 57 additions & 60 deletions

File tree

0 Bytes
Binary file not shown.
101 Bytes
Binary file not shown.

Backend/FastAPI/db/client.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,17 @@
1010

1111
from pymongo import MongoClient
1212

13-
db_client = MongoClient()
13+
# Descomentar el db_client local o remoto correspondiente
14+
15+
# Base de datos local MongoDB
16+
db_client = MongoClient().local
17+
18+
# Clase en vídeo (28/12/2022): https://www.twitch.tv/videos/1691208894
19+
20+
# Base de datos remota MongoDB Atlas (https://mongodb.com)
21+
# db_client = MongoClient(
22+
# "mongodb+srv://<user>:<password>@<url>/?retryWrites=true&w=majority").test
23+
24+
# Despliegue API en la nube:
25+
# Deta - https://www.deta.sh/
26+
# Intrucciones - https://fastapi.tiangolo.com/deployment/deta/
44 Bytes
Binary file not shown.

Backend/FastAPI/db/models/user.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
### User model ###
44

55
from pydantic import BaseModel
6+
from typing import Optional
67

78

89
class User(BaseModel):
9-
id: str | None
10+
id: Optional[str]
1011
username: str
1112
email: str
0 Bytes
Binary file not shown.

Backend/FastAPI/requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Clase en vídeo (28/12/2022): https://www.twitch.tv/videos/1691208894
2+
fastapi
3+
python-jose
4+
passlib
5+
bcrypt
6+
pymongo
7+
python-multipart
Binary file not shown.
-184 Bytes
Binary file not shown.
-43 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy