This repository has been archived on 2025-11-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Fitz_Studio/backend/Credenciales/postgres_credencial.py
T
2025-05-05 02:21:55 +02:00

15 lines
496 B
Python

class PostgresCredencial:
def __init__(self, titulo: str, host: str, port: int, dbname: str, user: str, password: str):
self.titulo = titulo
self.host = host
self.port = port
self.dbname = dbname
self.user = user
self.password = password
def get_uri(self) -> str:
"""
Retorna una URI de conexión para PostgreSQL.
"""
return f"postgresql://{self.user}:{self.password}@{self.host}:{self.port}/{self.dbname}"